You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Oleg Zenzin (JIRA)" <ji...@apache.org> on 2009/05/18 23:21:45 UTC

[jira] Created: (AXIS2-4350) RPCUtil handles wrapped style of SOAP messages wrongly.

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.


[jira] Commented: (AXIS2-4350) RPCUtil handles wrapped style of SOAP messages wrongly.

Posted by "Victor Downs (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (AXIS2-4350) RPCUtil handles wrapped style of SOAP messages wrongly.

Posted by "Oleg Zenzin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718560#action_12718560 ] 

Oleg Zenzin commented on AXIS2-4350:
------------------------------------

The suggested solution follows one of three known SOAP/WSDL patterns:
doc/lit, rpc and doc/wrapped. The doc/wrapped is considered the most portable one.

Setting rpc style will not resolve issue for those web-services defined with doc/wrapped (and btw - this is default for java2wsdl).

Why the solution must not touch the code? The bug is in the code.

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


[jira] Commented: (AXIS2-4350) RPCUtil handles wrapped style of SOAP messages wrongly.

Posted by "Oleg Zenzin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718599#action_12718599 ] 

Oleg Zenzin commented on AXIS2-4350:
------------------------------------

No problem, I'm pretty sure though the problem is methodElement.getParent() instead of methodElement.getFirstElement(), that's why I've attached the message itself. inAxisMessage.isWrapped() worked right in the case of this message, the problem was that code treated methodElement as if it is the child of method element.

I've applied this change in the axis2 source code and shipped for our system which is web-services orchestrating system, works perfect. I'm not sure though we use RPC style. I guess some test cases would not heart.

Thanks for discussion!

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


[jira] Commented: (AXIS2-4350) RPCUtil handles wrapped style of SOAP messages wrongly.

Posted by "Pétur Runólfsson (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (AXIS2-4350) RPCUtil handles wrapped style of SOAP messages wrongly.

Posted by "Pétur Runólfsson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718553#action_12718553 ] 

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

This is made worse because passing -st rpc to java2wsdl is broken by issue AXIS2-3075

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


[jira] Commented: (AXIS2-4350) RPCUtil handles wrapped style of SOAP messages wrongly.

Posted by "Stefan Geelen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779914#action_12779914 ] 

Stefan Geelen commented on AXIS2-4350:
--------------------------------------

We are having exactly the same problem. 

We are trtying to upgrade from Axis2/Java 1.4.1 + Rampart and this is the last issue we have. 

This is blocking for us. 

Will this be addressed in 1.6 (or sooner ) ? 

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


[jira] Commented: (AXIS2-4350) RPCUtil handles wrapped style of SOAP messages wrongly.

Posted by "Pétur Runólfsson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718519#action_12718519 ] 

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

I ran into this problem also. I think that the problem isn't in RPCUtil, instead the problem is that inAxisMessage.isWrapped() is incorrectly returning false, causing the code in the else block to be executed instead of the code in the if block. 

The only way to make isWrapped return true (short of modifying the code) seems to be to add style="rpc" to the soap:operation elements in the WSDL. The default value for style seems to be style="document". This seems to be a bug somewhere in Axis (either in Java2wsdl or in the wsdl parser) because this breaks simple usage like:

1. Write simple POJO web service.
2. Run it through java2wsdl with no extra options
3. Deploy service with generated wsdl

The service in this case is unusable because java2wsdl by default generates a wsdl in the wrapped style, but with style="document". When the service is deployed, Axis assumes that the wsdl style is not wrapped.

An interesting angle is that if Axis generates the wsdl at runtime, exactly the same wsdl is generated (with style="document"), but everything works (so it seems that isWrapped gets somehow set to true in this case).


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


[jira] Commented: (AXIS2-4350) RPCUtil handles wrapped style of SOAP messages wrongly.

Posted by "Pétur Runólfsson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718890#action_12718890 ] 

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

After digging around a bit, it seems this bug was caused by the patch attached to issue AXIS2-4058. This patch in effect caused isWrapped to always be false for document style web services which are deployed with wsdl files. Since the default in java2wsdl.sh is to generate document/wrapped, this means that a web service created with the default options to java2wsdl doesn't work when deployed with the default settings.

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