You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Hervé BARRAULT <he...@gmail.com> on 2012/06/05 13:51:16 UTC
org.xml.sax.SAXParseException: s4s-elt-invalid-content.1: The content
of 'schema' is invalid. Element 'import' is invalid, misplaced, or occurs too often.
Hi,
I'm using camel 2.4.0.fuse-00-00 (linked to cxf 2.2.9.fuse-01-00).
I have deployed 2 webservices using camel-cxf :
<cxf:cxfEndpoint id="notificationServiceEndpoint"
address="http://0.0.0.0:8081/notification"
serviceClass="com.example.cxf.NotificationPojoProvider">
<cxf:properties>
<entry key="schema-validation-enabled" value="true"/>
<entry key="jaxb-validation-event-handler">
<bean class="com.example.cxf.MyValidationHandler" />
</entry>
</cxf:properties>
</cxf:cxfEndpoint>
<cxf:cxfEndpoint id="subscriptionServiceEndpoint"
address="http://0.0.0.0:8081/subscription"
serviceClass="com.example.cxf.SubscriptionPojoProvider">
<cxf:properties>
<entry key="schema-validation-enabled" value="true"/>
<entry key="jaxb-validation-event-handler">
<bean class="com.example.cxf.MyValidationHandler" />
</entry>
</cxf:properties>
</cxf:cxfEndpoint>
These two services are defined in the same WSDL.
When using these two endpoints, I have systematically the following warning
due to an Exception (twice).
13:22:36,240 | WARN | 2968410@qtp-20212684-13 | EndpointReferenceUtils |
SAXException for newSchema()
org.xml.sax.SAXParseException: s4s-elt-invalid-content.1: The content of
'schema' is invalid. Element 'import' is invalid, misplaced, or occurs too
often.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:2537)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:2528)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.traverseSchemas(XSDHandler.java:1274)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:579)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:552)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:519)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:485)
at
com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:211)
at
org.apache.cxf.wsdl.EndpointReferenceUtils.createSchema(EndpointReferenceUtils.java:712)
at
org.apache.cxf.wsdl.EndpointReferenceUtils.getSchema(EndpointReferenceUtils.java:739)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.setSchemaOutMessage(AbstractOutDatabindingInterceptor.java:179)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.getDataWriter(AbstractOutDatabindingInterceptor.java:173)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:115)
at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:78)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:110)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:312)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:276)
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
To be more precise : If I send my first message to Notification endpoint, I
have this exception only on Subscription Endpoint (for all messages) and
vice versa.
Does any have done a similar test before ?
How can I avoid this warning ?
Regards
Hervé
PS : Sorry i posted on both camel and cxf mailing list as I don't know if
it is more a cxf or a camel issue.