Strange message receiver XSLT template syntax and generated element names
-------------------------------------------------------------------------

                 Key: AXIS2-5171
                 URL: https://issues.apache.org/jira/browse/AXIS2-5171
             Project: Axis2
          Issue Type: Bug
          Components: codegen, modules
    Affects Versions: 1.6.1
            Reporter: Andrew Nastyn


Hi, hope this is correct place to post this.
There is some problem with MessageReceiver code generation.

Why does Axis2 1.6.x use operation name as a response element name?
For example, if I have the following operation definition:
<wsdl:operation name="SomeOperation">
        <wsdl:input message="tns:SomeOperationRequest"></wsdl:input>
        <wsdl:output message="tns:SomeOperationResponse"></wsdl:output>
</wsdl:operation>

Axis2 1.6.x will generate me:
1) 
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
   <soapenv:Body>
      <ns5:someOperation xmlns:ns5="...">
              ....
      </ns5:someOperation>
   </soapenv:Body>
</soapenv:Envelope>

while Axis2 1.5.x will generate:
2)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
   <soapenv:Body>
      <ns5:SomeOperationResponse xmlns:ns5="...">
              ....
      </ns5:SomeOperationResponse>
   </soapenv:Body>
</soapenv:Envelope>

In the first case it uses operation name, in the second one response element 
name.

MessageReceiverTemplate code:
1) 
branches/1_5/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
<xsl:when test="string-length(normalize-space($returntype)) &gt; 0">
      envelope = toEnvelope(getSOAPFactory(msgContext), <xsl:value-of 
select="$returnvariable"/>, false);
</xsl:when>

2) 
branches/1_6/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
<xsl:when test="string-length(normalize-space($returntype)) &gt; 0">
    envelope = toEnvelope(getSOAPFactory(msgContext), <xsl:value-of 
select="$returnvariable"/>, false, new javax.xml.namespace.QName("<xsl:value-of 
select="$namespace"/>",
                                                                                
                                    "<xsl:value-of select="$name"/>"));
</xsl:when>
The third parameter here is the response element name.

Maybe it should be something like "<xsl:value-of select="$returnvariable"/>"  
instead of "<xsl:value-of select="$name"/>" or it is expected result and not a 
bug? Then how can I change this behavior? Thanks!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org
For additional commands, e-mail: java-dev-h...@axis.apache.org

Reply via email to