473,385 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How do i catch the row xml data from the return value of a web method

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
Nov 23 '05 #1
6 1431
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
Nov 23 '05 #2

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
"Siegfried Glaser" <Si*************@discussions.microsoft.com> wrote in
message news:33**********************************@microsof t.com...
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

Nov 23 '05 #3
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/lead...29#xx1015729xx

Hope that helps. Otherwise please post again.

Sigi
Nov 23 '05 #4
The first link looks like what i was looking for.
Many thanks...
JB
"Siegfried Glaser" <Si*************@discussions.microsoft.com> wrote in
message news:D0**********************************@microsof t.com...
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/lead...29#xx1015729xx

Hope that helps. Otherwise please post again.

Sigi

Nov 23 '05 #5
You're welcome.
I hope the inheritance of the returned class will not cause any problems.

Sigi
Nov 23 '05 #6
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.
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

Nov 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Bungle | last post by:
Hi I am trying to do something really simple. Create a method within a class which will connect to the database, pull back a result and return it out the method. Not hard. All my database...
7
by: Arjen | last post by:
Hi, I'm doing this: try { try { } catch(Exception ex){ throw;
13
by: Benny | last post by:
Hi, I have something like this: try { // some code } catch // note - i am catching everything now {
6
by: Martin Ortiz | last post by:
Which is best approach? Should Try + Catch be used to only deal with "catastrophic" events (like divide by zero, non-existant file, etc...etc...) Or should Try + Catch be used IN PLACE of...
5
by: Jeff User | last post by:
Hi I wanted to write a general procedure to handle all my errors. My idea was to place various stuff in the error handler then call it, from all my "Catch" blicks, ending it the Exception. ...
11
by: Tantr Mantr | last post by:
I want to convert a string to a DateTime type. The user can enter the date in various formats and I am not sure if it will be a valid Date. Is it possible to check if a string can be converted to a...
3
by: Doug | last post by:
Hi i have a method that returns a value public bool readxml (string xmlFilename, out string value) but I would like to catch an exception if it occurs in the method . How do i catch the...
3
by: Allen | last post by:
I use try catch, but cannot catch the execeptions of execution python method. PYCALL_API void PyCall(const char * pszModule, const char * pszFunc, void * pArg) { if (pszModule == NULL ||...
1
by: WeCi2i | last post by:
Okay, I have a problem that has been stumping me for weeks. I have tried many different solutions and this is pretty much my last resort. I have seen a lot of good answers give here so I figured I...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
I have to read data from an Excel Sheet. Using Microsoft Office Interop and Automation I create an Excel object Dim xl As New Excel.Application, wkbk As Excel.Workbook, rng as Excel.Range I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.