Hi, I found the issue all objects use as type should have - A default constructor (without parameters), note it don't use the parent default constructor - Getter and setter for each attributs
So You don't need any factory class for marchaling or unmarchaling just XmlType and XmlRootElement annotations. Willy ----- Message d'origine ---- De : "[email protected]" <[email protected]> À : [email protected] Envoyé le : Mercredi, 11 Mars 2009, 21h08mn 53s Objet : jaxb + spring + complex object Hi, I am using following Framework / library: - Spring 2.5.6 - CXF 2.1.3 - jaxb for databinding (cxf default) I declare the following service: @WebService(serviceName = "PerValueObjectService",portName = "PerValueObjectServicePort",targetNamespace="http://pper.foo.com/pervalueobjectservice";) public class PerValueObjectServiceEndPoint implements PerValueObjectService { ... @Override @WebResult(name="DomainValueObject") public DomainValueObject getDomain(@WebParam(name = "domainId")int domainId) throws PerException { ... } I declare DomainValueObject class as: @XmlRootElement(name="DomainValueObject") @XmlType(name="DomainValueObject") public class DomainValueObject extends AbstractBaseValueObject { ... } and I define into my Spring context the service as: <!-- Value object service --> <bean id="perValueObjectServiceEndPoint" class="ch.ciip.per.service.ws.PerValueObjectServiceEndPoint"> <property name="perValueObjectService" ref="perValueObjectService"/> </bean> <jaxws:endpoint id="perValueObjectServiceWs" implementor="#perValueObjectServiceEndPoint" address="/ValueObjectService"/> My problem is the jaxb doesn't define complex type DomainValueObject into wsdl and got the error: Marshalling Error: com.per.valueobject.DomainValueObject is not known to this context How to tell jaxb where/how to find my class DomainValueObject? Thanks for help or advice Willy
