The error means the response message is invalid against the xsd schema defined in the wsdl for your response.
Could you please append the wsdl and the response message?
Without it can't tell more about it.
Btw, a valid xml fragment in your soapUI doesn't mean it's valid against the xsd.
Well, from your wsdl/xsd and generated code, I can't see why you could get response like
checkMajReponse, it should be something like ckReponse element.
Any chance you append the request/response message?
Also I doubt that you have multiple version implementations for your endpoint, it may use "checkMajReponse" previously, somehow the mismatch cause problem.
How you deploy this endpoint? maybe a clean environment and redeploy this endpoint helps
the test case is not related to the main post.
I do this light project (wsVal) to expose the problem simply.
Everything has been generated and the service work perfectly with
turn to "true" the schema-validation-enabled and you will see the error
org.apache.cxf.interceptor.Fault: Marshalling Error: cvc-elt.1: Cannot find the declaration of element 'ckReponse'
I run this endpoint under Tomcat in my IDE (The maven project is a war project).
I send the error stack corresponding to the light test case send before.
Edited by: jcs on Dec 3, 2010 5:13 PM
errorValidResponse.txt 5.5 KB
You should add
to the jaxws:endpoint in the cxf-config.xml
and the error persist :
org.apache.cxf.interceptor.Fault: Marshalling Error: cvc-elt.1: Cannot find the declaration of element 'ckReponse'.
I try With jetty and tomcat but there are not difference : marshall error is raised.
Thanks in advance for new help
(wsVal.zip is updated project that expose this issu)
wsVal.zip 16.5 KB
I resolve temporary this point by using en interceptor that set up the schema to use for validation :
the interceptor is fr.service.interceptor.SetShemaInterceptor in the zip attached.
I set up this interceptor in the config bus :
In and out soap message are correctly validated.
For the issue in CXF, I think there are a bug in schema initialisation.
I hope this issue resolved in future version.
wsVal.zip 17.5 KB
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: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"/>
in your service.wsdl.
And I've committed 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
Edited by: ffang on Dec 9, 2010 11:45 PM