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 Fri, 02 Aug 2013 09:43:56 GMT

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

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

Hi,

Thanks! Actually I already hit the workaround in the provider impl class like this:
{code}
Service service = ServiceModelUtil.getService(message.getExchange());
schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0),
                message.getExchange().getBus());
schema.newValidator().validate(source);
{code}

and it works for OUT message validation, but it would be better if this can be supported on
the cxf side, so I create this jira.

Thanks.
                
> 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: Bug
>          Components: Core
>    Affects Versions: 2.7.6
>            Reporter: Xilai Dai
>            Assignee: Freeman Fang
>         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

Mime
View raw message