axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hittesdorf,Michael" <Michael.Hittesd...@cna.com>
Subject RE: Why use WSDL?
Date Thu, 06 May 2004 15:42:45 GMT

Some good reasons to use WSDL:

1. WSDL aids interoperability. You can post your WSDL to a directory and
any Web Services developer in any technology (Java, .NET, etc.) will
have everything they need to build a client to invoke your service
(assuming it conforms to established conventions/standards, such as
WS-I)

2. WSDL is more expressive than Java alone. With WSDL I can specify
message payloads, invocation styles (RPC or document) and encoding, as
well as endpoint addresses.

3. WSDL is a required artifact for many testing tools, Web Services
frameworks, and service management products. Without WSDL, you can't
take advantage of these technologies

4. WSDL is a standard.  Though Axis lets you develop 'Web Services'
without WSDL, this is not the accepted approach.  You are better off
conforming to standards and conventions when building software that
potentially needs to communicate with the outside world.

5. WSDL assists in portability. If you want to switch from Axis to
another Web Services toolkit, you will have a definition of your service
from which to start.


There are probably other reasons but these are what comes immediately to
mind.

Mick


-----Original Message-----
From: Robert Mecklenburg [mailto:mecklen@realmsys.com]
Sent: Thursday, May 06, 2004 9:17 AM
To: Axis Users
Subject: Why use WSDL?


I'm new to axis and web services and I have a basic question.

Why bother with wsdl?

Here is a service:

public class Service
{
  public String doSomething(String name) throws RemoteException
  { ...
    return result;
  }
}


Here is a client:

public class Client
{
  public String add(String name) throws AxisFault
  {
    Call call = new Call(getServerURL() + "/Service");
    return (String) call.invoke("doSomething", new Object[] {name});
  }
}


What could be simpler?  When I started with axis I wrote interfaces,
then ran Java2WSDL, then generated client and server stubs with
WSDL2Java.  For a similar service I wound up with 7 classes and 200
lines of code -- all of which appears to be pointless.  I can do the
same thing with 0 extra classes and two lines of simple java if I
avoid the WSDL.


So I'm trying to figure out what I'm missing.  Obviously someone
thinks WSDL is worth all the extra obscurity, code bloat, and build
complexity.  Please tell me your reasons.


Thanks!
--
Robert

E-MAIL CONFIDENTIALITY NOTICE:  The contents of this e-mail message and any attachments are
intended solely for the
addressee(s) and may contain confidential and/or legally privileged information. If you are
not the
intended recipient of this message or if this message has been addressed to you in error,
please
immediately alert the sender by reply e-mail and then delete this message and any attachments.
If you
are not the intended recipient, you are notified that any use, dissemination, distribution,
copying, or
storage of this message or any attachment is strictly prohibited.

Mime
View raw message