Moataz AL Dawood
Moataz AL Dawood

Reputation: 69

send an undefined soap header in C#

I have a web service implemented in java and appache axis.I want to call that service in .Net. the problem is there is a required soap header but it is not defined in the wsdl !!

the soap header must be look like this :

<soapenv:Header> <ns1:sessionID soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="urn:handlers.ws">778846user</ns1:sessionID> </soapenv:Header>

Is there any way to send this header using .NET ??

Upvotes: 0

Views: 798

Answers (1)

lmondria
lmondria

Reputation: 244

If you add the webservice as a reference to the project you can call the service methods with C#/VB. The .net framework will build your SOAP message, including the SOAP header.

Upvotes: 0

Related Questions