[.net] Appending to a Web Service SOAP Header

Started by
0 comments, last by ernow 14 years, 1 month ago
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.
Advertisement
Have a look at this

This topic is closed to new replies.

Advertisement