By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,169 Members | 1,417 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,169 IT Pros & Developers. It's quick & easy.

Receive XML from web service

P: n/a
I need to call a web service that has a wsdl indicating a complex type being
returned. VS2005 creates a proxy for the service without problem and also
creates a type that can retrieve the data; great.

However, I wish to access the XML being returned directly instead of using
the object generated by VS from the wsdl. Any suggestions as to how I might
do this (I have tried serialising the object that is returned but that does
not actually give me an accurate representation of the original XML.

Thanks.
Apr 5 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Hello, Martin!

MR> However, I wish to access the XML being returned directly instead of
MR> using the object generated by VS from the wsdl. Any suggestions as to
MR> how I might do this (I have tried serialising the object that is
MR> returned but that does not actually give me an accurate representation
MR> of the original XML.

You can establish proxy server, that will capture xml content type ( text/xml ).
While in VS you will tell your stub to use that proxy. It is one way.

Another way will be simulation of web service client ( via HttpWebRequest ) - IMO complicated way.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Apr 5 '06 #2

P: n/a
Out of interest, why would you want the raw xml not the data?

Vadym Stetsyak wrote:
Hello, Martin!

MR> However, I wish to access the XML being returned directly instead of
MR> using the object generated by VS from the wsdl. Any suggestions as to
MR> how I might do this (I have tried serialising the object that is
MR> returned but that does not actually give me an accurate representation
MR> of the original XML.

You can establish proxy server, that will capture xml content type ( text/xml ).
While in VS you will tell your stub to use that proxy. It is one way.

Another way will be simulation of web service client ( via HttpWebRequest ) - IMO complicated way.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com


Apr 5 '06 #3

P: n/a
ArchitectOnTheEdge wrote:
Out of interest, why would you want the raw xml not the data?


The raw XML *is* the data.
--
Tom Porterfield
Apr 5 '06 #4

P: n/a
The customer I am working for requires that I keep a log of all send/receive
messages.

"ArchitectOnTheEdge" <ag*******@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
Out of interest, why would you want the raw xml not the data?

Vadym Stetsyak wrote:
Hello, Martin!

MR> However, I wish to access the XML being returned directly instead of
MR> using the object generated by VS from the wsdl. Any suggestions as
to
MR> how I might do this (I have tried serialising the object that is
MR> returned but that does not actually give me an accurate
representation
MR> of the original XML.

You can establish proxy server, that will capture xml content type (
text/xml ).
While in VS you will tell your stub to use that proxy. It is one way.

Another way will be simulation of web service client ( via
HttpWebRequest ) - IMO complicated way.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com

Apr 5 '06 #5

P: n/a
How do I tell VS that I want the XML and not the "Type" that it is creating
by default?

"Vadym Stetsyak" <va*****@ukr.net> wrote in message
news:O2**************@TK2MSFTNGP04.phx.gbl...
Hello, Martin!

MR> However, I wish to access the XML being returned directly instead of
MR> using the object generated by VS from the wsdl. Any suggestions as to
MR> how I might do this (I have tried serialising the object that is
MR> returned but that does not actually give me an accurate representation
MR> of the original XML.

You can establish proxy server, that will capture xml content type (
text/xml ).
While in VS you will tell your stub to use that proxy. It is one way.

Another way will be simulation of web service client ( via
HttpWebRequest ) - IMO complicated way.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com

Apr 5 '06 #6

P: n/a
> How do I tell VS that I want the XML and not the "Type" that it is creating
by default?


AFAIK, you can't if you use "web reference" approach...

You can try to dump XML on server. Soap extensions is the solution here.
( http://msdn.microsoft.com/msdnmag/is.../03/ASPColumn/ )
You make an extension that will dump xml content on request and response.

Take look at ( http://www.codeproject.com/cs/webser...select=1402839 )

If you have no access to the server webservice, that simple proxy will do the job.
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Apr 5 '06 #7

P: n/a

Martin Robins wrote:
The customer I am working for requires that I keep a log of all send/receive
messages.


WSE could provide the logging for you, although the WSE 2.0
recommendation is to not use it in a release version (the log file
grows quickly).

Halvard

Apr 5 '06 #8

P: n/a
Thus wrote ArchitectOnTheEdge,
Out of interest, why would you want the raw xml not the data?


One acronym: POX.

wsdl.exe won't cut it here ;-)

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Apr 6 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.