I am wondering how I could work around getting CXF to support
org.apache.ws.commons.schema.XmlSchemaChoice

I have generated java code using JAXB for a XML Schema that has choices in
it e.g.

<xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element ref="topic"/>
          <xs:element ref="association"/>
</xs:choice>

However when I POST in an valid XML message the IriDecoderHelper class barks
the below exception:

Is there any way to work around this, other than coding in support for
XmlSchemaChoice in IriDecoderHelper.interopolateParams(...) method?

(BTW the offending line is here: 
for (int i = 0; i < seq.getItems().getCount(); i++) {
            XmlSchemaElement elChild =
(XmlSchemaElement)seq.getItems().getItem(i);
            Param param = null;
)


Oct 28, 2008 3:28:24 PM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
java.lang.ClassCastException: org.apache.ws.commons.schema.XmlSchemaChoice
incompatible with org.apache.ws.commons.schema.XmlSchemaElement
        at
org.apache.cxf.binding.http.IriDecoderHelper.interopolateParams(IriDecoderHelper.java:307)
        at
org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.mergeParams(URIParameterInInterceptor.java:122)
        at
org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.handleMessage(URIParameterInInterceptor.java:103)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
        at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
        at
org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
        at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:214)
        at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:113)
        at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170)
        at
org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:148)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:803)


-- 
View this message in context: 
http://www.nabble.com/Support-for-XMLSchemaChoice-tp20215025p20215025.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to