My [web method] returns some obscure class which is somehow very
complicated and follow an xml schema.
I know by definition that web services send xml packed inside soap packets.
Is there a way i can capture the xml return by my call and serialize it into
a file?
Many thanks in advance
JB
Siegfried Glaser - 31 Jan 2005 20:59 GMT
Well, a little more information would be of help.
- What programming language and which developing environment are you using?
- Did you write the webmethod yourself or is the webmethod from somewhere
else? As you write that it returns some "obscure class", I would tend to
believe that you use a webservice placed in the internet. If that's true,
please post the URL.
- Have you already tried to view the webservice with Internet Explorer?
Normally there are descriptions for webservices that are meant to be consumed
by public.
- How did you call the webservice when you got the return in question?
Sigi
Jensen Bredhal - 31 Jan 2005 21:26 GMT
well , the web service is has a punlicly available wsdl.
I have not written the web service . The class is well defined and can be
seen through the proxy class added
by visual studio .
The class reflects the structure of a well defined xml schema and i may not
be allowed to post the url of as .
But it is true that there is a wsdl accessible through
an internet brower.
I use C# .
It is just too complicated to read fields from the class .
I beleive a dataset would be more intuitive to work with.
So it would be great if i could read the return class into an xml file that
can be processed trhough a dataset instead of the class returned which
somehow complicated.
Many thanks
JB
> Well, a little more information would be of help.
> - What programming language and which developing environment are you
[quoted text clipped - 10 lines]
>
> Sigi
Siegfried Glaser - 31 Jan 2005 23:17 GMT
If you are using C# I assume that you have created a Web Reference to your
Web Service in VS.NET and that you are using the resulting wrapper class to
access the service. In that case your returned data is exactly of the type
defined for the returnvalue of the webmethod in the webservice. So it solely
depends on this type and how you would serialize it.
How to serialize Objects with C# is explained by an example at the following
URL:
http://www.codeproject.com/csharp/objserial.asp
If you only want to do databinding, the following could be of interest:
http://www.codetools.com/vb/net/leaditwebservicewrapper.asp?df=100&forumid=14615
&select=1015729#xx1015729xx
Hope that helps. Otherwise please post again.
Sigi
Jensen Bredhal - 31 Jan 2005 23:26 GMT
The first link looks like what i was looking for.
Many thanks...
JB
> If you are using C# I assume that you have created a Web Reference to your
> Web Service in VS.NET and that you are using the resulting wrapper class
[quoted text clipped - 15 lines]
>
> Sigi
Siegfried Glaser - 31 Jan 2005 23:53 GMT
You're welcome.
I hope the inheritance of the returned class will not cause any problems.
Sigi
Dilip Krishnan - 01 Feb 2005 20:31 GMT
Hello Jensen,
Try this tool [0]
[0] - http://www.pocketsoap.com/tcptrace/
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
> My [web method] returns some obscure class which is somehow very
> complicated and follow an xml schema.
[quoted text clipped - 6 lines]
>
> JB