axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pétur Runólfsson (JIRA) <j...@apache.org>
Subject [jira] Commented: (AXIS2-4350) RPCUtil handles wrapped style of SOAP messages wrongly.
Date Thu, 11 Jun 2009 18:07:07 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-4350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718572#action_12718572
] 

Pétur Runólfsson commented on AXIS2-4350:
-----------------------------------------

> Why the solution must not touch the code?

I'm sorry, I didn't mean to imply that the bug should not be fixed. What I meant to say was:

* I think there's a problem in Axis, but I don't think the problem is in the code in RPCUtil
posted above. The problem seems to be that inAxisMessage.isWrapped() is incorrectly returning
false when it should return true.
* As far as I can tell, AxisMessage.isWrapped() currently only returns true for web services
with style="rpc", or if the wsdl is generated on the server (not deployed in the .aar).

This means that if using style="rpc" is acceptable to you, you can use it to work around the
issue, but I didn't mean to suggest this as a solution to the issue.


> RPCUtil handles wrapped style of SOAP messages wrongly. 
> --------------------------------------------------------
>
>                 Key: AXIS2-4350
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4350
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.5
>            Reporter: Oleg Zenzin
>
> Class http://svn.apache.org/repos/asf/webservices/axis2/branches/java/1_5/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java
in the method invokeServiceClass() has following lines:
>            if (inAxisMessage.isWrapped()) {
>                 objectArray = RPCUtil.processRequest(methodElement,
>                         method, inMessage.getAxisService().getObjectSupplier());
>             } else {
>                 objectArray = RPCUtil.processRequest((OMElement) methodElement.getParent(),
>                         method, inMessage.getAxisService().getObjectSupplier());
>             }
> which wrongly handles the wrapped style of SOAP messages. Like, for instance this message:
> <?xml version='1.0' encoding='UTF-8'?> 
>    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

>       <soapenv:Header> 
>          <addr:To xmlns:addr="http://www.w3.org/2005/08/addressing">http://localhost:8383/bre/services/dtws_tryme_newdecisiontable&lt;/addr:To>

>          <addr:Action xmlns:addr="http://www.w3.org/2005/08/addressing">urn:invokeDecisionTable</addr:Action>

>          <addr:ReplyTo xmlns:addr="http://www.w3.org/2005/08/addressing"> 
>             <addr:Address>http://www.w3.org/2005/08/addressing/anonymous&lt;/addr:Address>

>          </addr:ReplyTo> 
>          <addr:MessageID xmlns:addr="http://www.w3.org/2005/08/addressing">uuid:53870713-5719-457f-9965-0ebd111e7dda-5</addr:MessageID>

>       </soapenv:Header> 
>       <soapenv:Body> 
>          <invokeDecisionTable xmlns="http://newdecisiontable.tryme"> 
>             <ns:param0 xmlns:ns="http://newdecisiontable.tryme"> 
>                <ax25:person xmlns:ax25="http://newdecisiontable.tryme/xsd"> 
>                   <ax26:age xmlns:ax26="http://newdecisiontable.tryme/bre" /> 
>                   <ax26:greeting xmlns:ax26="http://newdecisiontable.tryme/bre" />

>                   <name xmlns="http://newdecisiontable.tryme/bre" xmlns:ax26="http://newdecisiontable.tryme/bre">Oleg</name>

>                </ax25:person> 
>             </ns:param0> 
>          </invokeDecisionTable> 
>       </soapenv:Body> 
>    </soapenv:Envelope>
> will not be deserialized because BeanUtil.deserialize(methodElement, parameters, objectSupplier)
will be fed with element <soapenv:Body> instead of element <ns:param0>.
> The fix is pretty simple, instead of above code there should be:
>             if (inAxisMessage.isWrapped()) {
>                 objectArray = RPCUtil.processRequest(methodElement.getFirstElement(),
>                         method, inMessage.getAxisService().getObjectSupplier());
>             } else {
>                 objectArray = RPCUtil.processRequest(methodElement,
>                         method, inMessage.getAxisService().getObjectSupplier());
>             }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message