cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alessio Soldano (JIRA)" <j...@apache.org>
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
                 URL: https://issues.apache.org/jira/browse/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):

@Local
@Stateless
@WebServiceProvider(serviceName = "MyTestService",
                    portName = "MyTestPort",
                    targetNamespace = "http://www.my-company.it/ws/my-test",
                    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("http://www.my-company.it/ws/my-test",
"MyWSException"));
         SOAPElement myMessageElement = myFaultElement.addChildElement(new QName("http://www.my-company.it/ws/my-test",
"message"));
         myMessageElement.setValue("This is a faked error"); //right: this creates a text
node and gives it a text value
      } catch (SOAPException se) {
         se.printStackTrace();
         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 https://jira.jboss.org/jira/browse/JBWS-1815
(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.


Mime
View raw message