Re: Axis question: what is the correct way to use Axis?



Lew wrote:
ed wrote:
Hello,

I am investigating creating webservices with axis.

I notice that you can just create a bean as a jws file and it will
generate the wsdl.... instant web services....

Yet, I see that many people are running wsdl2java -First creating the
WSDL to generate the java stubs BUT WHY would you do it this way as
opposed to writing your java first, and then exposing it as a
service? Seems very backward....

Ed

Actually it's very forward. Starting from implementation to create
specification is what's backwards.

Trouble is, going Java -> WSDL ties you to the first implementation,
and may not be easily interoperable with non-Java Web service clients.

The WSDL is a specification for the Web service. Like an interface in
Java, a WSDL document defines the contract for the service. It should
come first as a concomitant to the design process.

Also, one can tune the WSDL to accord with the whims of different
popular environments, like .NET, which is most comfortable with
certain conventions about SOAP element names and the use of
"document-literal" specification rather than "RPC" modes. Then all
possible expressions of the WSDL, be they C#, Perl, Java or whatever,
can play nicely together.

Also, if someday you're going to create rev. 2 of the service without
breaking compatibility with the rev 1. clients, the XMLSchema in the WSDL
makes it clear how to do this compatibly (add optional elements and
attributes to existing types, create derived types using substitution
groups, etc.), while trying to modify Java in a way that produces compatible
WSDL is nearly hopeless.


.



Relevant Pages

  • Re: Axis question: what is the correct way to use Axis?
    ... WSDL to generate the java stubs BUT WHY would you do it this way as ... Trouble is, going Java -> WSDL ties you to the first implementation, and may not be easily interoperable with non-Java Web service clients. ... a WSDL document defines the contract for the service. ...
    (comp.lang.java.programmer)
  • Re: What is more "usual": creating webservice from existing java class or starting from WSDL definit
    ... Java is 10 times easier to write than WSDL (at least for a ... Unfortunately this approach disregards sound engineering reasons to go in one direction or the other, ... The use case for WSDLs is to guarantee that web service consumers understand and use the interface recognized by a deployed web service. ...
    (comp.lang.java.help)
  • How do you transparently implement the same web service (WSDL) with java axis and .NET ?
    ... When I have tried to generate java and C# servers/clients from the same ... WSDL as described further below, these are the results I have been able ... When I try to invoke a C# web service with a java axis client I get the ... ..NET that are supporting the same WSDL and to be able to reuse client ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: How do you transparently implement the same web service (WSDL) with java axis and .NET ?
    ... > When I have tried to generate java and C# servers/clients from the same ... > WSDL as described further below, these are the results I have been able ... > When I try to invoke a C# web service with a java axis client I get the ... > .NET that are supporting the same WSDL and to be able to reuse client ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: web services - need help
    ... WSDLs don't decode anything. ... The Microsoft and Java platforms respectively encode to XML from their native types, and decode from XML to their native types. ... The WSDL is the schema that guides the process. ...
    (comp.lang.java.programmer)