cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-5169) the schema-validation-enabled property doesn't work for OUT message validation
Date Tue, 26 Nov 2013 19:12:35 GMT

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

Daniel Kulp commented on CXF-5169:
----------------------------------

No, the problem is with the test case.   The testcase is producing xml of:
{code:xml}
<DemoServiceOperationResponse xmlns="http://www.talend.org/service/"><out>Echo:
asd faslkfj aj;dlfkajsd;</out></DemoServiceOperationResponse>
{code}
which is indeed invalid.  It's resulting in the "out" element being qualified which is wrong
according to the schema.   Crappy error message, but the validation is there.   If you change
the code to:

{code:java}
respEle.addElement("out", "").addText("Echo: " + in.getText());
{code}

or add a prefix to the root element, then it properly validates. 


> 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
>
>
> 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