Monthly Archives: October 2015
Workaround for JAX-WS NullPointerException when calling web service from embedded Java 8 JVM
[Note: I originally posted this solution to Stackoverflow.com] Problem: When connecting to a SOAP based web service from a Java 8 embedded JVM using JAX-WS dynamic generation of the client stubs, you get this NullPointerException:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
Caused by: java.lang.NullPointerException at com.sun.xml.internal.ws.client.ClientContainer$1.getResource(ClientContainer.java:45) at com.sun.xml.internal.ws.assembler.MetroConfigLoader.locateResource(MetroConfigLoader.java:220) at com.sun.xml.internal.ws.assembler.MetroConfigLoader.locateResource(MetroConfigLoader.java:230) at com.sun.xml.internal.ws.assembler.MetroConfigLoader.init(MetroConfigLoader.java:125) at com.sun.xml.internal.ws.assembler.MetroConfigLoader.<init>(MetroConfigLoader.java:104) at com.sun.xml.internal.ws.assembler.TubelineAssemblyController.getTubeCreators(TubelineAssemblyController.java:78) at com.sun.xml.internal.ws.assembler.MetroTubelineAssembler.createClient(MetroTubelineAssembler.java:103) at com.sun.xml.internal.ws.client.Stub.createPipeline(Stub.java:328) at com.sun.xml.internal.ws.client.Stub.<init>(Stub.java:295) at com.sun.xml.internal.ws.client.Stub.<init>(Stub.java:228) at com.sun.xml.internal.ws.client.Stub.<init>(Stub.java:243) at com.sun.xml.internal.ws.client.sei.SEIStub.<init>(SEIStub.java:84) at com.sun.xml.internal.ws.client.WSServiceDelegate.getStubHandler(WSServiceDelegate.java:814) at com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:803) at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:436) at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:404) at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:459) at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:463) at javax.xml.ws.Service.getPort(Service.java:188) |
If your problem is … Continue reading
Curl command line encoding of query parameters for an HTTP PUT
[Note: I originally posted this problem/solution to Stackoverflow.com] Problem: I have multiple query parameters that I want to send in an HTTP PUT operation using curl. How do I encode the query parameters? Example:
1 |
$ curl -X PUT http://example.com/resource/1?param1=value%201¶m2=value2 |
If ‘value 1’ contains spaces … Continue reading
Recent Comments