Hello, masters of Java!
I am developing a WS client that will need to use MTOM for some data transfer. However, I have a different problem and it's driving me nuts. It involves, of course, running the JAR file from the command line.
I used cxf-codegen-plugin to generate the classes from WSDL and built a simple client. I created a MockService in SoapUI with that same WSDL and tested the client against it. Needless to say, everything works perfectly from Eclipse. I used maven-assembly-plugin to create a single JAR and when I run it from the command line, I get an exception as follows:
Caught Exception - Cannot invoke "org.apache.cxf.wsdl.WSDLManager.getDefinition(String)" because the return value of "org.apache.cxf.Bus.getExtension(java.lang.Class)" is null
java.lang.NullPointerException: Cannot invoke "org.apache.cxf.wsdl.WSDLManager.getDefinition(String)" because the return value of "org.apache.cxf.Bus.getExtension(java.lang.Class)" is null
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:85)
at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:217)
at org.apache.cxf.jaxws.ServiceImpl.initialize(ServiceImpl.java:160)
at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:129)
at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:82)
at javax.xml.ws.Service.<init>(Service.java:112)
at com.xxx.xmldefs.sup.enterpriseservices.documentmanagementservice.v1.DocumentManagementService.<init>(DocumentManagementService.java:43)
at XXX.MTOMClient.MTOMClient.main(MTOMClient.java:53)
Obviously, something is missing in my dependencies, build path, libraries, whatnot, since from Eclipse, client connects, executes the call and gets the result back. I have Maven dependencies and Java system libraries checked in the "Order and Export" section of the project build path.
What am I missing? I admit not to be an expert, I develop things in Java occassionally so maybe this is something simple I just haven't come across yet.
Thank you all in advance for your help!