axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dushshantha Chandradasa" <>
Subject RE: Returning an array from Java Webservice
Date Wed, 01 Jun 2005 09:07:12 GMT

Hi Falk,

In Axis C++, arrays are handled in the following way. I'll explain this
using a test sample we have in Axis C++ cvs ( SimpleTypeArray ). 

Here in this example, the complex type "Type"(defined in Type.hpp) has a
member called item which is an array of integers. It is defined as a
data type called xsd__int_Array which contains a member called m_Array
which is an array of pointers of integer and a member called m_Size
which is an integer that contains the size of the array.

In the client you can access the returning array element as follows (the
complete client code is attached as SimpleTypeArray.cpp)

output = ws->getInput(input);

    for ( i = 0; i < 100; i++ ) {
      cout << "item [" << i << "] = " << *(output->item.m_Array[i])

Here ws is the client stub of the web service and output is an instance
of Type. 

You can get the Array size from the variable m_Size of "output".


-----Original Message-----
From: Falk Sippach [] 
Sent: Tuesday, May 31, 2005 7:22 PM
To: Apache AXIS C User List
Subject: Returning an array from Java Webservice


some weeks ago I've tested Axis C++ with a Java Axis webservice. It
worked well as long as I returned simple Java beans.

Now my Java webservice returns an array of beans. How does it work in my
C++ client. Does it work at all? I'm not a good C++ programmer, but I
think, in C++ you need to know how long your array is. In Java you can
simply ask for the length. 

Please give me some hints, maybe a documentation about arrays between
Java Axis und C++ Axis.


View raw message