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 "Emanuel Norrbin (JIRA)" <ax...@ws.apache.org> on 2006/01/26 01:58:09 UTC

[jira] Commented: (AXISCPP-884) Couldn't output value from function parameter

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

Emanuel Norrbin commented on AXISCPP-884:
-----------------------------------------

Is this code actually used? Seems like a serious bug.

The only place I could find it to be used is in

 wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java

where it is used like this

                writer.write("\tpIWSDZ->getChardataAs((void*)&(param->"
                        + extensionBaseAttrib.getParamNameAsMember()
                        + "), "
                        + CUtils.getXSDTypeForBasicType(extensionBaseAttrib.getTypeName()) + ");\n");

This generates C++ code that goes something like this:

tpIWSDZ->getChardataAs((void*)&(param->getParamName()),TypeName);

(funcion names might vary...)

So as the code is now the only thing this does is leak memory at best  and produce random results at worst.

So if this code is not used it should be removed or else corrected.

/Emanuel


> Couldn't output value from function parameter
> ---------------------------------------------
>
>          Key: AXISCPP-884
>          URL: http://issues.apache.org/jira/browse/AXISCPP-884
>      Project: Axis-C++
>         Type: Bug
>     Versions: 1.5 Final
>  Environment: Platform: 
>         Linux fedora 3.0 
> Axis version: 
>         Server-side Axis C++ 1.5 
> XML Parser Lib: 
> xersesc 2.6 
> WSDL2ws tool by using axis java 1.2RC3 jar 
> Client-side version Axis java 1.2RC3 
> Http Server Version: 
> Apache 2.0.53 
> Tomcat 2.0.58 
>     Reporter: FX SDCC

>
> Error Statement: 
> Axis 1.5 provide interface to deserialize string, but deserialize string result couldn't be output only by using input parameter. Modify parameter pValue type to reference type, to pass value by reference, then could get output value from parameter. 
> Error Code: modified three files: 
> In $AXISCPP_HOME\src\soap\SoapDeSerializer.cpp 
> Function: SoapDeSerializer::getChardataAs(void *pValue, XSDTYPE type) 
> Line : 4453 
> //Remove the following line 
> /*void 
> SoapDeSerializer::getChardataAs (void *pValue, XSDTYPE type)*/ 
> // ++ 
> void 
> SoapDeSerializer::getChardataAs (void *&pValue, XSDTYPE type) 
> // -- 
>             
> In $AXISCPP_HOME\src\soap\SoapDeSerializer.h 
> Line :246 
> // ++ 
> void getChardataAs(void*& pValue, XSDTYPE type); 
> //void getChardataAs(void* pValue, XSDTYPE type); 
> // -- 
> In $AXISCPP_HOME/include/axis/IWrapperSoapDeSerializer.hpp 
> Line: 160 
> // ++ 
> // virtual void getChardataAs(void* pValue, XSDTYPE type)=0; 
> virtual void getChardataAs(void*& pValue, XSDTYPE type)=0; 
> // -- 

-- 
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