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] Commented: (AXISCPP-429) generated stubs use request message name, instead of operation name for setOperation
Date Fri, 04 Jan 2008 01:52:34 GMT

    [ https://issues.apache.org/jira/browse/AXISCPP-429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555763#action_12555763
] 

nadir amra commented on AXISCPP-429:
------------------------------------

Further investigation and I have found the real problem. It seems that because we do not invoke
setOperation() when an document/literal operation has no input parameters, the request that
is generated is something like:

<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Webservice failed</faultstring>
<faultactor>server name:listen port</faultactor>
<detail><appSpecific></appSpecific>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

This is the result of the following if-check in SoapBody::serialize() method:

        else if(NULL != m_pSoapMethod)
        {
         iStatus= m_pSoapMethod->serialize(pSZ);
         if(iStatus==AXIS_FAIL)
         break;
        }
        else
        {
            m_pSoapFault = SoapFault::getSoapFault(SERVER_ENGINE_WEBSERVICE_FAILED);
            if(m_pSoapFault!=NULL)
            {
                iStatus= m_pSoapFault->serialize(pSZ, eSoapVersion);
                if(iStatus==AXIS_FAIL)
                    break;
            }
        }

Obviously, this is incorrect. So what I have done is generate setOperation() call in stub
with namespace set to null string. For example:

m_pCall->setOperation("getVersion", "");

and I have modifed the SoapBody::serialize() method if-check so that it looks like the following:

        else if(NULL != m_pSoapMethod)
        {
         // A null-string namespace means the operation does not have input parameters and
         // thus we skip this serialization step!
         AxisString prefix = m_pSoapMethod->getPrefix();
         if (prefix.length() != 0)
         {
         iStatus= m_pSoapMethod->serialize(pSZ);
         if(iStatus==AXIS_FAIL)
         break;
         }
        }

So a null-string namespace is an indication that there are no parameters. The generated request
now seems to be correct, it looks like the following:

 <?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
</SOAP -ENV:Body>
</SOAP-ENV:Envelope>

which is consistent with what eclipse generates for the WSDL in the Web Services Explorer
tool.

Some more testing to be done....

> generated stubs use request message name, instead of operation name for setOperation
> ------------------------------------------------------------------------------------
>
>                 Key: AXISCPP-429
>                 URL: https://issues.apache.org/jira/browse/AXISCPP-429
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: WSDL processing - RPC
>    Affects Versions: 1.5 Alpha
>            Reporter: Adrian Dick
>            Assignee: nadir amra
>             Fix For: current (nightly)
>
>
> The WSDL2Ws tool generates doc/literal stubs where the setOperation method uses the request
message name, rather than the operation name.
> Regretably, all of our tests have these values set the same, hence this problem never
having been seen before.

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


Mime
View raw message