cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xilai Dai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-5169) the schema-validation-enabled property doesn't work for OUT message validation
Date Wed, 27 Nov 2013 03:06:36 GMT

    [ https://issues.apache.org/jira/browse/CXF-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13833396#comment-13833396
] 

Xilai Dai commented on CXF-5169:
--------------------------------

Tested with karaf 2.3.2 + cxf 2.7.8 + dom4j
but got fault response and exception in the log.
{code}
      <soap:Fault>
         <faultcode>soap:Client</faultcode>
         <faultstring>Could not parse the XML stream caused by: javax.xml.stream.XMLStreamException:
null.</faultstring>
      </soap:Fault>
{code}
2013-11-27 11:00:09,877 | WARN  | tp1372258332-106 | PhaseInterceptorChain            | ache.cxf.common.logging.LogUtils
 452 | 83 - org.apache.cxf.cxf-api - 2.7.8 | Interceptor for {http://www.talend.org/service/}DemoService#{http://www.talend.org/service/}DemoServiceOperation
has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not parse the XML stream caused by: javax.xml.stream.XMLStreamException:
null.
	at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:158)[84:org.apache.cxf.cxf-rt-core:2.7.8]
	at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:79)[84:org.apache.cxf.cxf-rt-core:2.7.8]
	at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:63)[84:org.apache.cxf.cxf-rt-core:2.7.8]
	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:192)[83:org.apache.cxf.cxf-api:2.7.8]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)[83:org.apache.cxf.cxf-api:2.7.8]
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[83:org.apache.cxf.cxf-api:2.7.8]
	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)[113:org.apache.cxf.cxf-rt-transports-http:2.7.8]
	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:248)[113:org.apache.cxf.cxf-rt-transports-http:2.7.8]
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:222)[113:org.apache.cxf.cxf-rt-transports-http:2.7.8]
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:153)[113:org.apache.cxf.cxf-rt-transports-http:2.7.8]
	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:167)[113:org.apache.cxf.cxf-rt-transports-http:2.7.8]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)[113:org.apache.cxf.cxf-rt-transports-http:2.7.8]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:206)[113:org.apache.cxf.cxf-rt-transports-http:2.7.8]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)[90:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.2]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)[113:org.apache.cxf.cxf-rt-transports-http:2.7.8]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)[101:org.eclipse.jetty.servlet:7.6.8.v20121106]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)[101:org.eclipse.jetty.servlet:7.6.8.v20121106]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[111:org.ops4j.pax.web.pax-web-jetty:1.1.14]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)[99:org.eclipse.jetty.server:7.6.8.v20121106]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:556)[100:org.eclipse.jetty.security:7.6.8.v20121106]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[99:org.eclipse.jetty.server:7.6.8.v20121106]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)[99:org.eclipse.jetty.server:7.6.8.v20121106]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:124)[111:org.ops4j.pax.web.pax-web-jetty:1.1.14]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)[101:org.eclipse.jetty.servlet:7.6.8.v20121106]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)[99:org.eclipse.jetty.server:7.6.8.v20121106]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)[99:org.eclipse.jetty.server:7.6.8.v20121106]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[99:org.eclipse.jetty.server:7.6.8.v20121106]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:81)[111:org.ops4j.pax.web.pax-web-jetty:1.1.14]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[99:org.eclipse.jetty.server:7.6.8.v20121106]
	at org.eclipse.jetty.server.Server.handle(Server.java:363)[99:org.eclipse.jetty.server:7.6.8.v20121106]
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)[99:org.eclipse.jetty.server:7.6.8.v20121106]
	at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)[99:org.eclipse.jetty.server:7.6.8.v20121106]
	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:931)[99:org.eclipse.jetty.server:7.6.8.v20121106]
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:992)[99:org.eclipse.jetty.server:7.6.8.v20121106]
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856)[95:org.eclipse.jetty.http:7.6.8.v20121106]
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)[95:org.eclipse.jetty.http:7.6.8.v20121106]
	at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)[99:org.eclipse.jetty.server:7.6.8.v20121106]
	at org.eclipse.jetty.server.nio.BlockingChannelConnector$BlockingChannelEndPoint.run(BlockingChannelConnector.java:298)[99:org.eclipse.jetty.server:7.6.8.v20121106]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[93:org.eclipse.jetty.util:7.6.8.v20121106]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[93:org.eclipse.jetty.util:7.6.8.v20121106]
	at java.lang.Thread.run(Thread.java:722)[:1.7.0_05]
Caused by: javax.xml.stream.XMLStreamException
	at org.apache.cxf.databinding.source.XMLStreamDataReader.validate(XMLStreamDataReader.java:253)[84:org.apache.cxf.cxf-rt-core:2.7.8]
	at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:111)[84:org.apache.cxf.cxf-rt-core:2.7.8]
	... 40 more
{code}

{code}

> the schema-validation-enabled property doesn't work for OUT message validation
> ------------------------------------------------------------------------------
>
>                 Key: CXF-5169
>                 URL: https://issues.apache.org/jira/browse/CXF-5169
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.7.6
>            Reporter: Xilai Dai
>            Assignee: Freeman Fang
>             Fix For: 2.6.10, 2.7.7, 3.0.0-milestone2
>
>         Attachments: test_validation_service.zip, test_validation_service_updated.zip
>
>
> With this configuration: 
> {code}
> <jaxws:endpoint ...>
> ......
>   <jaxws:properties>
>       <entry key="schema-validation-enabled" value="true" />
>   </jaxws:properties>
> </jaxws:endpoint>
> {code}
> then, the schema validation for Request(IN) message works well, but it doesn't take any
effect for Response(OUT) message.
> the schema (from WSDL) piece example which I used is:
> {code}
> <xsd:element name="DemoServiceOperationResponse">
>     <xsd:complexType>
>         <xsd:sequence>
>             <xsd:element name="out">
>                   <xsd:simpleType>
>                        <xsd:restriction base="xsd:string">
>                        <xsd:minLength value="20"></xsd:minLength>
>                        <xsd:maxLength value="30"></xsd:maxLength>
>                        </xsd:restriction>
>                   </xsd:simpleType>
>              </xsd:element>
>         </xsd:sequence>
>     </xsd:complexType>
> </xsd:element>
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message