Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10869

JBossWS-Native: Unable to load schema on incoming SOAP request with @SchemaValidation

    XMLWordPrintable

Details

    • Hide

      Deploy a webservice with @SchemaValidation enabled and make sure the WSDL file has a "-" in the file name.

      Show
      Deploy a webservice with @SchemaValidation enabled and make sure the WSDL file has a "-" in the file name.
    • Workaround Exists
    • Hide

      Remove "-" or other non alpha characters from the WSDL file name

      Show
      Remove "-" or other non alpha characters from the WSDL file name
    • Hide
      Previously JBossWS's schema validation feature would only work properly if your WSDL filename only contained alphabetic characters -- dashes or underscore for example wouldn't work. You can now use non-alphabetic characters in the WSDL file and successfully use schema validation.
      Show
      Previously JBossWS's schema validation feature would only work properly if your WSDL filename only contained alphabetic characters -- dashes or underscore for example wouldn't work. You can now use non-alphabetic characters in the WSDL file and successfully use schema validation.
    • Documented as Resolved Issue
    • NEW

    Description

      If an endpoint has @SchemaValidation enabled and the wsdl file has "-" in the name, then it fails to locate the schema.

      @WebService(wsdlLocation = "/WEB-INF/wsdl/some-test.wsdl", serviceName = "SomeTestWS", portName = "SomeTestPort", targetNamespace = "foo.bar", endpointInterface = "foo.bar.SomeTestWS")
      @SchemaValidation
      public class SomeTestWS{
      ....
      ....
      }
      

      This is the error that's thrown in the server log:

      13:05:08,191 INFO  [SOAPBodyElementDoc] Validating: XML_VALID
      13:05:08,194 WARN  [SchemaExtractor] Error obtaining schema: boss-as/server/default/data/wsdl/test.war/foo.xsd
      13:05:08,194 WARN  [SchemaExtractor] Error obtaining schema: jboss-as/server/default/data/wsdl/test.war/bar.xsd
      13:05:08,199 WARN  [StrictlyValidErrorHandler] org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 105; schema_reference.4: Failed to read schema document 'foo.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
      13:05:08,200 WARN  [StrictlyValidErrorHandler] org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 119; schema_reference.4: Failed to read schema document 'bar.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
      13:05:08,200 ERROR [StrictlyValidErrorHandler] org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 77; src-resolve: Cannot resolve the name 'foo:bar' to a(n) 'type definition' component.
      13:05:08,202 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
      org.jboss.ws.WSException: org.xml.sax.SAXException: src-resolve: Cannot resolve the name 'foo:bar' to a(n) 'type definition' component.
      	at org.jboss.ws.WSException.rethrow(WSException.java:68)
      	at org.jboss.ws.core.soap.SOAPBodyElementDoc.validatePayload(SOAPBodyElementDoc.java:138)
      	at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElementDoc.java:83)
      	at org.jboss.ws.core.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:172)
      	at org.jboss.ws.core.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:273)
      	at org.jboss.ws.core.EndpointInvocation.getRequestParamValue(EndpointInvocation.java:115)
      	at org.jboss.ws.core.EndpointInvocation.getRequestPayload(EndpointInvocation.java:135)
      	at org.jboss.ws.core.server.DelegatingInvocation.getArgs(DelegatingInvocation.java:80)
      	at org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE.invoke(InvocationHandlerJSE.java:117)
      	at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:241)
      	at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:470)
      	at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:294)
      	at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:203)
      	at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:129)
      	at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
      	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
      	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      	at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
      	at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
      	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
      	at java.lang.Thread.run(Thread.java:679)
      Caused by: org.xml.sax.SAXException: src-resolve: Cannot resolve the name 'foo:bar' to a(n) 'type definition' component.
      	at org.jboss.ws.extensions.validation.StrictlyValidErrorHandler.error(StrictlyValidErrorHandler.java:43)
      	at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
      	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      	at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source)
      	at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source)
      	at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(Unknown Source)
      	at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseGlobal(Unknown Source)
      	at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseSchemas(Unknown Source)
      	at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
      	at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource(Unknown Source)
      	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
      	at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)
      	at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
      	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
      	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
      	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
      	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
      	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
      	at org.jboss.ws.extensions.validation.SchemaValidationHelper.validateDocument(SchemaValidationHelper.java:89)
      	at org.jboss.ws.extensions.validation.SchemaValidationHelper.validateDocument(SchemaValidationHelper.java:71)
      	at org.jboss.ws.extensions.validation.SchemaValidationHelper.validateDocument(SchemaValidationHelper.java:77)
      	at org.jboss.ws.core.soap.SOAPBodyElementDoc.validatePayload(SOAPBodyElementDoc.java:129)
      	... 36 more
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rhn-support-tibrahim Taneem Ibrahim
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: