[ https://issues.apache.org/jira/browse/AXISCPP-429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530912 ]
nadiramra edited comment on AXISCPP-429 at 9/28/07 9:17 PM: ------------------------------------------------------------- OK, I think from RPC side of things everything is OK, however, from doc/literal side of things I did a little research and from my observations on what Java side of things does when generating Java stubs, it seems to be that: If input parameters exist, namespace specified for param is used else if no input parameters exist, then the namespace for the <soap:body > is used if it exists else null string is used for namespace. That will be the logic I will be using. Thus, for org.apache.axis.wsdl.wsdl2ws.cpp.literal.ClientStubWriter.java (and C equivalent), I have changed the following: + // Issue setOperation logic...namespace for the operation is + // obtained from the namespace of the input message...if there + // is no input message then the namespace is obtained from + // the SOAP body extensability element for the input element; if + // there is no namespace, then we will use a null string. + // Techincally speaking, the SOAP body extensability element + // must not contain the namespace attribute. The SOAP body + // entry element for doc/literal style gets its namespace from the + // target namespace of the XML schema declaring this element. + String namespaceURI; if( minfo.getInputMessage() != null) - { - writer.write( "\t\tm_pCall->setOperation(\"" - + minfo.getInputMessage().getLocalPart() + "\", \"" - + minfo.getInputMessage().getNamespaceURI() + "\");\n"); - } + namespaceURI = minfo.getInputMessage().getNamespaceURI(); + else + namespaceURI = minfo.getInputNamespaceURI(); + + if (namespaceURI == null) + namespaceURI = ""; + writer.write( "\t\tm_pCall->setOperation(\"" + + minfo.getMethodname() + "\", \"" + + namespaceURI + "\");\n"); This also ensures the setOperation is issued even if there are no input parameters. was (Author: nadiramra): OK, from my observations on what Java side of things does when generating Java stubs, it seems to be that: If input parameters exist, namespace specified for param is used else if no input parameters exist, then the namespace for the <soap:body > is used if it exists else null string is used for namespace. That will be the logic I will be using. Thus, the else-leg code will be changing so that it looks like the following: else { // Use namespace specified in input/output binding if one exists String namespaceURI = minfo.getNamespaceURI(); if (namespaceURI == null) namespaceURI = ""; writer.write( "\t\tm_pCall->setOperation(\"" + minfo.getMethodname() + "\", \"" + namespaceURI + "\");\n"); } > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]