Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: VB VB.NET
I have added a service reference to my Web Project by just creating an assembly and right clicking on it to "Add a service Reference..." now I just provide the WSDL path and created a service reference.
I am able to get all the method names and the parameter type from the object of this reference.Even I am able to successfully invoke the service.
For Example :
SecurityProcessHandler objProcessHandler = new SecurityProcessHandler();
string objReturn = objProcessHandler.getUserDataForLogin(objInput);
My problem is that I now need to add a header info to the request while invoking the service and the header info in SOAP format is as follows:

Now I don't know how to add a header info to my service call.
Is it possible to add header info to my service? I tried in google but with no success.
Posted 17-Dec-12 2:32am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I'm not sure if this is what you mean. But you can create a security token for the SOAP header via:
// Create the WS-Security token for the SOAP header
UsernameToken userToken = new UsernameToken(uid, pswd, PasswordOption.SendPlainText);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 278
1 Maciej Los 210
2 Nguyen.H.H.Dang 190
3 Peter Leow 175
4 Sergey Alexandrovich Kryukov 150

Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 17 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid