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 "nadir amra (JIRA)" <ax...@ws.apache.org> on 2008/05/21 21:49:56 UTC

[jira] Closed: (AXISCPP-966) WSDL2WS generate wrong code: redundant value reference * in Wrapper

     [ https://issues.apache.org/jira/browse/AXISCPP-966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

nadir amra closed AXISCPP-966.
------------------------------

       Resolution: Fixed
    Fix Version/s: current (nightly)

I believe the initial issue is fixed.   The resolution resulted in code change from:
============
                if (param.isNillable() && 
                        !(CUtils.isPointerType(type.getLanguageSpecificName())))
                {
                    writer.write("\t" + paraTypeName + "* v" + i
                            + " = pIWSDZ->" + CUtils.getParameterGetValueMethodName(paraTypeName,false)
                            + "(\"" + elementName + "\",0);\n");
                }
                else
                {
                    writer.write("\t" + paraTypeName + " v" + i
                            + " = *(pIWSDZ->" + CUtils.getParameterGetValueMethodName(paraTypeName,false)
                            + "(\"" + elementName + "\",0));\n");
                }
==============
TO
==============
                String splatPtr = " ";
                String splatDeref = " ";
                
                if (!CUtils.isPointerType(type.getLanguageSpecificName()))
                {
                    if (param.isNillable() || param.isOptional())
                        splatPtr   = " * ";
                    else 
                        splatDeref = " * ";
                }
                
                writer.write("\t" + paraTypeName + splatPtr + "v" + i + " =" + splatDeref
                        + "(pIWSDZ->" + CUtils.getParameterGetValueMethodName(paraTypeName,false)
                        + "(\"" + elementName + "\",0));\n");

==============
Let us know if there are any problems.  The other issues included in this JIRA,  I believe, are resolved.  If not, please open a new JIRA describing the problem. 

> WSDL2WS generate wrong code: redundant value reference * in Wrapper
> -------------------------------------------------------------------
>
>                 Key: AXISCPP-966
>                 URL: https://issues.apache.org/jira/browse/AXISCPP-966
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: WSDL processing - RPC
>    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
>            Priority: Critical
>             Fix For: current (nightly)
>
>
> [Error Statement]:
> I have used AxisCPP1.6Beta version to generate SampleTestSoapWrapper.cpp as the below:
> Function: int SampleTestSoapWrapper::GetOperation(void* pMsg)
> xsd_string v0 = *(pIWSDZ->getElementAsString("ListType", 0));
> The generated code has bug: xsd_string is already indeed a "char *", so should not reference it's content by "*".
> The correct code I expected is:
> xsd_string v0 = pIWSDZ->getElementAsString("ListType", 0);
> [solution]:
> I have investigated the source code of AxisCPP/WSDL2Ws tool, and found that if I modify the following code at about line 217~234 in writeMethodInWrapper method that belongs to WrapWriter (wsdl2ws/cpp/iteral) class, the above bug can be resolved.
>             	else
>             	{
>             	    
>             		writer.write(
>                             "\t"
>                                 + paraTypeName
>                                 + " v"
>                                 + i
> //<mxiong debug 20060425                                
>                                 + " = pIWSDZ->"
> //                                + " = *(pIWSDZ->"
> //>mxiong debug 20060425                                
>                                 + CUtils.getParameterGetValueMethodName(
>                                     paraTypeName,
>                                     false)
>                                 + "(\""
>                                 + elementName
> //                              <mxiong debug 20060425                                
> //                                + "\",0));\n");
>                                 + "\",0);\n");
> //            		>mxiong debug 20060425                                
>             	}
> So I think it's a bug.
> [other]
> I will create a patch for you and upload it later.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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