WS binding: ClassCastException: org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLInterfaceImpl incompatible with org.apache.tuscany.sca.interfacedef.java.JavaInterface ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: TUSCANY-4000 URL: https://issues.apache.org/jira/browse/TUSCANY-4000 Project: Tuscany Issue Type: Bug Components: Java SCA Axis Binding Extension Affects Versions: Java-SCA-2.0-Beta3 Reporter: Rashmi Hunt WS Binding reference with WSDL interface with a WSDL callback interface <---invoking---> WS Binding Service with WSDL interface with a WSDL callback interface throws ClassCastException when Tuscany tries to cast WSDLInterfaceImpl to JavaInterface at JavaImplementationInvoker.invoke() method, at (JavaInterface)interfaze.getCallbackInterface() // If there is a callback interface and the implementation is stateless, we need to // inject callbacks at invocation time. For Composite scope, this has already been done. if (( interfaze.getCallbackInterface() != null ) && (scopeContainer.getScope().equals(Scope.STATELESS))){ injectCallbacks(wrapper, (JavaInterface)interfaze.getCallbackInterface()); } This exception occurs when Web Service message reaches service implementation which eventually invokes JavaImplementationInvoker.invoke() The above code is assuming that interfaze.getCallbackInterface() will return instance of JavaInterface. What if the callback interface on both service and reference are using WSDL interface? Shouldn't above logic take care of WSDL interface case? Exception stack, Caused by: java.lang.ClassCastException: org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLInterfaceImpl incompatible with org.apache.tuscany.sca.interfacedef.java.JavaInterface at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:117) ............... at org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl.invoke(InterceptorAsyncImpl.java:58) at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:126) at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:109) at org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl.invoke(RuntimeEndpointImpl.java:328) components, <component name="MyComponent"> <implementation.java class="samples.MyServiceImpl"/> <service name="MyService"> <interface.wsdl interface="http://www.mybank.com/account#wsdl.interface(MyService)" callbackInterface="http://www.mybank.com/account#wsdl.interface(MyServiceCallback)" /> <binding.ws wsdlElement="http://www.mybank.com/account#wsdl.port(MyService/MyServicePort)" /> <callback> <binding.ws name="MyServiceCallback"/> </callback> </service> </component> <component name="MySummaryService"> <implementation.java class="samples.MySummaryServiceImpl"/> <reference name="myService"> <interface.wsdl interface="http://www.mybank.com/account#wsdl.interface(MyService)" callbackInterface="http://www.mybank.com/account#wsdl.interface(MyServiceCallback)" /> <binding.ws wsdlElement="http://www.mybank.com/account#wsdl.port(MyService/MyServicePort)" /> <callback> <binding.ws wsdlElement="http://www.mybank.com/account#wsdl.binding(MyServiceCallback)"/> </callback> </reference> </component> -- 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