[
https://issues.apache.org/jira/browse/CXF-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13755950#comment-13755950
]
Xilai Dai commented on CXF-5169:
--------------------------------
also, I tried to install cxf-wstx-msv-validation into container before deploy
the attached service.
{code}
install -s wrap:file:///D:/.../msv-20050913.jar
install -s mvn:org.apache.cxf/cxf-wstx-msv-validation/2.7.7-SNAPSHOT
{code}
but still got exceptions:
{code}
16:06:22,882 | WARN | qtp351267627-104 | pse.jetty.servlet.ServletHandler 539
| 58 - org.eclipse.jetty.util - 7.6.8.v20121106 | Error for
/services/DemoService
java.lang.NoClassDefFoundError:
org/apache/cxf/wstx_msv_validation/ResolvingGrammarReaderController
at
org.apache.cxf.wstx_msv_validation.W3CMultiSchemaFactory.loadSchemas(W3CMultiSchemaFactory.java:59)
at
org.apache.cxf.wstx_msv_validation.Stax2ValidationUtils.getValidator(Stax2ValidationUtils.java:124)
at
org.apache.cxf.wstx_msv_validation.Stax2ValidationUtils.setupValidation(Stax2ValidationUtils.java:83)
at
org.apache.cxf.wstx_msv_validation.WoodstoxValidationImpl.setupValidation(WoodstoxValidationImpl.java:73)
at
org.apache.cxf.databinding.source.XMLStreamDataReader.validate(XMLStreamDataReader.java:223)
at
org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:107)
at
org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:75)
at
org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:59)
at
org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:189)[122:org.apache.cxf.cxf-api:2.7.7.SNAPSHOT]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)[122:org.apache.cxf.cxf-api:2.7.7.SNAPSHOT]
{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: 3.0.0, 2.6.10, 2.7.7
>
> Attachments: test_validation_service.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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira