[ 
https://issues.apache.org/jira/browse/TUSCANY-2316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596708#action_12596708
 ] 

Mike Edwards commented on TUSCANY-2316:
---------------------------------------

Scott,

The ClassCastExceptions occur in the BPELInvoker.createInvocationMessage(...) 
method and are caused by that code being delivered message arguments that are 
not the DOM Elements that it expects.

The InterfaceContract overwrite means that Axis2 related OMElements are 
delivered.

Fixing the InterfaceContract overwrite in Axis2ReferenceBindingProvider and 
Axis2ServiceBindingProvider (by cloning the Interface...) then reveals a second 
problem, this time associated with the DataBinding code.

The DataBinding code converting from OMElements to DOM generates a message 
which has a Document root element, while the code in createInvocationMessage 
expects only the internal Element elements.  The simplest fix for this is to 
modify the createInvocationMessage code to strip off the Document element, if 
there is one.

Doing this then reveals yet another problem, this time with the exact form of 
the elements in the DOM tree passed in from the DataBinding code - this causes 
an exception within the ODE BPEL server code.  Still investigating that one 
with Luciano....

> Axis2 Binding Provider does not handle services & references with WSDL 
> interfaces correctly
> -------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2316
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2316
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Axis Binding Extension
>    Affects Versions: Java-SCA-1.2
>         Environment: - any -
>            Reporter: Mike Edwards
>            Assignee: Mike Edwards
>             Fix For: Java-SCA-Next
>
>         Attachments: sample-helloworld-bpel-ws.zip
>
>
> Where a component has a service or reference which has an interface which 
> uses a WSDL interface definition, the Axis2 binding providers incorrectly 
> overwrite the DataBinding specified by the component implementation and 
> impose the OMElement binding used by Axis2 - this causes class cast 
> exceptions when the service or reference is invoked.
> The problem is caused by failure to copy the InterfaceContract definition in 
> the Axis2ReferenceBindingProvider and Axis2ServiceBindingProvider 
> constructors, when the InterfaceContract is not a JavaInterfaceContract.  The 
> lack of a copy means that the Axis binding provider then uses the original 
> contract object as its own and overwrites aspects of that contract - 
> including the databinding to use.
> I've attached a sample application that I created which found this problem

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