Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-1243 Resolve JBoss common jax-ws testsuite issues
  3. CXF-2129

Provider endpoint causes NPE in AbstractPolicyInterceptor

Attach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2
    • 2.1.5, 2.2.1
    • JAX-WS Runtime
    • None

    Description

      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).

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            asoldano Alessio Soldano
            asoldano Alessio Soldano
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment