I almost got JBoss Ws (native) to validate schemas but have encountered a problem.
Bit of background: I am using top-down wsdl, wrapped document/literal convention. JBoss WS v 3.2.2GA deployed to JBoss 5.1.0. Earlier I had trouble validating the schema because I referenced the wsdl document in my schema validation annotation. Thus
gives you the error "definitions should not be the root element in a schema document". So instead I tried
and I split out the schema into the xsd document. Now the schema validation doesn't complain when you deploy the web service to the server. However, when I invoke a web service I get this error:
org.xml.sax.SAXException: cvc-elt.1: Cannot find the declaration of element 'int:createItem'.
where createItem is one of my wsdl operations. The xmlns:int namespace is the wsdl target namespace and using wrapped document literal it needs to be the root of the xml payload. For example:
<sch:longtext>This is a test</sch:longtext>
So here's the dilemma: I can't validate the schema because the root of the payload is in a different namespace than the one I am validating. On the other hand, if I declare the element to be in the schema namespace then I am no longer using the wrapped document literal convention and I get the error
so it doesn't work at all.
So here's the question: Has anybody successfully validated wrapped document/literal documents using native JBoss WS?
How about one of the other stacks (CXF, Metro)?