axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nadir amra (JIRA)" <axis-c-...@ws.apache.org>
Subject [jira] Resolved: (AXISCPP-972) axis-c deserializer has a problem:
Date Wed, 27 Dec 2006 04:59:22 GMT
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: <31856127.1149476969806.JavaMail.jira@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=all ]

nadir amra resolved AXISCPP-972.
--------------------------------

    Fix Version/s: current (nightly)
                       (was:  1.6 Beta)
       Resolution: Fixed

Resolved by simply changing the java code.  I prefer "void **" to "void *&", simply because
void ** is more natural to me :-) and required minimal changes.

I also added code to delete the object if non-pointer type. 

In anycase, the Java code now looks like:

               writer.write("\tvoid* pCharDataAs;\n\n");
                String typeName = extensionBaseAttrib.getTypeName();
                String xsdType = CUtils.getXSDTypeForBasicType(typeName);
                writer.write("\tpIWSDZ->getChardataAs(&pCharDataAs, " + xsdType + ");\n");
                writer.write("\tparam->" + extensionBaseAttrib.getParamNameAsMember() +
" = ");
                
                if (CUtils.isPointerType(typeName))
                    writer.write("(" + typeName + ") pCharDataAs;\n");
                else
                {
                    writer.write(" *(" + typeName + "*) pCharDataAs;\n");
                    writer.write("\tAxis::AxisDelete( pCharDataAs, " + xsdType + ");\n");
                }


> 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++
>          Issue Type: Bug
>          Components: Server - Deserialization
>    Affects 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
>         Assigned To: nadir amra
>            Priority: Critical
>             Fix For: current (nightly)
>
>
> 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


Mime
View raw message