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-3095) Jax WS - Schema Locations are ignored since CXF-2851 was implemented
Date Thu, 09 Dec 2010 09:28:01 GMT

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

Freeman Fang commented on CXF-3095:
-----------------------------------

Hi Jean-Claude,

I played with the testcase you append, and found that the problem which cause "Cannot find
the declaration of element 'ckReponse'." is actually from your
testcase. As both service-req-10.xsd and service-rep-10.xsd are using same namespace, you
should use xsd:include but not xsd:import.
So just change from
<xsd:schema>
 			<xsd:import namespace="http://www.service.fr/service/1/0" schemaLocation="../XSD/service-req-10.xsd"/>
		
 			<xsd:import namespace="http://www.service.fr/service/1/0" schemaLocation="../XSD/service-rep-10.xsd"/>
to
<xsd:schema targetNamespace="http://www.service.fr/service/1/0">
 			<xsd:include schemaLocation="../XSD/service-req-10.xsd"/>			
 			<xsd:include schemaLocation="../XSD/service-rep-10.xsd"/>
in your service.wsdl.
And I'm going to commit a testcase which verify multiple xsd files work, you can see the response
message declared in another xsd files could be found with schema-validation-enabled

@Jason, I believe the problem you encounter is the same case.



Freeman


> Jax WS - Schema Locations are ignored since CXF-2851 was implemented
> --------------------------------------------------------------------
>
>                 Key: CXF-3095
>                 URL: https://issues.apache.org/jira/browse/CXF-3095
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.2.10, 2.2.11
>         Environment: running in tomcat 6
>            Reporter: Patrick Leamon
>            Assignee: Freeman Fang
>             Fix For: NeedMoreInfo
>
>         Attachments: wsVal.zip
>
>
> I'm having very odd schema validation issues since moving from cxf 2.0.11 to cxf 2.2.10.
> The beans.xml I'm using to configure the web service looks something like:
> {code:xml}
>     <jaxws:endpoint id="LocationServiceId"
>                     implementor="com.blah.LocationServiceImpl"
>                     address="/services/location">
>         <jaxws:properties>
>             <entry key="schema-validation-enabled" value="true" />
>         </jaxws:properties>
>         <jaxws:schemaLocations>
>             <jaxws:schemaLocation>classpath:xsd/common-types.xsd</jaxws:schemaLocation>
>             <jaxws:schemaLocation>classpath:xsd/location-types..xsd</jaxws:schemaLocation>
>             <jaxws:schemaLocation>classpath:xsd/location-service.xsd</jaxws:schemaLocation>
>         </jaxws:schemaLocations>
>     </jaxws:endpoint>
> {code}
> The first five requests that I send to this web service function correctly.  Any further
requests result in:
> Unmarshalling Error: cvc-elt.1: Cannot find the declaration of element 'ns1:locationElement'
> Previously in 2.0.11 this was working fine, regardless of the number of requests being
sent.
> *edit* Reverting to 2.2.9 works perfectly.  It looks like the code path that reads in
schemaLocations was disabled by the fix to CXF-2851.

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