Hi, Please see the discussion at: http://markmail.org/message/votvn5nyqzx5ciam?q=IllegalAnnotationsException+-+exposing+soap+service
Thanks, Raymond From: Tuscany User Sent: Saturday, February 28, 2009 7:17 PM To: [email protected] Subject: org.apache.tuscany.sca.databinding.TransformationException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException Hi all, I have this situation where I have to expose a method which has an interface as an argument into a SOAP service (binding.ws). This interface is being implemented by a couple of classes which are jaxb annotated. Basically these classes that implement the interface are JAXB classes. So in code this looks like this public class Test{ ... public void testMethod(A a){ //The type A here is an interface. } ... } @XmlRootElement(name = "A1", namespace = "http://server.fromjava/jaxws") @XmlAccessorType(XmlAccessType.FIELD) public class A1 implements A { ... } @XmlRootElement(name = "A2", namespace = "http://server.fromjava/jaxws") @XmlAccessorType(XmlAccessType.FIELD) public class A2 implements A { ... } When Test class above is exposed as a SOAP service the below exception happens then the method 'testMethod' is invoked org.apache.tuscany.sca.databinding.TransformationException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions A is an interface, and JAXB can't handle interfaces. this problem is related to the following location: ..... A does not have a no-arg default constructor. this problem is related to the following location: ..... Please advise on what appropriate annotations should be added to the Test class to make this work with binding.ws. FYI, using Tuscany 1.4 release. Thanks.
