Hi Adrian,
A Jira was created on this 07th April 2005.
The problem is with deserialization of simple arrays in rpc style
generated code. If I modify the generated code of the class intarrayType
as follows ( which is the way doc/lit style handles the simple arrays)
the expected soap response can be observed.
int Axis_DeSerialize_intArrayType(intArrayType* param,
IWrapperSoapDeSerializer* pIWSDZ)
{
Axis_Array array;
array = pIWSDZ->getBasicArray(XSD_INT, "item",0);
param->intItem.m_Array = (xsd__int**)new
xsd__int*[array.m_Size];
param->intItem.m_Size = array.m_Size;
memcpy( param->intItem.m_Array, array.m_Array, sizeof( xsd__int
*) * array.m_Size);
return pIWSDZ->getStatus();
}
This is the only RPC test that we are working with Simple Arrays and the
test framework says that the test is passing because the client expects
a nonempty return value. It never checks the content which is a bunch of
garbage.
Thanks,
Dushshantha
-----Original Message-----
From: Adrian Dick [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 02, 2005 2:12 PM
To: Apache AXIS C Developers List
Subject: Re: SimpleArray test returns garbage values
Hi,
At what point has this started happening?
Over the past few days I've been working on the
serialization/deserialization of the XSD simple types - which also
affects
arrays of simple types.
Yesterday afternoon (UK time) I committed the changes for
deserialization -
having committed the serialization changes last week.
The changes I made should have no effect on the external behaviour to
client stubs and server skeletons, and I can confirm this is definitely
the
case for the client, in particular doc/literal.
If this is using the very latest code are you able to determine at
exactly
which point errors are introduced? ( I don't currently have a server
setup)
If you're not using the very latest code, could you try as the problem
may
have been resolved.
Thanks,
Adrian
_______________________________________
Adrian Dick ([EMAIL PROTECTED])
"Dushshantha Chandradasa" <[EMAIL PROTECTED]> wrote on 02/06/2005
04:33:42:
> Hi All,
> Did anyone notice that the service of the test SimpleArray returns
garbage.
>
> Following are the client request and the server response.
>
> Request
> ------------
>
> POST /axis/Array HTTP/1.1
> Host: localhost:8080
> Content-Type: text/xml; charset=UTF-8
> SAOPAction: Array#echoIntArray
> SOAPAction: "array#echoIntArray"
> Content-Length: 584
>
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
> " xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http:
> //www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:echoIntArray xmlns:ns1="http://soapinterop.org/">
> <intArrayType xsi:type="ns2:intArrayType" xmlns:ns2="http:
> //soapinterop.org/xsd"><intItemArray xmlns:enc="http://www.w3.
> org/2001/06/soap-encoding" enc:arrayType="xsd:int[2]">
> <item>0</item>
> <item>1</item>
> </intItemArray>
> </intArrayType></ns1:echoIntArray>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> Response
> ---------------
>
> HTTP/1.1 200 OK
> Date: Thu, 02 Jun 2005 03:05:25 GMT
> Server: Apache/2.0.52 (Win32)
> Content-Length: 612
> Content-Type: text/xml
>
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
> " xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http:
> //www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:echoIntArrayResponse xmlns:ns1="http://soapinterop.org/">
> <intArrayType xsi:type="ns2:intArrayType" xmlns:ns2="http:
> //soapinterop.org/xsd"><intItemArray xmlns:enc="http://www.w3.
> org/2001/06/soap-encoding" enc:arrayType="xsd:int[2]">
> <item>9406464</item>
> <item>9406464</item>
> </intItemArray>
> </intArrayType></ns1:echoIntArrayResponse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> The client code also has some problems.
>
> //testing echoIntArray
> intArrayType arrin;
> arrin.intItem.m_Array = new int*[ARRAYSIZE];
> arrin.intItem.m_Size = ARRAYSIZE;
> for (x=0;x<ARRAYSIZE;x++)
> {
> arrin.intItem.m_Array[x] =&x; //here the array is not
> initializing correctly
> }
>
> The segment in the for loop should be corrected as follows.
>
> for (x=0;x<ARRAYSIZE;x++)
> {
> arrin.intItem.m_Array[x] = new int;
> *(arrin.intItem.m_Array[x]) = x;
> }
>
> There is a Jira on this
> AXISCPP-608
>
>
>
> Regards,
>
> Marcus Dushshantha Chandradasa
> Team Virtusa
> [EMAIL PROTECTED]
>