You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Dushshantha Chandradasa <dc...@virtusa.com> on 2005/06/02 05:33:42 UTC
SimpleArray test returns garbage values
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 <http://issues.apache.org/jira/browse/AXISCPP-608>
Regards,
Marcus Dushshantha Chandradasa
Team Virtusa
dchadradasa@virtusa.com
Re: SimpleArray test returns garbage values
Posted by Adrian Dick <ad...@uk.ibm.com>.
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 (adrian.dick@uk.ibm.com)
"Dushshantha Chandradasa" <dc...@virtusa.com> 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
> dchadradasa@virtusa.com
>