You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Christian Gräfe <ch...@gmail.com> on 2013/05/07 16:29:42 UTC
web service client via maven
Hello,
i trying to implement an jax-ws client app for testing purposes via maven.
My structure is the following
- parent
-- client stubs that are generating service files
-- console app that is calling the service (with maven-shade-plugin)
The whole project is managed via eclipse and if I start the console project
in eclipse everything works fine, but if i start the jar file via java -jar
I get this exception:
--------------------------------------
Exception in thread "main" java.lang.NullPointerException
at
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:98)
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:98)
at javax.xml.ws.Service.<init>(Unknown Source)
at
srcs.srcs.mycontract.v1_1.CostingService.<init>(CostingService.java:40)
at com.example.Services.Client.TestRequest.main(TestRequest.java:79)
-----------------------------------------
Any idea what I can do?
kind regards
Christian
Re: web service client via maven
Posted by Daniel Kulp <dk...@apache.org>.
It sounds like you don't have the maven-shade-plugin configured to correctly concat/merge all the things together that need to be merged/concat together. In particular, the META-INF/cxf/bus-extensions.txt files.
Dan
On May 7, 2013, at 10:29 AM, Christian Gräfe <ch...@gmail.com> wrote:
> Hello,
>
> i trying to implement an jax-ws client app for testing purposes via maven.
> My structure is the following
>
> - parent
> -- client stubs that are generating service files
> -- console app that is calling the service (with maven-shade-plugin)
>
> The whole project is managed via eclipse and if I start the console project
> in eclipse everything works fine, but if i start the jar file via java -jar
> I get this exception:
>
> --------------------------------------
> Exception in thread "main" java.lang.NullPointerException
> at
> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:98)
> 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:98)
> at javax.xml.ws.Service.<init>(Unknown Source)
> at
> srcs.srcs.mycontract.v1_1.CostingService.<init>(CostingService.java:40)
> at com.example.Services.Client.TestRequest.main(TestRequest.java:79)
> -----------------------------------------
>
> Any idea what I can do?
>
>
>
> kind regards
> Christian
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: web service client via maven
Posted by Glen Mazza <gl...@gmail.com>.
I would just get rid of Eclipse. Here's a Maven-only structure you can
use: http://www.jroller.com/gmazza/entry/soap_client_tutorial
HTH,
Glen
On 05/07/2013 10:29 AM, Christian Gräfe wrote:
> Hello,
>
> i trying to implement an jax-ws client app for testing purposes via maven.
> My structure is the following
>
> - parent
> -- client stubs that are generating service files
> -- console app that is calling the service (with maven-shade-plugin)
>
> The whole project is managed via eclipse and if I start the console project
> in eclipse everything works fine, but if i start the jar file via java -jar
> I get this exception:
>
> --------------------------------------
> Exception in thread "main" java.lang.NullPointerException
> at
> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:98)
> 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:98)
> at javax.xml.ws.Service.<init>(Unknown Source)
> at
> srcs.srcs.mycontract.v1_1.CostingService.<init>(CostingService.java:40)
> at com.example.Services.Client.TestRequest.main(TestRequest.java:79)
> -----------------------------------------
>
> Any idea what I can do?
>
>
>
> kind regards
> Christian
>