Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2692

NPE when calling a web service with header

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.5, 2.2.6
    • 2.2.7
    • JAX-WS Runtime

    Description

      When Web Service which has a simple input header parameter is called from a Java consumer, a NullPointerException is thrown.
      When It is called from an external SOAP Client, there is no problem

      SEI :

      @WebService
      public interface BugService

      Unknown macro: { @WebResult(name = "return") public String print( @WebParam(name = "name", header = true) String name); }

      Consumer :

      Service service = Service.create(wsdlURL, serviceName);
      BugService client = service.getPort(BugService.class);
      System.out.println(client.print("header"));

      Exception :

      java.lang.NullPointerException
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeClassInfo(ReflectionServiceFactoryBean.java:754)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation(JaxWsServiceFactoryBean.java:222)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOperations(ReflectionServiceFactoryBean.java:674)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperations(JaxWsServiceFactoryBean.java:258)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:424)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:528)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:278)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:178)
      at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:411)
      at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:296)
      at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:291)
      at javax.xml.ws.Service.getPort(Service.java:161)
      at com.header.ws.ConsumerBug.main(ConsumerBug.java:17)

      Attachments

        1. Bug_Header.zip
          6 kB
          Grégory Le Bonniec

        Activity

          People

            dkulp Daniel Kulp
            greglebonniec Grégory Le Bonniec
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: