SoapFaultMappingExceptionResolver nie getroffen wird, mit regulären java-Ausnahme

Kann mir jemand sagen, warum ich kann nicht fangen eine regelmäßige Java-Ausnahme mit meiner resolver, damit ich ihn transformieren kann, bevor die Antwort gesendet wird, zurück? Es wird nie Treffer mit einem Haltepunkt. Wenn das nicht möglich ist, wie kann ich?

SoapFaultMappingExceptionResolver

public class LisSoapFaultTranslatorExceptionResolver extends SoapFaultMappingExceptionResolver {

    @Override
    protected void customizeFault(Object endpoint, Exception ex, SoapFault fault) {

        SoapFaultDetail detail = fault.addFaultDetail();
    }
}

Bean

<sws:annotation-driven />
<bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping" />
<bean id="exceptionResolver"
            class="com.openclass.adapter.ws.resolvers.LisSoapFaultTranslatorExceptionResolver">
            <property name="defaultFault" value="RECEIVER,Server error">
            </property>
            <property name="exceptionMappings">
                <value>java.lang.Exception=SERVER,FaultMsg</value>
        </property>
    </bean>

Soap-Antwort Mit Fehler

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
         <faultcode>SOAP-ENV:Server</faultcode>
         <faultstring xml:lang="en">java.lang.NullPointerException</faultstring>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Web-Service -

@PayloadRoot(localPart="readCourseSectionRequest", namespace="http://www.imsglobal.org/services/lis/cmsv1p0/wsdl11/sync/imscms_v1p0")
    @ResponsePayload
    public ReadCourseSectionResponse readCourseSection(@RequestPayload ReadCourseSectionRequest request, MessageContext messageContext) {

            //Throws error since courseService is null
        ReadCourseSectionResponse openClassResponse = courseService.readCourseSection(request);

        return new ReadCourseSectionResponse();
    }
InformationsquelleAutor Mike Flynn | 2013-03-19
Schreibe einen Kommentar