Bug 1079049 - [GSS] (6.3.0) Problem using @SchemaValidation in combination with wsrm 1.1
Summary: [GSS] (6.3.0) Problem using @SchemaValidation in combination with wsrm 1.1
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web Services
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: EAP 6.4.0
Assignee: Rebecca Searls
QA Contact: Rostislav Svoboda
Russell Dickenson
Depends On:
Blocks: 1079052
TreeView+ depends on / blocked
Reported: 2014-03-20 21:03 UTC by Kyle Lape
Modified: 2018-12-06 16:09 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
If a client sends a WS-RM 1.1 message that references `CreateSequence` to an endpoint that utilizes WS-RM along with schema validation, the application throws the following error: ---- Unmarshalling Error: cvc-elt.1: Cannot find the declaration of element 'CreateSequence'. ---- `CreateSequence` is not found in the `fGrammerPool` in `org.apache.xerces.impl.xs.XMLSchemaLoader` because CXF and JBossWS do not yet fully support WS-RM 1.1.
Clone Of:
: 1079052 (view as bug list)
Last Closed: 2016-08-08 17:03:44 UTC
Type: Bug

Attachments (Terms of Use)
Stack trace (6.78 KB, text/plain)
2014-03-20 21:05 UTC, Kyle Lape
no flags Details

System ID Priority Status Summary Last Updated
Apache JIRA CXF-5544 None None None Never

Description Kyle Lape 2014-03-20 21:03:58 UTC
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.

Comment 1 Kyle Lape 2014-03-20 21:05:00 UTC
Created attachment 877047 [details]
Stack trace

Comment 3 Rebecca Searls 2014-04-01 12:42:46 UTC
I have not been able to reproduce the warning

    WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (http-/
    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)

I see the warning

   10:22:00,875 WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (http-/ Interceptor for
   {http://cxf.apache.org/hello_world_soap_http}GreeterService has thrown exception, unwinding now:
   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"

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?

Comment 4 Kyle Lape 2014-04-02 16:37:19 UTC
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.

Comment 5 Rebecca Searls 2014-04-02 21:16:44 UTC
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,
46 requestContext.put(RMManager.WSRM_WSA_VERSION_PROPERTY,

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.

Comment 6 Kyle Lape 2014-04-02 22:37:25 UTC
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).

Comment 7 Rebecca Searls 2014-04-03 12:41:45 UTC
Ok, so in essence the values set in requestContext are overwriting the WSDL settings.  I'll trace this back a little further.

Comment 8 Rebecca Searls 2014-04-04 20:55:39 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.