axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Davis" <>
Subject RE: Wsdl2Java
Date Tue, 04 Sep 2001 17:02:42 GMT
AH! EJBs!!!!

Russell Butek/Austin/IBM@IBMUS on 09/04/2001 12:49:11 PM

Please respond to

Subject:  RE: Wsdl2Java

That might be more intuitive for basic programming, but when you start
getting into enterprise sorts of things you really want to use factories to
get your things.  The ServiceName class that Tom mentioned is the factory.
Actually, you'd probably even want to go further and use
javax.naming.NamingContext, but I don't want to get into that discussion
just now.  (Not unless you really want to!)

Russell Butek

Doug Davis/Raleigh/IBM@IBMUS on 09/04/2001 09:51:58 AM

Please respond to

Subject:  RE: Wsdl2Java

hmmm, wouldn't something like:

StockQuoteServce sqs = new StockQuoteService([portType]);
sqs.getQuote( "IBM" );

be a little more intuitive?
(notice "portType" is optional)


Tom Jordahl <> on 09/04/2001 10:41:18 AM

Please respond to

To:   "''" <>
Subject:  RE: Wsdl2Java

I have a set of changes I am working on now to add still more generated
code.  The actual way to get access to the Stub class is to use the Service
class to get the named port.  I am implementing the service class
right now (85% complete).

So the actual use of the Sub code would be as follows:

  ServiceName sqs = new ServiceName();
  StockQuotePortType port = sqs.getStockQuotePort()
  float quote = port.getQuote("IBM");

There is a Service class emitted for each service present in the WSDL file.
Each class will have "get" methods for each RPC port in the service.

Each interface matches a PortType defined in the WSDL, as each port can
return a different interface (or all use the same one).

Russell and I are tracking the JAX-RPC draft.  We expect the wsdl2java tool
to handle correctly many more legal WSDL files than other tools.  All of
ones I have played with seem to ignore the multiple services/multiple ports
issue and just use the first one they find.  This makes them easy to use as
they generate a single Stub class.  But they fall down when the WSDL even
lists more than one end point (much less more than one service).

Now if I can just find a tool to merge my file with the ones in CVS.... :-)

Tom Jordahl

-----Original Message-----
From: Doug Davis []
Sent: Tuesday, September 04, 2001 9:22 AM
Subject: Re: Wsdl2Java

I understand the notion of interfaces 8-)  it's just that
when we're talking about producing code (or anything) I
would prefer if we generated as little as possible - less
things for the user to get confused by and less things to
go wrong.  Plus, if we're going to generate an interface
that will only be used by one implementation then the
interface doesn't really serve it's stated purpose - it's
just another java file that needs to be compiled.
It's not a huge thing.

Russell Butek/Austin/IBM@IBMUS on 09/04/2001 09:13:59 AM

Please respond to

Subject:  Re: Wsdl2Java

Tab characters?  There were tab characters in there?  Evil!

I'm not sure I understand your concern about generating interfaces.
Interfaces are good.  They keep people from programming to implementations.
Besides, JAX-RPC defines the generation of interfaces.

Good catch noticing the public instance vars.  It DOES look strange since
we also have accessors.  Think of it as evolving.  The first draft of
JAX-RPC I saw defined public instance vars and nothing else, but Axis
required beans (ie., accessors) so I compromised and generated both.  The
latest draft of JAX-RPC allows beans, and I've heard that Axis will soon
accept public instance vars, so we'll eventually go one way or the other.

Russell Butek

Doug Davis/Raleigh/IBM@IBMUS on 09/04/2001 07:26:28 AM

Please respond to

Subject:  Wsdl2Java

Just took a very brief look at the Wsdl2Java...
- removed the evil tab characters
- why do we generate interfaces instead of just
  the proxy classes?  I understand that conceptually there
  are interfaces in WSDL but do we really expect people to
  do something with these java files - aside from compile
  them?  I could see having them generated thru a switch
  but it seems like the default should be to generate just
  the proxy classes w/o interfaces.  It feels like we're
  exposing the inner workings of WSDL simply because it's
  there when there is no direct benefit for the end-user.
  I know that it's possible that there will be multiple
  port types but we appear to only support one and don't
  have a mechanism to select which one (yet).  It seems
  like if there's only one port type then we should not
  bother to expose the interfaces.
  Just my $0.02.
- why are the instance vars of types "public"?  Didn't want
  to change this to "private" or "protected" w/o checking
  first in case there was a reason.
Cool stuff though!!

View raw message