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 / Languages / C# / February 2008

Tip: Looking for answers? Try searching our database.

Get the XML response on a SOAP webservice

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gjaydie_spam_die@free.fr - 10 Feb 2008 10:22 GMT
Hi,

I'm currently using a SOAP web service, using  "Add webservice
reference" in Visual Studio.

But, to get a clearer view of the data I'm getting, I would like to
take a look at the XML file I assume (1) I'm getting back from the
webservice, before it's "translated" by the generated access classes,
just if it was a REST call.

Is it possible ?

Guillaume
(1) But maybe I'm totally wrong about how SOAP works.
Nicholas Paldino [.NET/C# MVP] - 10 Feb 2008 15:15 GMT
Guillaume,

   You could derive a class from the proxy type and call the protected
GetWebResponse method on the class.  Of course, you probably have to set up
the call, which might be no small task.

   If you are doing it just to see what the messages are like (and for
actual programming purposeses) I would suggest getting an HTTP sniffer of
some kind (Fiddler is free, and pretty easy to use) which will allow you to
see the messages as they travel back and forth between your code and the
service (you basically set your code to use Fiddler as a proxy).

   If you need to perform processing on the message level, then I recommend
that you use WCF and type the return value of the method on the contract as
Message, which will give you access to the actual message yourself, which
you can process any way you wish.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> Hi,
>
[quoted text clipped - 10 lines]
> Guillaume
> (1) But maybe I'm totally wrong about how SOAP works.
christery@gmail.com - 10 Feb 2008 15:26 GMT
Sniffing the puters in is a thougth...
//CY
Peter Bromberg [C# MVP] - 11 Feb 2008 02:43 GMT
The convenient way to do this is through the use of a SoapExtension class.
This is a class that "inserts itself" into the processing chain, can do
whatever it needs to do with the SOAP message (in either direction) and then
passes control down the chain to complete the call.  You can find plenty of
good sample code by googling "soapextension".
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com 

> Hi,
>
[quoted text clipped - 10 lines]
> Guillaume
> (1) But maybe I'm totally wrong about how SOAP works.
Ethan Strauss - 11 Feb 2008 17:33 GMT
Take a look at
http://msdn2.microsoft.com/en-us/library/ms176041.aspx .
I used it and found it to be very helpful.
Ethan

> Hi,
>
[quoted text clipped - 10 lines]
> Guillaume
> (1) But maybe I'm totally wrong about how SOAP works.

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.