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 "Michael Xiong (JIRA)" <ax...@ws.apache.org> on 2006/06/05 05:26:30 UTC

[jira] Commented: (AXISCPP-972) axis-c deserializer has a problem:

axis-c deserializer: IWrapperSoapDeSerializer::getChardataAs 's
 declaration and definition should be changed as by reference, not by value,
 in order to output the required value by it's parameter pValue.
In-Reply-To: <31...@brutus>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

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

Michael Xiong commented on AXISCPP-972:
---------------------------------------

This problem is nearly the same to the old problem: AXISCPP-884 on 1.5final version.

Michael

> axis-c deserializer has a problem: 
axis-c deserializer: IWrapperSoapDeSerializer::getChardataAs 's declaration and definition should be changed as by reference, not by value, in order to output the required value by it's parameter pValue.
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: AXISCPP-972
>          URL: http://issues.apache.org/jira/browse/AXISCPP-972
>      Project: Axis-C++
>         Type: Bug

>   Components: Server - Deserialization
>     Versions:  1.6 Beta
>  Environment:   	 Platform:
>         Linux fedora 3.0
> Axis version:
>         Server-side Axis C++ 1.6Beta
> XML Parser Lib:
> xersesc 2.6
> WSDL2ws tool by using axis java 1.3
> Client-side version Axis java 1.3
> Http Server Version:
> Apache 2.0.53
> Tomcat 2.0.58
>     Reporter: Michael Xiong
>     Priority: Critical

>
> axis-c deserializer has a problem: 
> IWrapperSoapDeSerializer::getChardataAs 's declaration and definition should be changed into by reference, not by value, in order to output the required value by parameter pValue.
> IWrapperSoapDeSerializer has declared an interface like the below:
>     virtual void getChardataAs(void* pValue, XSDTYPE type)=0;
> This interface is implemented in the class SoapDeSerializer like the below:
> SoapDeSerializer::getChardataAs (void *pValue, XSDTYPE type)
> {
> ... ...
>         pValue = pSimpleType->getValue();
> ... ...
> }
> From the code inside SoapDeSerializer::getChardataAs, you can see that the required value can not been really output by pValue for the pValue here is indeed  a pointer in local stack.
> If you want to output the requireed value by pValue, you should declare and define it by reference, not by value. 
> The suggested solution of mine is like the below:
> In include/axis/IWrapperSoapDeSerializer.hpp
> change the interface(getChardataAs)'s declaration into:
>    virtual void getChardataAs(void*& pValue, XSDTYPE type)=0;
> In src/soap/SoapDeserializer.h, change the method(SoapDeSerializer::getChardataAs)'s declaration into:
>     void getChardataAs(void*& pValue, XSDTYPE type);
> In src/soap/SoapDeserializer.cpp, change the method(SoapDeSerializer::getChardataAs)'s definition into:
> SoapDeSerializer::getChardataAs (void *& pValue, XSDTYPE type)
> {
> ... 
> }
> Please notice that only the method's signature need to be corrected, the internal code logic can remain no change.
> And correspondingly, the WSDL2WS generated code framework need to be corrected in the corresponding place. Detail please wait for another bug which I will reported for WSDL2WS later.
> I've verified my solution on axis-c-1.6beta, it's OK.

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


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