473,473 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Webservice that returns an xml document instead of an array

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!

Mar 21 '07 #1
1 1517
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" <p.******@tiscali.nlwrote in message
news:11**********************@y66g2000hsf.googlegr 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 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!
Mar 21 '07 #2

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

Similar topics

1
by: Arne Holderbeke | last post by:
I'm doing my final project in PHP with a Soap webservice In the client script (PHP) 3 files are read into a string these strings and the name of the 3 files need to be passed to the webservice (...
5
by: Pete Hearn | last post by:
Hello All, New to the whole C#/Webservice/ADO.NET thing, so apologies in advance if this is a daft question! I have a webservice which returns a dataset - no problem there and all very...
6
by: Brad | last post by:
I have a web service which returns a collection of class object (see below). I want to consume this service in another web application by binding it to a List control The data returns from the...
7
by: stephan querengaesser | last post by:
hi ng, i try to invoke a webservice-method with an filter-object, that contains value types. if i don´t want to filter the return value of the method, i have to pass a new instance of the...
7
by: Christian Wilhelm | last post by:
Hi! I'm trying to call a Java WebService out of a .net Client. There are two Methods, one Method requires one Parameter of type Parameter, the other Method requires one Parameter of type...
1
by: Steve Lutz | last post by:
I have written a web service to provide some back-end functionality to a Web Site. The web service returns lists of items. If I use the webservice via a browser, it works fine and returns the...
5
by: mtv | last post by:
Hi all, I have the following code: ================================ Webservice side: public class MyWS: WebService { private myLib.DataObject curDataObject;
5
by: Stacey Levine | last post by:
I have a webservice that I wanted to return an ArrayList..Well the service compiles and runs when I have the output defined as ArrayList, but the WSDL defines the output as an Object so I was...
1
by: gihan | last post by:
Hi, I have a problem accessing remote webservice from my asp code. Instead of returning results, it returns list of web methods it has. Wonder where i'm doing wrong. Also note that, this is a...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.