[ 
http://issues.apache.org/jira/browse/AXISCPP-565?page=comments#action_12330924 
] 

Dushshantha Chandradasa commented on AXISCPP-565:
-------------------------------------------------

the generated wrapper code for MultiOut test is wrong here. It is as follows.

pWs->get(&out0,&out1,&out2,&out3,&out4,&out5,&out6,&out7,&out8,&out9);
        pIWSSZ->addOutputParam("out1", (void*)out0, XSD_STRING);
        pIWSSZ->addOutputParam(">get>out14", (void*)&out1, XSD_INTEGER);
        pIWSSZ->addOutputParam(">get>out15", (void*)&out2, XSD_INT);
        pIWSSZ->addOutputParam(">get>out16", (void*)&out3, XSD_LONG);
        pIWSSZ->addOutputParam(">get>out17", (void*)&out4, XSD_SHORT);
        pIWSSZ->addOutputParam(">get>out18", (void*)&out5, XSD_DECIMAL);
        pIWSSZ->addOutputParam(">get>out19", (void*)&out6, XSD_FLOAT);
        pIWSSZ->addOutputParam(">get>out20", (void*)&out7, XSD_DOUBLE);
        pIWSSZ->addOutputParam(">get>out21", (void*)&out8, XSD_BOOLEAN);
        pIWSSZ->addOutputParam(">get>out22", (void*)&out9, XSD_BYTE);
        return AXIS_SUCCESS;

code is correct only for string type. for other types, we can see that unwanted 
parts are there for the param name. ex: ">get>out21" instead of "out21"

this part is done by the condition below in the WrapWriter.java

if (CUtils.isPointerType(outparamType))
                                {
                                        writer.write(
                                        "\tpIWSSZ->addOutputParam(\""
                                            + 
returnParamName.substring(returnParamName.lastIndexOf(">")+1)
                                            + "\", (void*)out"
                                            + i
                                            + ", "
                                            + 
CUtils.getXSDTypeForBasicType(outparamType)
                                            + ");\n");
                                }
                                else
                                {
                                        writer.write(
                                        "\tpIWSSZ->addOutputParam(\""
                                            + returnParamName
                                            + "\", (void*)&out"
                                            + i
                                            + ", "
                                            + 
CUtils.getXSDTypeForBasicType(outparamType)
                                            + ");\n");
                                }


if i changed the generated wraper code in the following manner, it works fine.

pIWSSZ->addOutputParam("out1", (void*)out0, XSD_STRING);
        pIWSSZ->addOutputParam("out14", (void*)&out1, XSD_INTEGER);
        pIWSSZ->addOutputParam("out15", (void*)&out2, XSD_INT);
        pIWSSZ->addOutputParam("out16", (void*)&out3, XSD_LONG);
        pIWSSZ->addOutputParam("out17", (void*)&out4, XSD_SHORT);
        pIWSSZ->addOutputParam("out18", (void*)&out5, XSD_DECIMAL);
        pIWSSZ->addOutputParam("out19", (void*)&out6, XSD_FLOAT);
        pIWSSZ->addOutputParam("out20", (void*)&out7, XSD_DOUBLE);
        pIWSSZ->addOutputParam("out21", (void*)&out8, XSD_BOOLEAN);
        pIWSSZ->addOutputParam("out22", (void*)&out9, XSD_BYTE);
        return AXIS_SUCCESS;



> WSDL2Ws does not generate code correctly for multi element returns
> ------------------------------------------------------------------
>
>          Key: AXISCPP-565
>          URL: http://issues.apache.org/jira/browse/AXISCPP-565
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Reporter: Andrew Perry
>     Assignee: Dushshantha Chandradasa

>
> When a WSDL specifies that mutli elements are returned, WSDL2Ws does not 
> create the stub correctly.
> I have added a new test called InOut which covers this area so the InOut WSDL 
> can be used.
> The generated stubs looks like:
> ------ code snippet ------
> InOut.hpp:
> STORAGE_CLASS_INFO void noParametersMultiReturn(, AXIS_OUT_PARAM xsd__double 
> *OutValue0, AXIS_OUT_PARAM xsd__int *OutValue1, AXIS_OUT_PARAM xsd__string 
> *OutValue2);
> --------------------------
> As can be seen there is an extraneous ','  before the parameter list.
> Also the parameter types need to be changed to ** types e.g.
> ------ code snippet ------
> Modified InOut.hpp:
> STORAGE_CLASS_INFO void noParametersMultiReturn(AXIS_OUT_PARAM xsd__double 
> **OutValue0, AXIS_OUT_PARAM xsd__int **OutValue1, AXIS_OUT_PARAM xsd__string 
> *OutValue2);
> --------------------------
> With these changes made, and the correcponding changes made in the cpp file, 
> the test works correctly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to