Author: nadiramra Date: Fri Sep 28 21:09:48 2007 New Revision: 580544 URL: http://svn.apache.org/viewvc?rev=580544&view=rev Log: AXISCPP-429 - stubs use request message name, instead of operation name for setOperation
Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/SymbolTableParsingUtils.java webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/MethodInfo.java Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/SymbolTableParsingUtils.java URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/SymbolTableParsingUtils.java?rev=580544&r1=580543&r2=580544&view=diff ============================================================================== --- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/SymbolTableParsingUtils.java (original) +++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/SymbolTableParsingUtils.java Fri Sep 28 21:09:48 2007 @@ -83,7 +83,7 @@ .get(j)); methodinfo.setInputEncoding(body.getEncodingStyles()); methodinfo.setInputUse(body.getUse()); - methodinfo.setNamespaceURI(body.getNamespaceURI()); + methodinfo.setInputNamespaceURI(body.getNamespaceURI()); } } } @@ -104,7 +104,7 @@ .get(j)); methodinfo.setInputEncoding(body.getEncodingStyles()); methodinfo.setInputUse(body.getUse()); - methodinfo.setNamespaceURI(body.getNamespaceURI()); + methodinfo.setOutputNamespaceURI(body.getNamespaceURI()); } } } Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java?rev=580544&r1=580543&r2=580544&view=diff ============================================================================== --- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java (original) +++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java Fri Sep 28 21:09:48 2007 @@ -346,12 +346,27 @@ writer.write("\taxiscCallSetSOAPVersion(call, SOAP_VER_1_1);\n"); //TODO check which version is it really. + // 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("\taxiscCallSetOperation(call, \"" - + minfo.getInputMessage().getLocalPart() + "\", \"" - + minfo.getInputMessage().getNamespaceURI() + "\");\n"); - } + namespaceURI = minfo.getInputMessage().getNamespaceURI(); + else + namespaceURI = minfo.getInputNamespaceURI(); + + if (namespaceURI == null) + namespaceURI = ""; + + writer.write("\taxiscCallSetOperation(call, \"" + + minfo.getMethodname() + "\", \"" + + namespaceURI + "\");\n"); // Add attributes to soap method boolean commentIssued=false; Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java?rev=580544&r1=580543&r2=580544&view=diff ============================================================================== --- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java (original) +++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java Fri Sep 28 21:09:48 2007 @@ -356,8 +356,10 @@ writer.write("\t\tm_pCall->setSOAPVersion( SOAP_VER_1_1);\n"); //TODO check which version is it really. - // Use namespace specified in input/output binding if one exists - String namespaceURI = minfo.getNamespaceURI(); + // Use namespace specified in input binding if one exists + // For rpc/literal operations the namespace must be set, but if not, use + // the target namespace. + String namespaceURI = minfo.getInputNamespaceURI(); if (namespaceURI == null) namespaceURI = wscontext.getWrapInfo().getTargetNameSpaceOfWSDL(); @@ -365,7 +367,6 @@ + minfo.getMethodname() + "\", \"" + namespaceURI + "\");\n"); - //============================================================================= // Apply user specified properties //============================================================================= Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java?rev=580544&r1=580543&r2=580544&view=diff ============================================================================== --- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java (original) +++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java Fri Sep 28 21:09:48 2007 @@ -347,13 +347,28 @@ writer.write ("\t\tm_pCall->setSOAPVersion(SOAP_VER_1_1);\n"); //TODO check which version is it really. + // 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"); + //============================================================================= // Add attributes to soap method //============================================================================= Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/MethodInfo.java URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/MethodInfo.java?rev=580544&r1=580543&r2=580544&view=diff ============================================================================== --- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/MethodInfo.java (original) +++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/MethodInfo.java Fri Sep 28 21:09:48 2007 @@ -40,7 +40,8 @@ private QName outputMessage; private QName faultMessage; private ArrayList faultType; - private String namespaceURI = null; + private String inputNamespaceURI = null; + private String outputNamespaceURI = null; public MethodInfo() { this.methodname = null; @@ -169,16 +170,30 @@ /** * @param string */ - public void setNamespaceURI(String string) { - namespaceURI = string; + public void setInputNamespaceURI(String string) { + inputNamespaceURI = string; } /** * @param string */ - public String getNamespaceURI() { - return namespaceURI; + public String getInputNamespaceURI() { + return inputNamespaceURI; } + + /** + * @param string + */ + public void setOutputNamespaceURI(String string) { + outputNamespaceURI = string; + } + + /** + * @param string + */ + public String getOutputNamespaceURI() { + return outputNamespaceURI; + } /** * @return QName --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]