Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2.5, 2.2.6
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 BugServiceUnknown 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)