If you have an endpoint that utilizes WS-RM along with schema validation, it will throw a validation error if the client sends a WS-RM 1.1 message, e.g. CreateSequence.
Created attachment 877047 [details] Stack trace
I have not been able to reproduce the warning WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (http-/0.0.0.0:8080-10) Interceptor for {http://docs.oasis-open.org/ws-rx/wsrm/200702}SequenceAbstractService# {http://docs.oasis-open.org/ws-rx/wsrm/200702}CreateSequence has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault: Unmarshalling Error: cvc-elt.1: Cannot find the declaration of element 'CreateSequence'. at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:808) [cxf-rt-databinding-jaxb-2.6.8.redhat-7.jar:2.6.8.redhat-7] I see the warning 10:22:00,875 WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (http-/127.0.0.1:8080-1) Interceptor for {http://cxf.apache.org/hello_world_soap_http}GreeterService has thrown exception, unwinding now: java.lang.NullPointerException at org.apache.cxf.ws.rm.RMManager.getReliableEndpoint(RMManager.java:327) [cxf-rt-ws-rm-2.7.10.redhat-1.jar:2.7.10.redhat-1] Alessio notes that the NullPointerException is a known CXF issue, already fixed in https://issues.apache.org/jira/browse/CXF-5600 My env is: Fedora 18 java version "1.7.0_25" apache-maven-3.1.0 I've tested these JBoss builds: -- EAP 6.1 GA which uses cxf-rt-ws-rm-2.6.6-redhat-3.jar ... no warnings -- EAP 6.2 GA which uses cxf-rt-ws-rm-2.7.7.redhat-1.jar ... warns NullPointerException -- tag: EAP_6.2.2.CR3-dev (https://github.com/jbossas/jboss-eap.git) which uses cxf-rt-ws-rm-2.7.10.redhat-1.jar ... warns NullPointerException Please let me know if there is something incorrect about my env and I will test again?
When you first run it, you shouldn't get any errors except that NPE you've already mentioned. You then have to uncomment the @SchemaValidation annotation from GreeterImpl.java.
I uncommented @SchemaValidation annotation in GreeterImpl.java and ran the test on -- tag: EAP_6.2.2.CR3-dev (https://github.com/jbossas/jboss-eap.git). I got the error as described. Upon review of the Client.java I found that setting 45 requestContext.put(RMManager.WSRM_VERSION_PROPERTY, RM11Constants.NAMESPACE_URI); 46 requestContext.put(RMManager.WSRM_WSA_VERSION_PROPERTY, Names.WSA_NAMESPACE_NAME); cause code processing confusion for CXF. Commenting out these two line enabled the test to run successfully with the @SchemaValidation active. I recommend closing this as not a bug.
It's expected that commenting out those two lines would resolve the problem because WS-RM 1.0 does not see this issue. It's only with WS-RM 1.1, and those two lines are precisely how you configure the client to use WS-RM 1.1 (the endpoint will use whichever version is used by the client).
Ok, so in essence the values set in requestContext are overwriting the WSDL settings. I'll trace this back a little further.
It appears wsrm 1.1 is not supported in CXF. The cause of the error msg, "Unmarshalling Error: cvc-elt.1: Cannot find the declaration of element 'CreateSequence'. " is because no grammar is found for it in the "fGrammerPool" in org.apache.xerces.impl.xs.XMLSchemaLoader Grammars for http://schemas.xmlsoap.org/ws/2004/08/addressing and http://schemas.xmlsoap.org/ws/2005/02/rm are provided in org.apache.cxf.ws.rm.RMEndpoint lines 325 - 333. I am running with EAP_6.2.2.CR3-dev ( https://github.com/jbossas/jboss-eap.git) which uses cxf-*-2.7.10 code.