How add sub header in soap manually using .net
I am using web services in my applcation. I know when calling webservices the soap is created.
My requirement is to create soap sub header below like using vb.net code. Is it possible?
<SubHeader>
<username>sasi</username>
<password>infot</password>
</SubHeader>
Hope your reply.
Regards
Guvera
Re: How add sub header in soap manually using .net
Hello,
You can certainly add a custom header to each request to the Web Service. You can find details of how this can be done here:
http://www.codeproject.com/KB/webser...ntication.aspx
Bear in mind though, this brings up questions about security, given that you are adding a password into the header.
Gary
Re: How add sub header in soap manually using .net
Hi,
I am not asking for authentication. I think you are misunderstand my question. That is just sample element. I need ,
<SubHeader>
<appid>1</appid>
<name>chil</name>
<location>Franklin</location>
</SubHeader>
look like the above. I need to create sub header for soap header before calling web services in .net. Actually the soap created automatically when calling web services.
Regards
Guvera
Re: How add sub header in soap manually using .net
Hello,
In which case, take a look at the example that I linked to. It "should" do exactly what you want (assuming I have understood you correctly).
Gary