Are you using Tuscany 1.x? If so, there is databinding-sdo module can deal with the SDO DataObject. We haven't yet ported it to 2.x though.
Thanks, Raymond From: Malisetti, Ramanjaneyulu Sent: Wednesday, February 03, 2010 8:01 AM To: [email protected] Subject: RE: Using Interfaces as parameter types of SCA service composite operation I would like to simplify the following issue and glad to receive suggestion from this team. Issue is .. If a Remotable interface has an API and that API takes DataObject as a parameter (commonj.sdo.DataObject) and composite binds a service based this interface to JMS binding. Is this supported usecase? To avoid below exception, what is the right way of doing. I appreciate your response. Regards Raman From: Koganti, Naga [mailto:[email protected]] Sent: Monday, 1 February 2010 1:31 PM To: [email protected] Subject: Using Interfaces as parameter types of SCA service composite operation Hi, I have one service on server composite having the following method public String start(String operID, DataObject selector, DataObject operParams, OperationListener listener, String refID) throws Exception; In above method the DataObject I am using are SDO DataObjects of type commonj.sdo.DataObject and the OperationListener is our own interface When I try to call the start method from the service client it is giving following exception If I try to change the DataObject to org.apache.tuscany.sdo.impl.DataObjectImpl and OperationListener to its implementation type it start working. Can anyone explain why the server side service operation parameter types have to concrete classes instead of Interface types. Is this a constraint in Apache Tuscany SCA? Is there any way we can specify what Implementation class types of Interface needs to be used as part of composite xml file? Exception in thread "main" org.apache.tuscany.sca.databinding.TransformationException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 4 counts of IllegalAnnotationExceptions commonj.sdo.DataObject is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at commonj.sdo.DataObject at protected commonj.sdo.DataObject com.ca.ucf.connector.sca.jaxws.Start.arg1 at com.ca.ucf.connector.sca.jaxws.Start commonj.sdo.DataObject does not have a no-arg default constructor. this problem is related to the following location: at commonj.sdo.DataObject at protected commonj.sdo.DataObject com.ca.ucf.connector.sca.jaxws.Start.arg1 at com.ca.ucf.connector.sca.jaxws.Start com.ca.connector.runtime.OperationListener is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at com.ca.connector.runtime.OperationListener at protected com.ca.connector.runtime.OperationListener com.ca.ucf.connector.sca.jaxws.Start.arg3 at com.ca.ucf.connector.sca.jaxws.Start com.ca.connector.runtime.OperationListener does not have a no-arg default constructor. this problem is related to the following location: at com.ca.connector.runtime.OperationListener at protected com.ca.connector.runtime.OperationListener com.ca.ucf.connector.sca.jaxws.Start.arg3 at com.ca.ucf.connector.sca.jaxws.Start at org.apache.tuscany.sca.databinding.jaxb.axiom.JAXB2OMElement.transform(JAXB2OMElement.java:60) at org.apache.tuscany.sca.databinding.jaxb.axiom.JAXB2OMElement.transform(JAXB2OMElement.java:1) at org.apache.tuscany.sca.databinding.DefaultTransformerExtensionPoint$LazyPullTransformer.transform(DefaultTransformerExtensionPoint.java:209) at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate(MediatorImpl.java:114) at org.apache.tuscany.sca.core.databinding.transformers.Input2InputTransformer.transform(Input2InputTransformer.java:181) at org.apache.tuscany.sca.core.databinding.transformers.Input2InputTransformer.transform(Input2InputTransformer.java:1) at org.apache.tuscany.sca.databinding.DefaultTransformerExtensionPoint$LazyPullTransformer.transform(DefaultTransformerExtensionPoint.java:209) at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate(MediatorImpl.java:114) at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediateInput(MediatorImpl.java:432) at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke(DataTransformationInterceptor.java:70) at org.apache.tuscany.sca.core.invocation.impl.JDKInvocationHandler.invoke(JDKInvocationHandler.java:289) at org.apache.tuscany.sca.core.invocation.impl.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154) at $Proxy24.start(Unknown Source) at com.ca.ucf.connector.sca.UnifiedConnectorServiceClient.start(UnifiedConnectorServiceClient.java:171) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:135) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:61) at org.apache.tuscany.sca.binding.sca.provider.SCABindingInvoker.invoke(SCABindingInvoker.java:61) at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:61) at org.apache.tuscany.sca.core.invocation.impl.JDKInvocationHandler.invoke(JDKInvocationHandler.java:289) at org.apache.tuscany.sca.core.invocation.impl.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154) at $Proxy24.start(Unknown Source) at com.ca.ucf.connector.sca.UnifiedConnectorServiceClientTestCase.main(UnifiedConnectorServiceClientTestCase.java:120) Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 4 counts of IllegalAnnotationExceptions commonj.sdo.DataObject is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at commonj.sdo.DataObject at protected commonj.sdo.DataObject com.ca.ucf.connector.sca.jaxws.Start.arg1 at com.ca.ucf.connector.sca.jaxws.Start commonj.sdo.DataObject does not have a no-arg default constructor. this problem is related to the following location: at commonj.sdo.DataObject at protected commonj.sdo.DataObject com.ca.ucf.connector.sca.jaxws.Start.arg1 at com.ca.ucf.connector.sca.jaxws.Start com.ca.connector.runtime.OperationListener is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at com.ca.connector.runtime.OperationListener at protected com.ca.connector.runtime.OperationListener com.ca.ucf.connector.sca.jaxws.Start.arg3 at com.ca.ucf.connector.sca.jaxws.Start com.ca.connector.runtime.OperationListener does not have a no-arg default constructor. this problem is related to the following location: at com.ca.connector.runtime.OperationListener at protected com.ca.connector.runtime.OperationListener com.ca.ucf.connector.sca.jaxws.Start.arg3 at com.ca.ucf.connector.sca.jaxws.Start at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:438) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:202) at javax.xml.bind.ContextFinder.find(ContextFinder.java:363) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522) at org.apache.tuscany.sca.databinding.jaxb.JAXBContextCache$1.run(JAXBContextCache.java:138) at org.apache.tuscany.sca.databinding.jaxb.JAXBContextCache$1.run(JAXBContextCache.java:1) at java.security.AccessController.doPrivileged(Native Method) at org.apache.tuscany.sca.databinding.jaxb.JAXBContextCache.newJAXBContext(JAXBContextCache.java:127) at org.apache.tuscany.sca.databinding.jaxb.JAXBContextCache.getJAXBContext(JAXBContextCache.java:276) at org.apache.tuscany.sca.databinding.jaxb.JAXBContextHelper.createJAXBContext(JAXBContextHelper.java:203) at org.apache.tuscany.sca.databinding.jaxb.JAXBContextHelper.createJAXBContext(JAXBContextHelper.java:235) at org.apache.tuscany.sca.databinding.jaxb.JAXBContextHelper.createJAXBContext(JAXBContextHelper.java:98) at org.apache.tuscany.sca.databinding.jaxb.axiom.JAXB2OMElement.transform(JAXB2OMElement.java:58) ... 25 more
