cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-3233) JAXB xsd validation working on incoming messages but not outgoing messages
Date Fri, 14 Jan 2011 07:27:45 GMT

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

Freeman Fang commented on CXF-3233:
-----------------------------------

Hi,
I think the problem you encounter is that your client side somehow build service model from
class, but not from the wsdl file, so no chance to load the schema xsds to do the schema validation
on client side.

I don't know how you create client, could you ensure that you specify wsdlLocation for client
side? You  may need take a look at [1] to get more details.

If it still doesn't work for you, I do need you provide a whole runnable testcase which I
can reproduce it.

Btw, I just commit a testcase which demostrate the schemavalidation works for outgoing message
on client side.
[1]http://cxf.apache.org/docs/jax-ws-configuration.html

Freeman

> JAXB xsd validation working on incoming messages but not outgoing messages
> --------------------------------------------------------------------------
>
>                 Key: CXF-3233
>                 URL: https://issues.apache.org/jira/browse/CXF-3233
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus
>    Affects Versions: 2.3.1
>         Environment: WebLogic 10.0, WebSphere 6.1
>            Reporter: Benjamin Shults
>            Assignee: Freeman Fang
>             Fix For: NeedMoreInfo
>
>
> Using CXF 2.3.1.
> Generated Java from WSDLs using JAXB.
> Using 
>     <jaxws:properties>
>         <entry key="schema-validation-enabled" value="true" />
>     </jaxws:properties>
> in the client configuration.
> My test creates an object that fails this particular requirement of the WSDL:
>     <xsd:simpleType name="UUID.Content">
>         <xsd:annotation>
>             <xsd:documentation xml:lang="EN">
>                 Universally Unique Identifier
>                 </xsd:documentation>
>         </xsd:annotation>
>         <xsd:restriction base="xsd:token">
>             <xsd:length value="36" />
>             <xsd:pattern
>                 value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"
/>
>         </xsd:restriction>
>     </xsd:simpleType>
> However, the message is marshalled and makes it all the way through the outgoing interceptor
chain.
> The WSDL is one-way: input-only.
> wsdlLocation is specified in an annotation in the Impls.
> Interestingly, incoming messages that fail validation of this same constraint are blocked
by the interceptor chain during unmarshalling.
> I'm testing on WebLogic.  I could also test on WebSphere is needed.
> Other XSD validation failures (such as a missing required element) are being caught by
the outgoing marshaller.
> The reason that we upgraded to 2.3.1 from 2.2.6 was that we were seeing similar issues
on the inbound messages.  In 2.3.1, complete XSD validation occurs for inbound messages but
not for outbound ones.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message