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 / February 2005

Tip: Looking for answers? Try searching our database.

Problem with SoapService with custom SoapHeader with mustUnderstand="1"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kapil Sachdeva - 22 Feb 2005 06:55 GMT
Hi guys,

I am having a web service and client built using SoapService and SoapClient
respectively. My client needs to a custom header (derived from
System.web.services,Protocols.SoapHeader) with mustUnderstand attribute to
be true.

WSE2 doc says :
Users who want to process a mustUnderstand header should use a custom input
filter and not content-based routing. The mustUnderstand fault checking is
done before the ProcessRequestMessage method is called, so attempting to use
content-based routing will always result in a mustUnderstand fault at the
client.

So, I added custom output filter at client side to add the custom header and
custom input filter to process the custom header. My problem is how do I
tell the system that I understand the header ?.

The exception that I am getting is :

Unhandled Exception: System.Web.Services.Protocols.SoapException:
System.Web.Ser
vices.Protocols.SoapHeaderException: WSE011: The input was not a valid SOAP
mess
age because the following header was not understood: Correlation.
  at
Microsoft.Web.Services2.Messaging.SoapReceiver.ProcessMessageHeaders(SoapE
nvelope message)
  at
Microsoft.Web.Services2.Messaging.SoapReceiver.ProcessMessage(SoapEnvelope
message)
  at
Microsoft.Web.Services2.Messaging.SoapClient.SendRequestResponse(String me
thodname, SoapEnvelope envelope)
  at axalto.Test.AuthenticateServiceClient.DoAuthentication(SoapEnvelope
envelo

If somebody could throw a light on this, I will be very grateful.

Regards & thanks
Kapil Sachdeva
http://www.dotnetcard.com/blogs/ksachdeva
Kapil Sachdeva - 22 Feb 2005 07:30 GMT
I looked into the example given in WSE for custom filter and see that in
this example custom header is removed from the message and whatever
information is to be retrived from custom header is stored in
envelope.Context.

This approach works fine for me also.

Now if someone could validate that this is the approach we should take when
we work with WSE it would be good as earlier I was trying to use the
SoapHeader Attribute approach and trying to see how I could set the
DidUnderstand property to be true.

Regards & thanks
Kapil
Signature

Kapil Sachdeva
http://www.dotnetcard.com/blogs/ksachdeva

> Hi guys,
>
[quoted text clipped - 38 lines]
> Kapil Sachdeva
> http://www.dotnetcard.com/blogs/ksachdeva
John Bristowe - 23 Feb 2005 00:07 GMT
Kapil,

Custom input filters should remove proprietary SOAP modules to prevent them
from being intercepted by input filters located deeper in the pipeline.

SoapContext serves as a communications layer between infrastructure code
(i.e. an input filter) and application code (i.e. SoapService). When
processing proprietary SOAP modules through an input filter, you should
populate SoapContext with this information.

John

> I looked into the example given in WSE for custom filter and see that in
> this example custom header is removed from the message and whatever
[quoted text clipped - 53 lines]
>> Kapil Sachdeva
>> http://www.dotnetcard.com/blogs/ksachdeva

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.