Robin
Robin

Reputation:

Raw SOAP data with WebServices in C#

Where can I find the RAW/object data of a SOAP request in C# when using WebServices.

Can't find it anywhere. Shouldent it be available in the HttpContext.Current.Request object ?

Upvotes: 0

Views: 2144

Answers (4)

Paul Manzotti
Paul Manzotti

Reputation: 5147

If you're just looking to debug your web service, then you can install Fiddler, and that allows you to inspect the data sent to and from your web service.

Upvotes: 2

David d C e Freitas
David d C e Freitas

Reputation: 7511

I found

Request.Params[null]

refers to the RAW data posted to the page in C# ASP.NET.

Upvotes: 0

Michael Meadows
Michael Meadows

Reputation: 28416

It sounds like you're going to have to go lower level on your implementation if you want to see the raw XML. Check out the generic handler (ASHX extension). This will allow you to deal with the request/response streams directly. It's very low level, but gives you full control over the service lifecycle.

Upvotes: 0

John Saunders
John Saunders

Reputation: 161773

Shouldent it be available in the HttpContext.Current.Request object ?

No, it shouldn't.

What are you trying to accomplish? If you just want to see that data so you can log it, or as an aid to debugging, then see the example in the SoapExtension class. It's a working sample of an extension that can log input and output as XML. I've used a modified version of it myself.

Upvotes: 2

Related Questions