Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7663657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:06:16+00:00 2026-05-31T14:06:16+00:00

I need your help on one practical issue. I have created a WCF service

  • 0

I need your help on one practical issue. I have created a WCF service with basic binding with two operation contact.

1- void StartRegistration – Anonymous member can fill the basic registration form and press submit. All the information will be stored into the database and one link with some random token will be send to user’s email address.
2 – void CompleteRegistration – This method validates the token sent into the email address and if token is valid, user account will be activated.

Now I have issue here. Using SoapUI I can call StartRegistration method. Email is sent to destination but I want to pass the token to CompleteRegistration method.

Since it is a WCF service so can not do dependency injection to pass the SoapUI tests :).

Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:06:17+00:00Added an answer on May 31, 2026 at 2:06 pm

    If I understand your question correctly, you have two WCF methods, one for creating a token and another for confirming it.
    What I would do in this case is have the first method, StartRegistration, return the token. Then you could use that token to pass into the CompleteRegistration method quite easily in Soap UI.

    Another, quite messy solution, would be to have a groovy script test step in Soap UI that actually connected to the mail account, read the link and parsed the contents.

    Edited:

    Here is part of the script you’ll need. Place it in a groovy step, that will then return the token from your mail.

    Note: This code assumes that mail is plain text, not multipart. It also assumes that the mail box only has a single mail. The API for JavaMail is pretty extensive, so if you want to do any magic with it, Google is your friend 🙂 At least, this is somewhere to start.

    import javax.mail.*;
    import javax.mail.internet.*;
    
    // setup connection
    Properties props = new Properties();
    def host = "pop3.live.com";
    def username = "mymailadress@live.com";
    def password = "myPassword";
    def provider = "pop3s"; 
    
    // Connect to the POP3 server
    Session session = Session.getDefaultInstance props, null
    Store store = session.getStore provider
    Folder inbox = null
    String content
    try
    {
    store.connect host, username, password
    
    // Open the folder
    inbox = store.getFolder 'INBOX'
    if (!inbox) {
        println 'No INBOX'
        System.exit 1
    }
    
    inbox.open(Folder.READ_ONLY)
    
    Message[] messages = inbox.getMessages()
    content = messages[0].getContent()
    
    //Do some parsing of the content here, to find your token. 
    //Place the result in content   
    }
    finally
    {
        inbox.close false
        store.close()
    }
    
    return content; //return the parsed token
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need your help. I have one Activity with two fragments: one fragment with
I need your help :/ I have a register that points to one memory
I have one question about Yii framework, and I need your help. Basicly, I
I need your help, For example I have a decimal type variable and I
I really need your help in my issue very quickly and it's too close
I'm completely stuck and need your help... I've created a webservice stub with jaxb
I've some questions .. and I really need your help. I have an application.
need your help. I tried myself but cant solve it. I have a table
I need your help. I have been switching from various libraries trying to find
I need your help :) I have a table in a database (SQL Server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.