Funny you should ask this question.

When I asked it about 6 months ago it spawned a week long thread that, in my opinion never reached a conclusion. But, this is what I gathered from it. There are three schools of thought when it comes to creating Axis web services. 1) Start with a WSDL and generate your code from that. 2) Start with a class and generate a WSDL so that you can generate the WSDD. 3)Start with a JWS or message service that accepts a string and parse it with Castor or some other xml binding engine. Remember each one has it's own specific merits and drawbacks.

1) The WSDL approach; you start with a WSDL and it is rather simple to create. Plus, it's the one location where you define your service. And then everything gets generated. The drawback comes in when you add future functionality, you end up regenerating things over and over again. And if you've added any functionality to any of the generated classes outside of the impl class, you have to be careful when doing your generation, it will get over written.

2) The class approach; you start with a class, I don't think there is an easier starting point for java developers. You create your code and expose it to the world using the WSDD's. The drawback of this is generating the WSDD's. WSDD's are a little bit more complicated than WSDL's. You could create them by hand, but it's more prone to error. And to generate them you have to be pretty comfortable in ant, it can be very hackish.

3) The String approach; I've never attempted using this approach but there is a relatively popular article that recommends this. If you are heavily invested into Castor or some other framework, I see the merits of implementing this approach. Also, you theoretically could get by with exposing only one service. The drawbacks of this, you're adding another layer to an increasingly complex puzzle. Axis does all of the parsing for you already, why add another layer?

I couldn't tell you which technique is the most popular, I would say that the WSDL and Class approaches are the most common and are split fairly evenly. The people that I've have personally run into have used the class approach exclusively. But, some of them were exposing EJB's so take that with a grain of salt.

As for books/documentation, keep waiting for an Axis specific book. None exist show what you can really do with this technology. Most just explain the architecture. One thing I have noticed though, version 1.2 documentation is way better than version 1.1.

For tools, Mindreef SoapScope, is an excellent testing tool. Reads in and validates WSDL's. You can also test the service by inputing data into a form. I use this all the time. Cape Clear has a WSDL tool that I've used a couple times. Very easy to create a WSDL from scratch.

Axis is an excellent tool. It does have a lot of power in it and can be used in just about any way you wish. But, like EJB and other distributed technologies they need to be used where appropriate. Deciding where it's appropriate is something that comes with experience not reading it from somewhere.

Have a great day,
Joe Plautz

[EMAIL PROTECTED] wrote:

Thanks, Nikki.

We have a standard of complying to Basic Profile 1.0, for interoperability but, on top of that, I'm looking for generally accepted good ways of doing stuff during development of web services servers and clients. Beyond BP 1, are there useful ways to structure WSDL and type definitions, are there any deployment tips, are there any patterns for common problems in web services, tips on building and testing, and so on. I've seen this sort of stuff for languages and technologies in the past and, no doubt, best practices will emerge on web services, in the future. Quite a good, thin, book of Java is "Java with Style" (or some such title). It would be nice to have something like that for web services, but, until then, if anyone has produced anything in this vein, that would be great.

Thanks for the links. I was aware of them but don't think they have anything specific on best practice, though some of the information might prove useful for a best practices guide.

Cheers,
Tony




Hi Tony

Not sure what you're after in particular,

For W3C's efforts in this area see links from http://www.w3.org/2002/ws/
For OASIS efforts see  http://www.oasis-open.org/specs/index.php

For Axis there is the userguide, this list & if you search the archives of
this list for "books" you may find other helpful references.

HTH
Nikki

--On Tuesday, November 16, 2004 11:41:41 +0000 [EMAIL PROTECTED] wrote:

 >
 > Does no one have, or have knowledge of, any best practice in the web
 > service arena?
 >
 > I'm looking for a set of hints and tips, rather than a 800 page book.
 >
 > Tony
 >
 >
 >
 > Does anyone know of a published set of best practices, both for web
 > services in general and Axis in particular?
 >
 > I've scoured the Net and found a few bits and pieces, but I'm looking for
 > something more substantial (though not *too* substantial).
 >
 > Tony
 >



----------------------
NJ Rogers, Technical Researcher
(Semantic Web Applications Developer)
Institute for Learning and Research Technology (ILRT)
Email:[EMAIL PROTECTED]
Tel: +44(0)117 9287096 (Direct)
Tel: +44(0)117 9287193 (Office)


Reply via email to