Webservice that returns an xml document instead of an array

P

Pim75

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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xmlns:xsd="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!
 
C

Cowboy \(Gregory A. Beamer\)

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!
*********************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,701
Latest member
XavierQ83

Latest Threads

Top