axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samisa Abeysinghe" <SAbeysin...@virtusa.com>
Subject RE: SimpleArray test returns garbage values
Date Thu, 02 Jun 2005 03:54:43 GMT
Hi Dushshantha,
            Have you checked if the server correctly deserializes the
values before return?
Thanks,
Samisa...
 
-----Original Message-----
From: Dushshantha Chandradasa [mailto:dchandradasa@virtusa.com] 
Sent: Thursday, June 02, 2005 9:34 AM
To: axis-c-dev@ws.apache.org
Subject: 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
 

Mime
View raw message