axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nadir Amra <a...@us.ibm.com>
Subject RE: Problem with Complex Objects in AxisCPP Engine!!
Date Mon, 09 Jul 2007 13:22:11 GMT
Shailesh,

Can you open a JIRA and attach a sample WSDL file?  At the very lease can 
you post a sample WSDL file so that I can take a look? Thanks.

Nadir K. Amra

"Shailesh Srivastava" <shailesh.srivastava@toshiba-tesi.com> wrote on 
07/09/2007 06:58:06 AM:

> Dear All,
> 
> I have found yet another bug in the AxisCPP 1.6 beta.
> In fact its related to the WSDL2WS tool.
> 
> Description:
> For the Complex Array objects, the Deserializer is not properly
> generated.
> 
> Problem Faced: All the values in the Complex Array are not available for
> use after the deSerializer function.
> 
> Reason: "peekNextElementName()" is not used properly. In fact the tool
> does not generate the proper sequence of this function in the
> DeSerializer functions.
> 
> Explanation:
> Suppose, the complex array has values as:
>    ReportSpec
>    {
>       Group
>       BoundarySpec
>       GroupList, etc
>    }
> ReportSpec[] is a complex Array.
> The code Generated by WSDL2WS tool does:
> elementName1 = pIWSDZ->peekNextElement()
> if (0 == strcmp(elementName,Group)
> {
>    //Call functions here
> }
> elementName2 = pIWSDZ->peekNextElement()
> if (0 == strcmp(elementName,BoundarySpec)
> {
>    //Call functions here
> }
> 
> Now, if Group does not exist, then... 
> The Peek takes the Parser control to 2 elements below & hence fails in
> the entire DeSerialization.
> 
> Solution:
> Edit the DeSerialization Function like this:
> Bool flag = true;
> if (flag){
>    elementName1 = pIWSDZ->peekNextElement();
>    flag = false;
> }
> if (0 == strcmp(elementName,Group)
> {
>    //Call functions here
>    Flag = true;
> }
> If (flag){
>    elementName2 = pIWSDZ->peekNextElement();
>    flag = false;
> }
> if (0 == strcmp(elementName,BoundarySpec)
> {
>    //Call functions here
>    Flag = true;
> }
> 
> Thus Peek is done only when it's needed. And there you go, the problem
> is fixed.
> 
> I do not know if any one is using axiscpp anymore. But think this will
> help.
> Note: This problem is there only with the Complex Arrays.
> 
> Hope it will help in making the WSDL2WS tool better.
> 
> Any comments/inputs are most welcome.
> 
> Thanks,
> -Shailesh
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message