• Advertisement
Sign in to follow this  

[.net] Appending to a Web Service SOAP Header

This topic is 2867 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm attempting to call a web service that requires passing an extra parameter called 'sessionID' in the SOAP header of each request. For some reason I can't figure out how to do add this using C# in .NET 3.5. In Java, I would do this: BrontoSoapApiImplService locator = new BrontoSoapApiImplServiceLocator(); BrontoSoapApi api = locator.getBrontoSoapApiImplPort(); // Login String sessionId = api.login(API_TOKEN); ((Stub)api).setHeader(locator.getServiceName().getNamespaceURI(), "sessionId", sessionId); However in C#, there is no setHeader method and have tried a bazillion different ways of adding it with no luck. Has anyone successfully done this in C#? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement