Home > Archive > Java Help > January 2008 > Re: What is more "usual": creating webservice from existing java
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: What is more "usual": creating webservice from existing java
|
|
| Arne Vajhøj 2008-01-25, 10:26 pm |
| Jason Stacy wrote:
> As well known one can start to create WebServices by two ways:
>
> 1.) create a WSDL from an existing java class (with webservice annotations)
> or
> 2.) Create a java class source skeleton from an existing WSDL definition file.
>
> Which approach is more usual?
>
> If webservice projects are started in real world which is preferable ?
My impression is that small solution are done Java->WSDL but
complex solutions are done WSDL->Java.
Reason: Java is 10 times easier to write than WSDL (at least for a
Java programmer), so if you are going to spend a w doing a
web service you prefer to start with Java - are you permanent
working with web services, dealing with interop issues with .NET,
PHP and Python then you will soon read WSDL as easily as Java and
then you will start with that.
Arne
| |
|
| Arne Vajhøj wrote:
> My impression is that small solution are done Java->WSDL but
> complex solutions are done WSDL->Java.
>
> Reason: Java is 10 times easier to write than WSDL (at least for a
> Java programmer), so if you are going to spend a w doing a
> web service you prefer to start with Java - are you permanent
> working with web services, dealing with interop issues with .NET,
> PHP and Python then you will soon read WSDL as easily as Java and
> then you will start with that.
Unfortunately this approach disregards sound engineering reasons to go in one
direction or the other, and such reasons exist.
The use case for WSDLs is to guarantee that web service consumers understand
and use the interface recognized by a deployed web service. It's the
interface contract, equivalent to a Java interface or CORBA IDL file. It
isn't so much for the web service provider.
WSDLs must be crafted so that they accurately represent an enforceable
contract for the web service. Whether you are a newbie or a seasoned
web-service practitioner doesn't change that. Even a newbie must bear in mind
the real purpose of the WSDL, and even the veteran will develop WSDLs using a
mix of top-down, bottom-up and middle-out development. Once the WSDL is out
there, it /defines/ the web service, completely irrespective of anyone's skill
level or experience. All implementations service and client must thereafter
conform to the WSDL, no matter how they are developed.
The matter of familiarity with the format is a red herring.
--
Lew
|
|
|
|
|