Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2004

Tip: Looking for answers? Try searching our database.

SoapHeader is getting lost(WSE 2.0 SP1)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kishore Raghavan - 02 Nov 2004 08:11 GMT
I am adding a custom soap header on the client. But when the message reaches
the service, the soap envelope does not contain the header I added. Am I
doing something wrong?

The envelope at the client looks like this:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header CALLBACK="true"/>
<soap:Body>
 <string xmlns="http://tempuri.org/">afffda</string>
</soap:Body>
</soap:Envelope>

And the envelope that reached the service is this:
<soap:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
 <string xmlns="http://tempuri.org/">afffda</string>
</soap:Body>
</soap:Envelope>

This is the code on the client side. The RepositorySoapSender extends the
SoapClient.
//Code
RepositorySoapSender client =
new RepositorySoapSender(new
Uri("soap.tcp://kishorch018144:5050/receiver"));
SoapEnvelope request = new SoapEnvelope();
request.SetBodyObject(this.textBoxID.Text);
request.CreateHeader();
request.Header.SetAttribute("CALLBACK", "true");
request.Context.Addressing.ReplyTo = new Uri(RepositorySoapReceiver.URI);
client.ProcessAsync(request);
Kishore Raghavan - 05 Nov 2004 04:07 GMT
This problem is fixed. WSE 2.0 SP1 removes the SoapHeader if it does find
any child element. I dont know why Microsoft did this.

-Kishore

>I am adding a custom soap header on the client. But when the message
>reaches the service, the soap envelope does not contain the header I added.
[quoted text clipped - 31 lines]
> request.Context.Addressing.ReplyTo = new Uri(RepositorySoapReceiver.URI);
> client.ProcessAsync(request);

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.