You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Russell Butek <bu...@us.ibm.com> on 2001/08/17 21:09:39 UTC

WSDL->Java emitter

Here's my toy emitter:  (See attached file: emitter.jar).  And WSDL4J will
also be handy:  (See attached file: wsdl4j.jar).

To run it, simply put emitter.jar and wsdl4j.jar in your CLASSPATH and run:
"java org.apache.axis.wsdl.Emitter <wsdl file>"

Here's a sample of the results:  (See attached file: AddressBook.zip).  It
contains AddressBook.wsdl and the files generated from it.

Reasons why folks decided to start with this emitter.
- We have to start with something, and it's easier to grow something that's
little than to shoehorn something that's big.
- It uses WSDL4J.
- It follows the JAX RPC model, generating interfaces, stubs, skeletons for
portTypes; and classes and holders for complexTypes.

Caveats
- The generated bindings cannot be compiled or run with AXIS as it is
today.  It assumes some things that aren't in the official AXIS codebase
yet:  AxisFault extends java.rmi.RemoteException (required by JAX RPC), a
couple new subclasses of AxisFault (function required by the sample
AddressBookProxy but modified to conform to JAX RPC), the output parameter
model that I presented earlier this week.
- All bindings are generated from the <portType> tag.  It ignores the
<binding> tag.
- The skeleton assumes that the name of the server-side implementation is
the portType name + "Impl".
- The generated bindings are not packaged (ie., the bindings from
AddressBook.wsdl aren't in samples.addr like the sample is).
- The emitter source wasn't written with the Java coding conventions in
mind.  I was able to run it through a tool that supposedly fixes it to
follow the standard.  I say supposedly because I don't know the conventions
very well (learning it is my first task for Monday).  The generated code
doesn't follow the standard either, and there's no tool that could fix
that, but that can be fixed as this thing grows.

Russell Butek
butek@us.ibm.com