I have an problem with my code. The WSDL file was parsed by wsdl2java from apache cxf. Now I'm trying to get connection with web service but still I'm getting null pointer exception.
Exception in thread "main" java.lang.NullPointerException
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:92)
at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203)
at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:147)
at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:97)
at javax.xml.ws.Service.<init>(Service.java:56)...
The url address is pointing to place from where I have downloaded the WSDL file. For building jar I'm using Maven with dependencies such as:
- jaxws-api
- cxf-rt-transports-http
- cxf-rt-frontend-jaxws
- cxf-rt-bindings-soap
jar with deps is created by maven-assembly-plugin
For sure the wsdl file exists there because it have been downloaded from there.
Any suggestions? Thanks for any help.
BTW. It's not duplicated question any of solution which I have found does not work for me.