axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Dick <adrian.d...@uk.ibm.com>
Subject RE: compile failure of test CombinedChoice.xml
Date Mon, 19 Dec 2005 09:58:58 GMT
Hi,

Looking at the CombinedChoice testcase, I would say the test client code is
correct.

However, WSDL2Ws is generating pointer-to-pointer for xsd:choice, where I
believe it should simply be pointer-to-value.


Regards,
Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)


"Dushshantha Chandradasa" <dchandradasa@virtusa.com> wrote on 19/12/2005
09:48:55:

> Hi Nadir,
>
> I too noticed this in Windows platform. I tried to fix it from the
> client code by doing following changes. Then the client is compiling and
> able to run. But the serialization and deserialization is wrong.
>
> Changes in the client file:
>
>       int * * a;
>       int* aa = new int;
>       *aa = 5;
>       a = &aa;
>       Value0->IntValue = a;
>
> The client request and server response lokk like the following.
>
> Request:
>
> POST /axis/CombinedChoice HTTP/1.1
> Host: localhost:8080
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: "SimpleChoiceTest#echoChoice"
> Content-Length: 579
>
> <?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:echoChoice xmlns:ns1="http://soapinterop.org/">
> <ns1:inputChoice
> xmlns:ns2="http://soapinterop.org/xsd"><ns2:NonChoiceIntValue>5</ns2:Non
> ChoiceIntValue>
> <ns2:IntValue>3353928</ns2:IntValue>  <============= wrong serialization
> <ns2:NonChoiceStringValue>NonChoiceStringValue</ns2:NonChoiceStringValue
> >
> </ns1:inputChoice>
> </ns1:echoChoice>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> Response:
>
> HTTP/1.1 200 OK
> Date: Mon, 19 Dec 2005 09:38:35 GMT
> Server: Apache/2.0.54 (Win32)
> Content-Length: 579
> 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:echoChoiceResponse xmlns:ns1="http://soapinterop.org/">
> <_return
> xmlns:ns2="http://soapinterop.org/xsd"><ns2:NonChoiceIntValue>5</ns2:Non
> ChoiceIntValue>
> <ns2:IntValue>9176872</ns2:IntValue>
> <ns2:NonChoiceStringValue>NonChoiceStringValue</ns2:NonChoiceStringValue
> >
> </_return>
> </ns1:echoChoiceResponse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> Thanks
> Dushshantha
>
> -----Original Message-----
> From: Nadir Amra [mailto:amra@us.ibm.com]
> Sent: Monday, December 19, 2005 7:30 AM
> To: Apache AXIS C Developers List
> Subject: compile failure of test CombinedChoice.xml
>
> Kicking the tires on the new memory management fixes.
>
> While attempting to run test
> c/tests/auto_build/testcases/tests/CombinedChoice.xml, I get a compile
> error when compiling CombinedChoiceClient.cpp.  Here are the errors:
>
>         [cc]
> "/home/amra/axis/L051218/obj/test/generated/cpp/UnitTest_CombinedChoice/
> CombinedChoiceClient.cpp",
> line 15.36: CZP021
>  6(30) An expression of type "int *" cannot be converted to type "int
> **".
>
>         [cc]
> "/home/amra/axis/L051218/obj/test/generated/cpp/UnitTest_CombinedChoice/
> CombinedChoiceClient.cpp",
> line 16.39: CZP02
>  16(30) An expression of type "int" cannot be converted to type "int *".
>
>
>
> The offending lines in the code are the two lines after the
> instantiation
> of the object:
>                 ChoiceComplexType* Value0=new ChoiceComplexType();
>
>                 Value0->IntValue = new int;
>                 *(Value0->IntValue) = 5;
>
> The header file defines the field as:
>
>         xsd__int* * IntValue;
>
> So my question is what is it suppose to be and how is it working on
> other
> platforms?
>
> Nadir K. Amra
>


Mime
View raw message