Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > web service beginners question

Reply
Thread Tools

web service beginners question

 
 
Mike P
Guest
Posts: n/a
 
      08-18-2004
I have seen examples of web services where a particular method returns a
single value, a string or an integer usually. I need to be able to
return 1 or more values (depending upon what an SQL query returns). If
I write a method in my web service that returns an ArrayList or array,
will the XML that is returned by the web service deal with this
appropriately (i.e. put each element in the array in a separate tag)?


Cheers,

Mike



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Alvin Bruney [MVP]
Guest
Posts: n/a
 
      08-18-2004
how about returning a dataset. a dataset is the only serializeable,
remoteable object.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Mike P" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I have seen examples of web services where a particular method returns a
> single value, a string or an integer usually. I need to be able to
> return 1 or more values (depending upon what an SQL query returns). If
> I write a method in my web service that returns an ArrayList or array,
> will the XML that is returned by the web service deal with this
> appropriately (i.e. put each element in the array in a separate tag)?
>
>
> Cheers,
>
> Mike
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
 
Mike P
Guest
Posts: n/a
 
      08-19-2004
Alvin,

Yes, I'd think that returning a dataset would be the best option.

I'm currently reading data from an XML file using XPathNavigator and
XPathNodeIterator to select the subset of data that I want. I've never
using the XPath objects before so I'm not sure how to get this data into
a dataset.

XPathDocument doc = new
XPathDocument(@"C:\inetpub\wwwroot\test\test.xml") ;
XPathNavigator nav = doc.CreateNavigator();
XPathNodeIterator iter =
nav.Select("/test/translation/engword[preceding-sibling::fraword = '" +
strFraWord + "']");

Can anybody help me out with this?


Cheers,

Mike



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
S. Justin Gengo
Guest
Posts: n/a
 
      09-21-2004
Mike,

Any data at all may be sent via a web service.

The only requirement is that the object you are sending has to utilize the
iSerializable interface. The ArrayList object does so, so that is one you
can use as is.

You may also build your own classes which utilize iSerializable.


--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Mike P" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I have seen examples of web services where a particular method returns a
> single value, a string or an integer usually. I need to be able to
> return 1 or more values (depending upon what an SQL query returns). If
> I write a method in my web service that returns an ArrayList or array,
> will the XML that is returned by the web service deal with this
> appropriately (i.e. put each element in the array in a separate tag)?
>
>
> Cheers,
>
> Mike
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does timer in Web Service Global.asax block my Web Service from processing web-site requests? Leo Violette ASP .Net Web Services 0 04-17-2009 12:39 AM
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
Beginners Question Regarding Static Web Pages Roger stevenson ASP .Net 8 07-01-2005 04:05 AM
Calling a Web Service using Axis, from within an Axis Web Service running under Tomcat hocho888 Java 1 04-29-2005 08:26 PM
Noobilicious question: Exposing two interfaces on the same web service(C# web service) WTH ASP .Net Web Services 1 02-15-2005 06:39 PM



Advertisments