axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <>
Subject RE: WSDL2Java doc/literal port type interface
Date Thu, 14 Mar 2002 15:07:54 GMT


I have gotten a lot of questions on this, and you do a much better job of explaining it that
I do.

Could you put this text in to the Axis docs?

Tom Jordahl

-----Original Message-----
From: Russell Butek []
Sent: Thursday, March 14, 2002 9:52 AM
Subject: Re: WSDL2Java doc/literal port type interface

It is VERY unfortunate that the interface needs information from both the
portType AND the binding.  This is a topic of discussion for WSDL version

JAX-RPC says (section 4.3.3):  "The name of the Java interface is mapped
from the name attribute of the wsdl:portType element. ... If the mapping to
a service definition interface uses elements of the wsdl:binding ..., then
the name of the service definition interface is mapped from the name of the
wsdel:binding element."

Note the name of the spec.  It contains the string "RPC".  So this spec,
and WSDL2Java, assumes that the interface generated from the portType is an
RPC interface.  If information from the binding tells us otherwise (in
other words, we use elements of the wsdl:binding), then the name of the
interface is derived instead from the binding.

Note that we could have one portType - pt - and two bindings:  bRPC and
bDoc.  Since doc/lit changes what the interface looks like, we cannot use a
single interface for both of these bindings, so we end up with 2 interfaces
- pt and another named bDoc - and two stubs - bRPCStub (which implements
pt) and bDocStub (which implements bDoc).

Ugly, isn't it?  But you can see why it's necessary.  Since doc/lit changes
what the interface looks like, and we could have more than one binding
refering to a single portType, we have to create more than one interface
and each interface must have a unique name.

Russell Butek

Thomas Sandholm <> on 03/13/2002 05:24:30 PM

Please respond to

Subject:    WSDL2Java doc/literal port type interface

I have noticed that the newest code from cvs generates a port type
interface using the wsdl:portType name when rpc/encoded is used, but if
doc/literal is used the wsdl:binding name is used. Is there any particular
design rationale behind this? I think it seems to break the idea of not
exposing the fact that doc/literal is used to the client or to the service
implementer. Besides that it seems like this interface should not have any
knowledge about the binding, so it seems strange that it uses the name of
the binding in its own name in the doc/literal approach.
Any thoughts about this?


View raw message