I followed the instructions such as running wsgen . So service is working fine.
Question is about writing the client. Can I use SAAJ API to invoke this web service? or do I need AXIS etc to call webservice when message is of type SOAP?
You can use either the SAAJ or JAX-WS API to invoke a WS. Axis has implementations of both those APIs, so you can use it, but you certainly don't need to use it - any other SOAP stack that implements SAAJ would be fine, too.
Joined: Mar 13, 2003
I am trying to write client using SAAJ to access the above service. Snippet of code is like this:
I am getting "com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found
SEVERE: SAAJ0008: Bad Response; Not Found
Is some configuration pending from client side?
Joined: Mar 22, 2005
The client code uses a different endpoint URL than the service code; that's why the service is not found.
This looks dangerous. You should never call iterator.next() without a preceding iterator.hasNext() call. As long as you are debugging, you may want to print out the entire response so that you know what gets returned. Or the client could access the service through something like tcpmon or SOAPUI, so that you have a nice visual representation of what's sent over the wire.
Ulf Dittmer wrote:You can use either the SAAJ or JAX-WS API to invoke a WS. Axis has implementations of both those APIs, so you can use it, but you certainly don't need to use it - any other SOAP stack that implements SAAJ would be fine, too.
In fact, you do not need a separate SOAP stack - the JavaSE 6 JDK/JRE includes SAAJ, JAXB etc. so it is possible to develop SOAP web service clients using only Java SE nowadays.
In fact, you do not need any SOAP stack - the JavaSE 6 JDK/JRE includes SAAJ, JAXB etc. so it is possible to develop SOAP web service clients using only Java SE nowadays.
In other words, JSE 6 includes a SOAP stack.
The problem with relying on that is that JSE is updated less frequently than most of the constituent WS libraries. So the latest JSE 6 version generally contains versions of JAXB and JAX-WS that are no longer current, so you're missing out on the latest features and bug fixes.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com