Can you log a bug for this? I think this is going to fall into the same category as the mtom validation issues where we'll need to register a special validation even listener with JAXB to ignore those extra attributes.

Dan



On Jul 7, 2008, at 3:29 AM, emjayzed wrote:


I'm running into a schema validation exception (see below) upon submitting a
request that includes a SOAPHeader with the standard attribute,
mustUnderstand:

JDK: 1.5.0_15
Environment: Weblogic 9.2
CXF: 2.1

Initially, I thought it was an issue with the parser in the Java 5 JDK and that upgrading to latest 1.5 JDK would fix it, but it hasn't. Since I'm tied to 1.5 by the appserver, I'd appreciate any clues on how to get schema validation to work. Do I need to write my own validator? Can I pull out or
disable the SoapHeader interceptor?

Regards,

Martin
[EMAIL PROTECTED]

The request looks like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ "

xmlns:v1="http://telstra.com/sdfcore/SDFPlatformRequestHeader/v1_0";

xmlns:v11="http://telstra.com/sdfcore/SDFConsumerRequestHeader/v1_0";

xmlns:v12="http://telstra.com/sdfcore/csc/uup/CorrelationManagementSchema/v1 "

xmlns:v13="http://telstra.com/sdfcore/csc/uup/CDMTypesImpl/v1";>
  <soapenv:Header>
     <v1:SDFPlatformRequestHeader mustUnderstand="0">
        <v1:SDFConsumerRequestHeader>
           <v11:requestApplicationLabel>foedere
certo</v11:requestApplicationLabel>
......

The server stacktrace looks like this:

INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unmarshalling Error:
cvc-complex-type.3.2.2: Attribute 'mustUnderstand' is not allowed to appear
in element 'v1:SDFPlatformRequestHeader'.
       at
org .apache .cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:642)
       at
org .apache .cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:555)
       at
org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:64)
       at
org .apache .cxf .binding .soap .interceptor .SoapHeaderInterceptor.handleMessage(SoapHeaderInterceptor.java:101)
       at
org .apache .cxf .phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java: 221)
       at
org .apache .cxf .transport .ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
       at
org .apache .cxf .transport.servlet.ServletDestination.invoke(ServletDestination.java: 92)
       at
org .apache .cxf .transport .servlet.ServletController.invokeDestination(ServletController.java: 214)
       at
org .apache .cxf .transport.servlet.ServletController.invoke(ServletController.java: 151)
       at
org .apache .cxf .transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java: 170)
       at
org .apache .cxf .transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java: 148)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
       at
weblogic.servlet.internal.StubSecurityHelper $ServletServiceAction.run(StubSecurityHelper.java:227)
       at
weblogic .servlet .internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java: 125)
       at
weblogic .servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
       at
weblogic .servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
       at
weblogic.servlet.internal.WebAppServletContext $ServletInvocationAction.run(WebAppServletContext.java:3231)
       at
weblogic .security .acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
       at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java: 121)
       at
weblogic .servlet .internal .WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
       at
weblogic .servlet .internal.WebAppServletContext.execute(WebAppServletContext.java:1908)
       at
weblogic .servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
       at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Caused by: javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute
'mustUnderstand' is not allowed to appear in element
'v1:SDFPlatformRequestHeader'.]
       at
javax .xml .bind .helpers .AbstractUnmarshallerImpl .createUnmarshalException(AbstractUnmarshallerImpl.java:315)
       at
com .sun .xml .bind .v2 .runtime .unmarshaller .UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:506)
       at
com .sun .xml .bind .v2 .runtime .unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:324)
       at
com .sun .xml .bind .v2 .runtime .unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:293)
       at
org .apache .cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:625)
       ... 24 more
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute
'mustUnderstand' is not allowed to appear in element
'v1:SDFPlatformRequestHeader'.
       at
com .sun .org .apache .xerces.internal.jaxp.validation.Util.toSAXParseException(Unknown
Source)
       at
com .sun .org .apache .xerces.internal.jaxp.validation.ErrorHandlerAdaptor.error(Unknown
Source)
       at
com .sun .org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
Source)
       at
com .sun .org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
Source)
       at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator $XSIErrorReporter.reportError(Unknown
Source)
       at
com .sun .org .apache .xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown
Source)
       at
com .sun .org .apache .xerces.internal.impl.xs.XMLSchemaValidator.processAttributes(Unknown
Source)
       at
com .sun .org .apache .xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown
Source)
       at
com .sun .org .apache .xerces.internal.impl.xs.XMLSchemaValidator.startElement(Unknown
Source)
       at
com .sun .org .apache .xerces .internal.jaxp.validation.ValidatorHandlerImpl.startElement(Unknown
Source)
       at
com .sun .xml .bind .v2 .runtime .unmarshaller .ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:89)
       at
com .sun .xml .bind .v2 .runtime .unmarshaller .InterningXmlVisitor.startElement(InterningXmlVisitor.java:71)
       at
com .sun .xml .bind .v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java: 137)
       at
com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:240)
       at
com.sun.xml.bind.unmarshaller.DOMScanner.scan(DOMScanner.java:123)
       at
com .sun .xml .bind .v2 .runtime .unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:314)
--
View this message in context: 
http://www.nabble.com/schema-validation-problem-with-SoapHeader-tp18311410p18311410.html
Sent from the cxf-user mailing list archive at Nabble.com.


---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog




Reply via email to