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

Victor Downs commented on AXIS2-4350:
-------------------------------------

This is my first post on JIRA, so I hope it can actually be of any use.

After doing a little bit of research I believe the issue should be fixed on 
class WSDL11ToAxisServiceBuilder. The class first browses the WSDL and 
classifies its operations (findWrappableBindingOperations method), storing 
their definitions in a global array named wrappableBOEs. As Pétur correctly 
stated before, this method assumes all operations are doc/lit/wrapped by 
default since they aren't added to this global array.

Later on, the class loads the service bindings (populateBinding method) and 
stores their corresponding request and response messages; unfortunately, this 
other method assumes that operations not included in the wrappableBOEs array 
are unwrapped by default, so operations are stored as doc/lit/unwrapped: 

      BindingOperationEntry boe = find(wrappableBOEs, wsdl4jBindingOperation);
      boolean isWrapped = (boe == null) ? false : boe.isWrappedInput();

This flag ends up in the AxisMessage object that RPCUtil later uses to map 
requests.

Probably the safest bet would be to explicitly add the operation as 
doc/lit/wrapped to the wrappableBOEs array on the 
findWrappableBindingOperations method.

> 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.

Reply via email to