473,378 Members | 1,539 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,378 software developers and data experts.

integer array return from SOAP call

I've got a web service that returns an int[]. When called from most
clients, it works fine. The .NET framework'd wsdl.exe, though,
generates a stub that fails to get the values in the array.

The WSDL is at:

http://designacourse.com/services/MainService?wsdl

The code looks like this (with passwords blanked out):

using System;

namespace TestWS
{
class MainClass
{
public static void Main(string[] args)
{
MainServiceService dac = new MainServiceService();

int a = dac.getRootGroup(
"mindiq", "cdsmith", "********");
Console.WriteLine(a);
int[] subs = dac.getSubGroups(
"mindiq", "cdsmith", "********", a);
for (int i = 0; i < subs.Length; i++)
{
Console.Write(subs[i] + " ");
}

Console.WriteLine();
}
}
}

The SOAP response to the second operation (getSubGroups) looks like this
(all newlines come from my newsreader wrapping):

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body>
<ns1:getSubGroupsResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://webservice.mindiqweb.mindiq.com"><getSubGroupsRetu rn
soapenc:arrayType="xsd:int[3]" xsi:type="soapenc:Array"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item
href="#id0"/><item href="#id1"/><item href="#id2"/></getSubGroupsReturn>
</ns1:getSubGroupsResponse><multiRef id="id2" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:int"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">4207
</multiRef><multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:int"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">1064
</multiRef><multiRef id="id1" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:int"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">2084
</multiRef></soapenv:Body></soapenv:Envelope>

And the code prints:

7
0 0 0

It should print:

7
1064 2084 4207

Any ideas what is wrong?

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
Nov 23 '05 #1
0 1346

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

Similar topics

2
by: burdeen | last post by:
I've been trying to return an array with PHP5 soap. Is this not supported? or am i doing it wrong? Seems to return on the last element in the array. In my WSDL i've defined my return type as a...
0
by: Marc van Boven | last post by:
I'm stuck with the following problem: My nusoap-client calls a server-function giveCombination(). The function giveCombination should return something like array( => array( 'a_id' => 6,...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
9
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. ...
0
by: helldiversafe-news | last post by:
Hi all, I will use a apache soap service with an .net c# client and have a problem with an complex array: <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope...
0
by: lvpaul | last post by:
Hello ! I am calling a .NET Webservice and getting back a ADO.NET Datatset. How can I convert this to an PHP-Array ? $ergebnis = $m_service->call( $function, $data ); print_r($ergebnis)...
1
by: neoblitz | last post by:
Hi Guys, I'm very new to NuSoap. I'm able to call a webservice which actually returned me results.. But I'm having trouble to read the response or I simply don't understand how to read the response.....
0
by: leon70 | last post by:
Hi Group, I built a gSoap 2.7.11 Web services client in C++ on AIX and have got it talking to the remote service. The service is sending back an array of objects to my client but the client is...
0
by: alkora | last post by:
Hi all- I have a .NET web service that returns a file in the form of an array of bytes. I'm wanting to write that into a file on the client's machine, but i've been unable to do so. I mean, I...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.