Hi I'm writing a CXF java-first Soap service, and I have soapheader elements' schemas as the premise.
I generated the Jaxb classes from these schemas and now trying to use these classes as @WebParam in my SEI. I'm facing issue for one element which is defined by an anonymous complex type, then there is a issue in defining the Holder object, since I don't have the SchemaType class generated for this element. Here is my SEI Definition: public MyObject foo(@WebParam(name = "x") GenericRequest x, @WebParam(mode = Mode.INOUT, header = true, name = "y", targetNamespace="xxx1") Holder<TypeY> y, @WebParam(mode = Mode.INOUT, header = true, name = "z", targetNamespace="xxx2") Holder<ElementZ> z); Following error occurs on tomcat startup: SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'service': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: java.lang.ClassCastException: org.apache.ws.commons.schema.XmlSchemaElement cannot be cast to org.apache.ws.commons.schema.XmlSchemaType How to define the schematype in such cases? regards Nitin