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 / May 2006

Tip: Looking for answers? Try searching our database.

SoapMessage.Stream does not have a soapheader and soap body

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
swati_mridu@yahoo.com - 26 May 2006 10:47 GMT
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

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.