Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
227 views
in Programming by
retagged by
I am creating WCF using .net. I have one WCF named login and another WCF named as addCandidate. So when I call login, it will take username, password and applicaiton URL as login information and generate Userdata and cookie out of it. In the next requrest I need to send userdata with cookie and also I need to add candidate information which requires to be added.

 

I want to create WCF in such a way that I will not have to resend data I just received such as cookie and userdata. Is there anyway to create object and share it with next WCF call?

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
You can not really do that. As per the WCF specification, every WCF is independent. So, you can not pass data from your first WCF to another. All you have to do it, get response from the first WCF. Create request from the first response and pass on that.

In your scenario, you first enter login and get cookie as you are logged in. After getting cookies, you can either store the session in the memory or db of the server and generate GUID. With second request pass the GUID, retrive the session data where ever it stored and use it.

Hope that answered your question.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...