cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alessio Soldano (JIRA)" <>
Subject [jira] Created: (CXF-2129) Provider endpoint causes NPE in AbstractPolicyInterceptor
Date Mon, 23 Mar 2009 14:45:52 GMT
Provider endpoint causes NPE in AbstractPolicyInterceptor

                 Key: CXF-2129
             Project: CXF
          Issue Type: Sub-task
          Components: JAX-WS Runtime
    Affects Versions: 2.2
            Reporter: Alessio Soldano
            Assignee: Alessio Soldano

I've a web service provider returning a custom fault as follows (the fault is correctly declared
in the wsdl deployed along with the endpoint):

@WebServiceProvider(serviceName = "MyTestService",
                    portName = "MyTestPort",
                    targetNamespace = "",
                    wsdlLocation = "META-INF/wsdl/my-service.wsdl")
@WebContext(contextRoot = "/jaxws-jbws1815")
@ServiceMode(value = Service.Mode.MESSAGE)
public class ProviderImpl implements Provider<SOAPMessage>

   public SOAPMessage invoke(SOAPMessage requestSoapMessage)
      SOAPFault theSOAPFault;
      try {
         theSOAPFault = SOAPFactory.newInstance().createFault();
         Detail soapFaultDetail = theSOAPFault.addDetail();
         SOAPElement myFaultElement = soapFaultDetail.addChildElement(new QName("",
         SOAPElement myMessageElement = myFaultElement.addChildElement(new QName("",
         myMessageElement.setValue("This is a faked error"); //right: this creates a text
node and gives it a text value
      } catch (SOAPException se) {
         throw new RuntimeException("Something unexpected happened!");
      throw new SOAPFaultException(theSOAPFault);

This causes the AbstractPolicyInterceptor to throw a NPE during the BindingFaultInfo retrieval
as no class can found that maps the fault.

Further information about the testcase are available here
(scm links there point to the testcase sources).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message