You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Bradley Gorman <bg...@au1.ibm.com> on 2006/09/11 08:35:48 UTC

AXISCPP: Complex Array Name vs Type

Hi All

I've encountered a problem with the Axis C++ API while testing for 
compatibility. It can't seem to handle a complexType array's name and type 
correctly.

My test is a simple interoperability test 'echoStructArray' that sends an 
array (inputStructArray) of complexTypes (SOAPStruct) and expects to 
receive the same values back. To serialize this I'm using the function 
Call::addCmplxArrayParameter(pArray, pSZFunct, pDelFunct,  pSizeFunct, 
pName, pNamespace) which doesn't contain enough arguments to specify both 
the name and complex type - in fact they are both set from the pName (in 
SoapSerializer::addOutputCmplxArrayParam() via Param::setName() and 
ArrayBean::setTypeName()). 

So depending on what you specify pName as Axis C++ ends up sending:

        <SOAPStructArray ... enc:arrayType="ns2:SOAPStruct[4]">
or
        <inputStructArray ... end:arrayType="ns2:inputStruct[4]">

when I believe it should be sending:
 
        <inputStructArray ... enc:arrayType="ns2:SOAPStruct[4]">

I've encountered servers that check for the element name 
'inputStructArray' and others check for the arrayType 'SOAPStruct[x]'. So 
no matter which way around you specify pName, it will not work in some 
cases.

I believe Call::addCmplxArrayParameter() and the functions hidden beneath 
it require an extra argument 'pTypeName' to handle this serialization 
correctly. Can anyone confirm this or have I missed something that will 
otherwise solve this problem?

(I also noticed that Axis automatically appends "Array" to the element 
name even when this isn't required, but that's only a minor inconvenience)

Cheers

Bradley Gorman