onetake [https://community.jboss.org/people/onetake] created the discussion
"@SchemaValidation not being performed" To view the discussion, visit: https://community.jboss.org/message/736563#736563 -------------------------------------------------------------- Hi Everyone. I recently upgraded to JBoss 7.1.1 Final and I'm having a hard time getting schema validation on two WS endpoints to work. The endpoints are reachable in 7.1.1, but schema validation is not working as it once did in 4.2.3. I believe this has to do with the use of CXF as the WS stack in 7.1.1. Doing some searching I found these relevant articles/forum posts ( https://community.jboss.org/thread/175592?tstart=7 https://community.jboss.org/thread/175592?tstart=7, https://community.jboss.org/docs/DOC-16722 https://community.jboss.org/wiki/JBossWS-AS7FAQ). I changed the annotations on my endpoint implementation to the CXF equivalents as I was originally using com.sun.xml.ws.developer.SchemaValidation. @WebService(endpointInterface = "com.foo.ws.usstaffing.plan.VacancySetup", wsdlLocation = "WEB-INF/wsdl/ApplicationPlanService.wsdl") @org.apache.cxf.annotations.SchemaValidation(enabled = true) @HandlerChain(file = "../handlers.xml") public class VacancySetupImpl implements VacancySetup { I added the dependency on Jboss's CXF module to my EAR's MANIFEST.MF as described. Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.2 Created-By: 1.6.0_13-b03 (Sun Microsystems Inc.) Dependencies: org.apache.cxf services export Which seems to be working accordingly as a line similar to the following is displayed for my EAR and the WARs it contains JBAS018567: Deployment "deployment.internal_at1.ear" is using a private module ("org.apache.cxf:main") which may be changed or removed in future versions without notice. However, when I send a bogus request (with invalid data) to the endpoint I'm getting a JAXB unmarshalling error; which leads me to believe that validation is NOT taking place. Below is the stack trace I receive: 12:02:35,498 WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (http-foo-127.0.0.1-8080-1) Interceptor for {http://plan.usstaffing.ws.foo.com/}VacancySetupImplService#{http://plan.usstaffing.ws.foo.com/}processApplicationPlan has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault: Unmarshalling Error: Not a number: ? at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:801) [cxf-rt-databinding-jaxb-2.4.6.jar:2.4.6] at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:642) [cxf-rt-databinding-jaxb-2.4.6.jar:2.4.6] at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:156) [cxf-rt-databinding-jaxb-2.4.6.jar:2.4.6] at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109) [cxf-rt-core-2.4.6.jar:2.4.6] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) [cxf-api-2.4.6.jar:2.4.6] at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-rt-core-2.4.6.jar:2.4.6] at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207) [cxf-rt-transports-http-2.4.6.jar:2.4.6] at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91) at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169) at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185) [cxf-rt-transports-http-2.4.6.jar:2.4.6] at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108) [cxf-rt-transports-http-2.4.6.jar:2.4.6] at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135) at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.0.3.GA.jar:2.0.3.GA] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.extremecomponents.table.filter.AbstractExportFilter.doFilter(AbstractExportFilter.java:49) [extremecomponents-1.0.4.jar:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at com.cs.security.filter.NoCacheFilter.doFilter(NoCacheFilter.java:42) [foo-base.jar:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_32] Caused by: javax.xml.bind.UnmarshalException - with linked exception: [javax.xml.bind.UnmarshalException: Not a number: ? - with linked exception: [java.lang.NumberFormatException: Not a number: ?]] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:434) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:371) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:348) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:778) [cxf-rt-databinding-jaxb-2.4.6.jar:2.4.6] ... 35 more Caused by: javax.xml.bind.UnmarshalException: Not a number: ? - with linked exception: [java.lang.NumberFormatException: Not a number: ?] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:662) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:691) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:687) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.handleParseConversionException(Loader.java:271) at com.sun.xml.bind.v2.runtime.unmarshaller.TextLoader.text(TextLoader.java:73) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:514) at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.text(ValidatingUnmarshaller.java:130) at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.text(InterningXmlVisitor.java:93) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.processText(StAXStreamConnector.java:339) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:217) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:186) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:369) ... 37 more Caused by: javax.xml.bind.UnmarshalException: Not a number: ? - with linked exception: [java.lang.NumberFormatException: Not a number: ?] ... 49 more Caused by: java.lang.NumberFormatException: Not a number: ? at com.sun.xml.bind.DatatypeConverterImpl._parseInt(DatatypeConverterImpl.java:131) at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$17.parse(RuntimeBuiltinLeafInfoImpl.java:728) at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$17.parse(RuntimeBuiltinLeafInfoImpl.java:731) at com.sun.xml.bind.v2.runtime.unmarshaller.TextLoader.text(TextLoader.java:69) ... 44 more Any help or guidance would be greatly appreciated. Thanks. -------------------------------------------------------------- Reply to this message by going to Community [https://community.jboss.org/message/736563#736563] Start a new discussion in JBoss Web Services at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
