axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjiva Weerawarana" <sanj...@opensource.lk>
Subject Re: Generating wrapped doc/lit style code by WSDL2Ws tool
Date Wed, 18 Feb 2004 14:54:10 GMT
Hi Susantha,

> I merged the diff. And working on adding ClientStubWriter.java changes.
> BTW can we adhere to what
>
http://www-106.ibm.com/developerworks/webservices/library/ws-whichwsdl/#N101
D2
> says ?
> It says having name="parameters" is a convention.

NO!!!!

> <message name="myMethodRequest">
>     <part name="parameters" element="myMethod"/>
> </message>
>
> Anyway we have to check whether the input element name is the same as the
> operation name which we dont do at the moment.

These are not rules defined by WSDL but random rules defined by
MSFT primarily which Axis adopted. WSDL 2.0 is changing this quite
a bit but it'll be sometime before that becomes widespread.

> Also there can be other checks we have to do before generating wrapped
> doc/lit style code. if any check fails and if --nowrapped option provided
> we have to generate doc/lit style code.

The right solution IMO is to allow the user to select with with --wrapped
or --nowrapped and then codegen accordingly (and select a suitable
default .. wrapped probably). The WSDL description and choice of
programming model are *not* coupled, contrary to what that article
appears to imply and the lousy conventions that certain folks used.

(I'm the co-author of the WSDL spec and co-editor of the upcoming
WSDL 2.0 spec as well.)

> > I have also other questions :-(
> >
> > When enumerations will be supported ?
>
> We probably have to prepare a priority list of these features and have a
plan

Does Axis' XSD parser support enumerations? If not we should wait
until the JaxMe stuff gets integrated.

Also are enumerations part of the basic profile 1.0? If yes. that
certainly raises the priorities!

> Above article says that having attributes in element's complex type is
> wrong in wrapped doc/lit style web services. Can anyone confirm this ?.

There is no such thing as "wrapped doc/lit" style Web services. The
whole doc/lit, doc/encoded, rpc/lit, rpc/encoded concepts were WSDL
inventions for alternative ways to describe a given Web service. The
main rpc vs. doc concept came from SOAP having defined an RPC convention
on top of the base message layer (interpret first child of <Body> as
method call, its children as parameters, no attributes in the
first child element, ..). The WSDL rpc mechanism is a way to describe
how to create such SOAP envelopes at a higher level than with the
XML element indicating the method etc.

It was a nice idea (IMO), but the resulting complexity of WSDL did
confuse a lot of people. So WSDL 2.0 is moving away from all this and
having just *one* way to describe a SOAP payload: *one* XML element
and it can be anything. *If* that element adheres to certain
conventions then it can be considered to as an RPC signature if
the programming model generator wishes to do so.

"Wrapped doc/lit" is an attempt at doing that - defining a set
of conventions over doc/lit to indicate that its a method. Those
conventions are however non-standard and pretty damn ad hoc and
crappy. So, the right solution for now (and for always IMO) is
to allow the programmer to decide whether they want to take a
WSDL of doc/lit style and "unwrap" the outermost element as a
method call or to leave it alone. The heuristics for automatically
doing that are just that - heuristics.

Sanjiva.


Mime
View raw message