Announcement Announcement Module
Collapse
No announcement yet.
.MarshalException: The class for the root element 'Fault' could not be found Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • .MarshalException: The class for the root element 'Fault' could not be found

    Hello,

    I have upgraded my project towards Spring 2.5.5 and Spring webservices 1.5.4 and castor 1.2.

    I receive the following error when testing my webservice client:

    Code:
    SEVERE: SAAJ0511: Unable to create envelope from given source
    16-okt-2008 13:35:02 com.sun.xml.wss.impl.SecurableSoapMessage findSoapHeader
    SEVERE: WSS0369: Error getting SOAPHeader from SOAPEnvelope due to Unable to create envelope from given source: 
    13:35:02,698 WARN  [XwsSecurityInterceptor] Could not validate request: com.sun.xml.wss.XWSSecurityException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: ; nested exception is com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: 
    org.springframework.oxm.castor.CastorUnmarshallingFailureException: Castor unmarshalling exception: The class for the root element 'Fault' could not be found.; nested exception is org.exolab.castor.xml.MarshalException: The class for the root element 'Fault' could not be found.
            at org.springframework.oxm.castor.CastorUtils.convertXmlException(CastorUtils.java:50)
            at org.springframework.oxm.castor.CastorMarshaller.convertCastorException(CastorMarshaller.java:431)
            at org.springframework.oxm.castor.CastorMarshaller.unmarshalDomNode(CastorMarshaller.java:335)
            at org.springframework.oxm.AbstractMarshaller.unmarshalDomSource(AbstractMarshaller.java:292)
            at org.springframework.oxm.AbstractMarshaller.unmarshal(AbstractMarshaller.java:122)
            at org.springframework.ws.support.MarshallingUtils.unmarshal(MarshallingUtils.java:65)
            at org.springframework.ws.client.core.WebServiceTemplate$3.extractData(WebServiceTemplate.java:373)
            at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:559)
            at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:501)
            at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:350)
            at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:344)
            at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:336)
            at be.ugent.doza.aandoct.webservice.service.phd.PhdServiceImpl.getPhdList(PhdServiceImpl.java:76)
            at be.ugent.doza.aandoct.midtier.service.phd.PhdServiceImpl.getGrantRequests(PhdServiceImpl.java:132)
            at be.ugent.doza.aandoct.midtier.service.phd.PhdServiceImpl.getGrantRequestsForMainPromotor(PhdServiceImpl.java:567)
            at be.ugent.doza.aandoct.view.handler.OverviewGrantRequestsHandler.retrieveGrantRequests(OverviewGrantRequestsHandler.java:197)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
            at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
            at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
            at javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:78)
            at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
            at javax.faces.component.UICommand.broadcast(UICommand.java:143)
            at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
            at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
            at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
            at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
            at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
            at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
            at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:151)
            at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
            at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
            at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:19
    Does somebody know what is causing this behaviour?

    Thank you
    Jan

  • #2
    Hello,

    Just to be clear. The "Fault" class isn't something that is present in my castor mapping-file. I'm under the impression that the "Fault" class is in fact the java class for the "SOAP-ENV:Fault" element.

    Secondly, it seems a bit strange to me that an unmarshalling should occur of an element that isn't even present in my response:
    Code:
    <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1"><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-12242415277321778474483" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:Username>cafe</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">babe</wsse:Password></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><phdInfoRequest xmlns="http://webservice.doctoraat.doza.ugent.be"><ugentId>801000539924</ugentId><grantStatus>UNDEFINED</grantStatus><promotionStatus>ALL</promotionStatus></phdInfoRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>]
    17-okt-2008 13:05:34 com.sun.xml.wss.impl.filter.DumpFilter process
    INFO: ==== Received Message Start ====
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
    ...
    Any help greatly appreciated

    Comment


    • #3
      Hello,

      Just to keep you informed. I have solved my problem.
      Apparently a stable version of jaxen (version 1.1.1) was added to our framework (it used to be the beta-10 version). The jaxen pom.xml in our maven repository contained dependencies that shouldn't have been there (xercesImpl-2-6-2, xmlParserAPIs-2-6-2 and xalan-2-6-2).

      Removing them resolved the problem.

      Kind regards
      Jan

      Comment

      Working...
      X