File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Apache Soap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Apache Soap" Watch "Apache Soap" New topic

Apache Soap

Frank Lin
Ranch Hand

Joined: Jan 26, 2001
Posts: 76
Just start getting into the details of it, and found
1. It does not mention any support to UDDI
2. Also in the section of Interoperability with Other SOAP Implementations in the User Guide, it has following comment
Apache SOAP is not WSDL aware and is unlikely to become so.
Does this hinder Apache Soap to be a viable Web Service framework?
Any comments or insights?
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Apache SOAP is a project inherited from an IBM project that predates UDDI and WSDL - it seems to have been a learning experience for the team because they started an entirely new "AXIS" project that has a more modern design.
UDDI is a directory service that in theory will let you locate a SOAP service, but you have to use WSDL to configure a client once the service is found. Sun's recent XML "Pack" contains
Java API for XML Registries (which supposedly supports UDDI and exXML registries)
Roy Huang
Ranch Hand

Joined: Nov 21, 2001
Posts: 104
Hi, for the Apache soap 2.2, it supports for UDDI search, if U download the UDDI2.0 APIs from and also teh wsdl4J.
Apache SOAP came out before UDDI and WSDL, but IBM has announced recently that they will use the Axis SOAP or some other name which use SAX as the XML parser to improve the speed for parsing xml document.
But there're very few examples concerning this soap at the current time, I would suggest to use the apache soap.
take care: the Axis soap right now doesn't support for UDDI publishing!!!
Hope it helps,

SCJP 1.4/SCBCD/SCWCD<br />MCSE<br />IBM professional XML Developer<br />SAP certified Development Consultant (NetWeaver portal and Web JavaApplication)
Frank Lin
Ranch Hand

Joined: Jan 26, 2001
Posts: 76
Thanks, William and Roy. I think I got pretty good idea now with your help.
Jeff Chi

Joined: Jan 15, 2002
Posts: 6
Which SOAP do you recommend then? Apache's or IBM's....
Doug Wang
Ranch Hand

Joined: Oct 05, 2001
Posts: 445
Originally posted by Jeff C:
Which SOAP do you recommend then? Apache's or IBM's....

Hi, Jeff
I think Apache's and IBM's are the same. IBM's SOAP4J has been moved on to form Apache SOAP since April 2000.
Axix SOAP is another SOAP project lauched by Apache. "The intention is to create a more modular, more flexible, and higher-performing SOAP implementation (relative to Apache SOAP 2.0, for using SAX internally rather than DOM)". Axix SOAP may be called SOAP 3.0.
See Apache's web site.

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep
Benson Fung
Ranch Hand

Joined: Apr 10, 2003
Posts: 214
I read an example of using Apache SOAP, the client doesn't use WSDL to send SOAP request. they just use the following code fragment :
public class CalcClient {
public static void main(String[] args) throws Exception {
URL url = new URL ("http://localhost:8080/soap/servlet/rpcrouter");
Integer p1 = new Integer(args[0]);
Integer p2 = new Integer(args[1]);

// Build the call.
Call call = new Call();
call.setTargetObjectURI("urn njavaserver");
Vector params = new Vector();
params.addElement(new Parameter("p1", Integer.class, p1, null));
params.addElement(new Parameter("p2", Integer.class, p2, null));
call.setParams (params);
// make the call: note that the action URI is empty because the
// XML-SOAP rpc router does not need this. This may change in the
// future.
Response resp = call.invoke(url, "" );
// Check the response.
if ( resp.generatedFault() ) {
Fault fault = resp.getFault ();
System.out.println("The call failed: ");
System.out.println("Fault Code = " + fault.getFaultCode());
System.out.println("Fault String = " + fault.getFaultString());
else {
Parameter result = resp.getReturnValue();
deployment descriptor :
<isd:service xmlns:isd=""
id="urn njavaserver">
<isd rovider type="java"
methods="add subtract">
<isd:java class="onjava.CalcService"/>
</isd rovider>
web services method :
package onjava;
public class CalcService {
public int add(int p1, int p2) {

return p1 + p2;
public int subtract(int p1, int p2) {
return p1 - p2;
It seems it doesn't use WSDL, but still can send SOAP request to SOAP server. Therefore, right now, I am confused that whether WSDL is necessary in a web services application.

Please help.
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
It seems it doesn't use WSDL, but still can send SOAP request to SOAP server. Therefore, right now, I am confused that whether WSDL is necessary in a web services application.
The purpose of a WSDL document is to tell someone how to use some particular web service (what kind of input and output, where in the network to send the request, and so on). If the client knows these details already, there's no need to look up the WSDL and inspect it for that same information.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I agree. Here's the link:
subject: Apache Soap
jQuery in Action, 3rd edition