Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Webservice that returns an xml document instead of an array

Reply
Thread Tools

Webservice that returns an xml document instead of an array

 
 
Pim75
Guest
Posts: n/a
 
      03-21-2007
Hello,

I've written a webservice that returns an array. The output of the
webservice has to be consumed by a classic asp application.

As classic asp can't read the returned array I want the webservice to
return a xml document instead of the array.

Can anyone tell me how I can output the array as a xml document?

The webservice looks as follows:
Public Function GetModellen() As Array
Dim ps As New TestSoap.Externalservice
Dim strArray() As TestSoap.TAutoModel
strArray = ps.GetModellen()

Return strArray
End Function

The array output from the webservice at this moment is:
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfTAutoModel xmlnssi="http://www.w3.org/2001/XMLSchema-
instance" xmlnssd="http://www.w3.org/2001/XMLSchema" xmlns="http://
tempuri.org/">
<TAutoModel>
<ModelId>33</ModelId>
<Omschrijving>200</Omschrijving>
<Beginjaar>1984</Beginjaar>
</TAutoModel>
</ArrayOfTAutoModel>

Thanks in advance for your help!

 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      03-21-2007
You probably do not have to jump through these hoops, as you will be using
the SOAP toolkit on the backside. You should be able to pull the XML
returned for the array without changing the service, as the ASP side will
only see SOAP.

If you must switch it, it is easy enough so make a routine that creates the
XML document and streams it back. There is no automagic way I know of, other
than slapping the data into a DataSet instead and saving it off as XML.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************
Think outside the box!
*********************************************
"Pim75" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hello,
>
> I've written a webservice that returns an array. The output of the
> webservice has to be consumed by a classic asp application.
>
> As classic asp can't read the returned array I want the webservice to
> return a xml document instead of the array.
>
> Can anyone tell me how I can output the array as a xml document?
>
> The webservice looks as follows:
> Public Function GetModellen() As Array
> Dim ps As New TestSoap.Externalservice
> Dim strArray() As TestSoap.TAutoModel
> strArray = ps.GetModellen()
>
> Return strArray
> End Function
>
> The array output from the webservice at this moment is:
> <?xml version="1.0" encoding="utf-8"?>
> <ArrayOfTAutoModel xmlnssi="http://www.w3.org/2001/XMLSchema-
> instance" xmlnssd="http://www.w3.org/2001/XMLSchema" xmlns="http://
> tempuri.org/">
> <TAutoModel>
> <ModelId>33</ModelId>
> <Omschrijving>200</Omschrijving>
> <Beginjaar>1984</Beginjaar>
> </TAutoModel>
> </ArrayOfTAutoModel>
>
> Thanks in advance for your help!
>


 
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
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
Hash#select returns an array but Hash#reject returns a hash... Srijayanth Sridhar Ruby 19 07-02-2008 12:49 PM
WebService returns XML in a String - how can I 'convert' this to an XML document? Ben Turner ASP .Net 2 01-02-2004 05:20 AM
Help on including one XML document within another XML document using XML Schemas Tony Prichard XML 0 12-12-2003 03:18 PM
DocumentBuilder.parse() returns "[#Document: null]" Document Mike Java 0 09-06-2003 03:38 AM



Advertisments