Loading ...
Sorry, an error occurred while loading the content.

adding soap header in .net

Expand Messages
  • ravitejav
    Hi, I am to implement a client in c#.net for a java/axis web service. this webservice needs that the soap message include a header of the form,
    Message 1 of 1 , Jun 17, 2005
    • 0 Attachment
      Hi,
      I am to implement a client in c#.net for a java/axis web service.
      this webservice needs that the soap message include a header of the
      form,

      <soapenv:Header>
      <USER soapenv:mustUnderstand="0" xsi:type="xsd:string">apiuser</USER>
      <PASSWORD soapenv:mustUnderstand="0"
      xsi:type="xsd:string">apiuser</PASSWORD>
      </soapenv:Header>

      I have created a client side proxy for this wsdl and added a derived
      class of the soapheader class, and this does add a soap header to the
      message but the format it uses is different.

      <soap:Header>
      <types:PasswordHeader id="h_id1" soap:mustUnderstand="1">
      <PASSWORD xsi:type="xsd:string">testpass</PASSWORD>
      </types:PasswordHeader>
      <types:UsernameHeader id="h_id2" soap:mustUnderstand="1">
      <USER xsi:type="xsd:string">testuser</USER>
      </types:UsernameHeader>
      </soap:Header>

      can anyone help me of how to add the header in the required format.

      thanks in advance.

      Ravi
    Your message has been successfully submitted and would be delivered to recipients shortly.