Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 35233 invoked from network); 12 May 2004 17:58:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 May 2004 17:58:08 -0000 Received: (qmail 1527 invoked by uid 500); 12 May 2004 17:58:16 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 1511 invoked by uid 500); 12 May 2004 17:58:15 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 1496 invoked by uid 98); 12 May 2004 17:58:15 -0000 Received: from MillerJa@pbworld.com by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(65.204.50.37):. Processed in 0.071383 secs); 12 May 2004 17:58:15 -0000 X-Qmail-Scanner-Mail-From: MillerJa@pbworld.com via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(65.204.50.37):. Processed in 0.071383 secs) Received: from unknown (HELO imssout1.pbworld.com) (65.204.50.37) by hermes.apache.org with SMTP; 12 May 2004 17:58:15 -0000 Received: from nycmrmt1.corp.pbwan.net ([10.1.128.220]) by nycmims2.corp.pbwan.net with Microsoft SMTPSVC(5.0.2195.6713); Wed, 12 May 2004 13:57:47 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.0.6524.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Best Practices? Date: Wed, 12 May 2004 13:58:23 -0400 Message-ID: <25D454F3DBD1AF46A718F761CB11ABE11B8F55@nycmrmt1.corp.pbwan.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Best Practices? Thread-Index: AcQ4STO6Ovm9mdIHSWuCc5qCFEfeUgAAQyPg From: "Miller, Janet" To: X-OriginalArrivalTime: 12 May 2004 17:57:47.0487 (UTC) FILETIME=[A24C6EF0:01C4384A] X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N But many people already have a service in use internally that they would = like to expose to the outside world. They have already decided what that service was supposed to do, the = arguments, etc before coding it during their initial development = process. Jan -----Original Message----- From: Pridemore, Russell (MAN-Corporate) = [mailto:Russell.Pridemore@cox.com]=20 Sent: Wednesday, May 12, 2004 1:39 PM To: 'axis-user@ws.apache.org' Subject: RE: Best Practices? I'm fairly new to web-services (and axis), but am a seasoned programmer. = Comparing web-services to other technologies, CORBA for instance, you = always started with the interface definition, never the code. I = personally don't find WSDL to be all that difficult to work with, even = by hand, and there are tools to help create it, as Anne has pointed out. I guess my point is that how are you going to begin coding something = before deciding what it is supposed to do, what arguments it will = require, etc.? Personal tastes aside, the interface seems like the = obvious place to start. If WSDL is a burden to work with, that's not a = criticism of Axis. My $.02, Russ -----Original Message----- From: Yakulis, Ross (Ross) [mailto:yakulis@avaya.com] Sent: Wednesday, May 12, 2004 1:30 PM To: axis-user@ws.apache.org; dims@apache.org Subject: RE: Best Practices? Exactly, that is why Jonathan Anderson is on the wrong track. He = describes what he currently has to do. The real question is in the long run what = is the right way to do things and push for that and get Axis to migrate in = that direction. I personally still believe that writing wsdl files is for = the birds and should be avoided. Ultimately, only tools should be = generating wsdl files, scans for rare cases. If web services are not easy to = create and deploy they are generally not much better that their = predecessors. Ross =20 -----Original Message----- From: Davanum Srinivas [mailto:davanum@gmail.com] Sent: Wednesday, May 12, 2004 10:14 AM To: axis-user@ws.apache.org Subject: Re: Best Practices? Let's twist this discussion on its head.... - Is there a list of bugs hiding in there somewhere? (bug reports) - What would you do if you were to write/re-write parts of axis? = (enhancements requests) If we can't create new bug reports / enchancements to tell axis = developers how axis should behave in the future (1.2 Final) then all = discussion is just water under the bridge. thanks, -- dims On Wed, 12 May 2004 12:12:44 -0500, Joe Plautz = wrote: >=20 > Thanks for the advice! This is exactly what I've been looking for. >=20 > It almost seems that people end up using Axis inspite of itself. But,=20 > it's just too dang easy to get something up and running. I imagine JWS = > files have > lead many people astray with their simplicity. If all services could=20 > work like them, plus using user defined objects/type with little to no = > configuration. The world would be a fabulous place. >=20 > I too have been not tying my service layer to my DAO layer. My reasons = > are more personal preferrance then need. But, I can take my DAO and=20 > put it behind something else with little changing except creating a=20 > new broker. >=20 > -Joe >=20 >=20 >=20 > ----- Original Message ----- > From: "Anderson Jonathan" > To: > Sent: Wednesday, May 12, 2004 10:03 AM > Subject: RE: Best Practices? >=20 > > I would venture to say that 80% of the complications and=20 > > frustrations implementing interoperable (WS-I compliant Doc/Literal) = > > SOAP web services > on > > Java platforms stem from the XML datatype to Java datatype binding > problem. > > > > If you take the time to learn W3C XML Schema, you'll see the=20 > > problem: it's > > not an OO type system. Therefore modeling your data types in Java=20 > > and expecting some automagic Java2WSDL utility to do all of the hard = > > work to generate your XML schema is naive, and it is unfortunate=20 > > that so many OO developers think this way. > > > > I've encountered several approaches for dealing with this problem=20 > > with Axis - virtually all of them involve hand crafting your WSDL=20 > > and XSD (with > a > > WSDL/XSD IDE, of course) and generating a Java type system using=20 > > ***a particular Java XML binding engine***. Using Axis's internal=20 > > XML binding > > engine is one of several options available to you. > > > > For more info on the XML binding problem in Java, I defer to Dennis > Sosnoski > > (www.sosnoski.com), a long-time XML deep thinker. He first turned=20 > > me onto > > the XML data binding "problem" with his excellent articles (4 parts) = > > on > the > > issues over at IBM developerWorks. > > > > http://www-106.ibm.com/developerworks/library/x-databdopt/index.html > > > > If you're trying to use Axis's internal XML binding engine, here's=20 > > some > > advice: > > > > = http://marc.theaimsgroup.com/?l=3Daxis-user&m=3D107945370506044&w=3D2 > > > > We've since moved away from this approach, and are currently using Axis's > > Message Style services to pass the SOAP Request Body DOM straight to > Castor, > > which unmarshalls the XML into a Castor generated type system. We further > > introduced a broker pattern to abstract the SOAP messaging layer=20 > > from our > > business layer, which currently is not tied to any XSD generated=20 > > types. > > > > Axis Message Style Service Implementation -> > > Service Broker Layer (unmarshalls SOAP Request DOM via Castor,=20 > > extracts > the > > necessary information from Castor types - literally traversing the graph's > > getters - to invoke Business Manager Layer, and catches Business > Exceptions > > and maps them to proper SOAP Faults using AxisFault)-> Business=20 > > Manager Layer (not tied to XSD types, but rather pure Java > business > > domain types, invokes DAO layer as needed) -> > > DAO Layer (a Spring/Hibernate layer to manage persistence for=20 > > business domain types) > > > > The problem here is definitely managing and translating between the=20 > > two > type > > systems: Castor generated classes from XSD and non-generated=20 > > Business > Domain > > classes. > > > > The alternative, however, is to just try to use the XSD generated=20 > > type system and persist that directly. This is too big of a leap=20 > > for us right > > now, as our business layer doesn't "think" in pure XSD type terms. You'll > > probably encounter this a lot given how much legacy functionality=20 > > people > are > > trying to SOAP service enable. > > > > Bottom line: implementing a WS-I compliant SOAP service in Java is=20 > > not a trivial thing. There are two types of people building Web=20 > > Services in > Java: > > those who are extremely frustrated with the completely stupid state=20 > > of the > > Java based Web Services world right now and yet still trying very=20 > > hard to > do > > it right, and those who haven't grasped that world is in a=20 > > completely > stupid > > state right now. > > > > -Jon > > > > -----Original Message----- > > From: Joe Plautz [mailto:joep@customcall.com] > > Sent: Wednesday, May 12, 2004 10:02 AM > > To: axis-user@ws.apache.org > > Subject: Re: Best Practices? > > > > > > My first attemps have started with a WSDL/Schema then I generate > everything. > > I was able to find an example at W3.org and I just manipulate it to=20 > > the > way > > I need it. I thought this to be the best way at the time because of=20 > > interoperability. > > > > From what I've been finding thus far there are no "Standard"=20 > > practices, > just > > "Accepted" practices. Starting with a class then using Java2WSDL and then > > WSDL2Java seems to be the most common. But, it almost seems that=20 > > this was > > not the intention of the designers of Axis. Why use two steps when=20 > > you can > > use one? Creating a WSDL from scratch seems like the intended way,=20 > > but is > > not the most accepted way by the developers/users of Axis. Why write what > > you can generate? > > > > I know this isn't difficult earth shattering stuff, I'm just looking = > > for > the > > best way of doing this. So, when I start working with other people=20 > > to > create > > services, we're doing it the "right" way. > > > > ----- Original Message ----- > > From: "Dorner Thomas" > > To: > > Sent: Wednesday, May 12, 2004 7:01 AM > > Subject: AW: Best Practices? > > > > > > You are right - if you will do a interoperable webservice that deal=20 > > with other clients (.Net ...) its better to go from the wsdl. > > > > But when i use String, int and so on and i generate a wsdl by=20 > > java2wsdl, I hope the wsdl i get, depends on the standard spec. for=20 > > wsdl!???? > > > > So there should no problem to use the wsdl by other languages!??? > > > > Dont know how it looks with complex datatypes!???? > > > > Do you all write your own wsdl by hand???? > > > > Tomi > > > > -----Urspr=FCngliche Nachricht----- > > Von: David Cunningham [mailto:david.cunningham@dcdominion.com] > > Gesendet: Mittwoch, 12. Mai 2004 13:14 > > An: axis-user@ws.apache.org > > Betreff: RE: Best Practices? > > > > > > I disagree, the right way is to start with your WSDL and schema=20 > > files. If > > you want any hope of being WS-I compliant or using doc/literal this=20 > > is > your > > best bet. As soon as you start with an interface, you start dealing=20 > > Java types that do not correlate to schema types very well. For=20 > > example, if you > > use: public List getStuff() or public String[] getStuff(), you will either > > generate a WSDL file that can't be parsed properly by other=20 > > consumers > (.NET, > > Glue, etc) or be bound to Java collection types that have no chance=20 > > of > being > > parsed properly by .Net (without a lot of hacking around). > > > > My recommendation, again personal preference, is always give thought = > > to > the > > XML that is going across the wire and what you are trying to send/receive > > and in what structure. This is especially important when dealing=20 > > with doc/literal since you are sending a single document over the=20 > > wire. > > > > - david > > > > -----Original Message----- > > From: Dorner Thomas [mailto:thomas.dorner@edmb.debis.com] > > Sent: Wednesday, May 12, 2004 2:03 AM > > To: 'axis-user@ws.apache.org' > > Subject: AW: Best Practices? > > > > The right way is to write a interface which includes all the Methods your > > webservice should offer. > > > > Then you use java2wsdl to generate your wsdl. You have to correct=20 > > your parameternames in your auto generated wsdl, cause the the=20 > > params looks > like > > in0, in1, in2... . > > > > Then you use wsdl2java to generate your stub, locator, skeleton,=20 > > impl and > > maybe a testclient. > > > > Now you can implement and deploy your Service by unsing the=20 > > addtional generated .wsdd files. > > > > Hope this helps you > > > > Tomi > > > > -----Urspr=FCngliche Nachricht----- > > Von: Joe Plautz [mailto:joep@customcall.com] > > Gesendet: Dienstag, 11. Mai 2004 18:48 > > An: axis-user@ws.apache.org > > Betreff: Best Practices? > > > > > > I'm a newbie looking for guidance in creating WebServices with Axis. I've > > gone through the documentation backwards and forwards and have come=20 > > up > with > > me own ways of doing things. I start with a WSDL that I create and=20 > > use WSDL2Java to generate the code and go from there. What I'm=20 > > looking for is > a > > best practices because I don't feel confident in the way I am going about > > it. > > > > Do most people start from a WSDL? Do people generate a WSDL from an=20 > > interface and go from there? Do people just create a class and a=20 > > WSDD > file? > > Or, do people use JWS files that accept a string and the string=20 > > contains > xml > > formated text? > > > > If there are any sites that cover this information, please forward=20 > > them on > > to me. > > > > Any help will be appreciated!!! > > > > Thanks, > > Joe Plautz > > joep@customcall.com > > > > > > > > > > >=20 >