Sign in to follow this  

[.net] Appending to a Web Service SOAP Header

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this