Hi
I have written a web service code which is getting called by a client
application. This web service is using a validation component for the
request soap message validation.
The validation component is developed using soap extensions as
mentioned in the article on the microsoft site :
http://msdn.microsoft.com/msdnmag/issues/03/07/XMLSchemaValidation/
My problem starts when I try to read the SoapMessage.Stream to get the
soap request.
part of the validation code is given below:
if (message.Stage ==SoapMessageStage.BeforeDeserialize)
{
if(message is SoapServerMessage)
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(message.Stream); >>>>> This is where the
code crashes, error message is pasted below.
...........
...........
}
}
Actually if I see the message object in the quickwatch window, the
message.Length=0. So there is no soap message Stream whatso ever
getting read/initialised in the message object. Can some one tell what
can be wron here.
Error message: root element is missing
Gaurav Vaish (EduJini.IN) - 27 May 2006 14:31 GMT
Just check the raw input that you get... in HTTP request.
Couldn't get a custom HTTPModule that logs raw HTTP Request.
Create a module and handle BeginRequest event. Log the raw stream and more
importantly the following information:
The HTTP Headers:
- Content-Type
- Content-Length
It is possible that the Content-Type is wrong or there's some issue with
Content-Length header.

Signature
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------
> Hi
>
[quoted text clipped - 26 lines]
> can be wron here.
> Error message: root element is missing