SoapMessage.Stream does not have a soapheader and soap body

S

swati_mridu

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top