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 2007/09/28 01:47:51 UTC

[jira] Reopened: (AXISCPP-429) generated stubs use request message name, instead of operation name for setOperation

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

nadir amra reopened AXISCPP-429:
--------------------------------

      Assignee: nadir amra  (was: Adrian Dick)

I am reopening this issue.  It seems that if no input parameters are passed in the setOperation call does not happen.  Here is the code snippet (in org.apache.axis.wsdl.wsdl2ws.cpp.literal.ClientStubWriter.java):

        if( minfo.getInputMessage() != null)
        {
            writer.write( "\t\tm_pCall->setOperation(\"" 
                    + minfo.getInputMessage().getLocalPart() + "\", \"" 
                    + minfo.getInputMessage().getNamespaceURI() + "\");\n");
        }

So I do agree that the operation needs to be obtained from operation name.  One thing I am not sure about is where to obtain the namespace from....I did notice that in org.apache.axis.wsdl.wsdl2ws.cpp.ClientStubWriter.java (RPC) the following two lines may provide me with a solution:

        // Use namespace specified in input/output binding if one exists
        String namespaceURI = minfo.getNamespaceURI();
        if (namespaceURI == null)
            namespaceURI = wscontext.getWrapInfo().getTargetNameSpaceOfWSDL();

These two lines are not in the doc/literal version of the code, and I am not sure why. 

I have searched the literature and still am not sure what to do about namespace.  Without some expert direction or until I know for certain, I plan to add the following code (the else leg):

        if( minfo.getInputMessage() != null)
        {
            writer.write( "\t\tm_pCall->setOperation(\"" 
                    + minfo.getInputMessage().getLocalPart() + "\", \"" 
                    + minfo.getInputMessage().getNamespaceURI() + "\");\n");
        }
        else
        {
             // Use namespace specified in input/output binding if one exists
             String namespaceURI = minfo.getNamespaceURI();
             if (namespaceURI == null)
                  namespaceURI = wscontext.getWrapInfo().getTargetNameSpaceOfWSDL();

             writer.write( "\t\tm_pCall->setOperation(\"" 
                    + minfo.getMethodname() + "\", \"" 
                    + namespaceURI + "\");\n");             
        }

I think eventually, after doing more research, I will probably remove the code in the if-leg.

Please let me know if I am in the right direction.


> 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