This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes SOAP in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "SOAP in Java" Watch "SOAP in Java" New topic

SOAP in Java

Jesse Miller
Ranch Hand

Joined: Apr 05, 2010
Posts: 37
I am fairly unfamiliar with SOAP so I am trying to learn as I go. I understand how to write SOAP requests in XML but I am having some trouble converting that to JAVA code so I can use it in my program. I have a web server that accepts requests in the form of http://myserver'sURL/getXML.php?method=example¶ms=ALL (something like this) and returns a response. I am trying to get that response returned as an array so I can use it in my Java program. At some point I will have to add authentication to the SOAP header since these server requests are secure. Im not really sure where to start with this so any help would be greatly appreciated. Thanks!

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41062
So the request isn't SOAP, but an HTTP GET, and SOAP would only be used in the response? See this for an example SAAJ client, although that may not fit the bill if the request isn't actually SOAP. It also shows how to set HTTP Authentication headers (assuming that's what you mean by authentication).

Ping & DNS - my free Android networking tools app
Jesse Miller
Ranch Hand

Joined: Apr 05, 2010
Posts: 37
Ok, a SAAJ client does seem like a good way to go about this. I have been looking around on how to convert a SOAP request to a JAX-RPC DII interface. Below is my original SOAP code. Could someone help me convert this to a JAX-RPC interface or at least point me in the right direction? Thanks

Jesse Miller
Ranch Hand

Joined: Apr 05, 2010
Posts: 37
Bump. Any suggestions on this?
I agree. Here's the link:
subject: SOAP in Java
Similar Threads
Urgent Help needed!! calling a https url from java program and sending a soap envelope request
Help with SAAJ and SOAP 1.2
getting null response while calling glue webservice
Axis fault
How to get SOAP response as XML in Client Struts or Servlet. ?