cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <nitin.tiw...@thomsonreuters.com>
Subject SoapHeader with Anonymous ComplexType attribute
Date Tue, 19 Jul 2011 13:19:38 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message