axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russell Butek" <bu...@us.ibm.com>
Subject RE: --package switch for Wsdl2java
Date Tue, 04 Dec 2001 16:48:07 GMT
Let me back off from my -1.  Make it a -0.  I got myself a little voting
education (thanks, Sam).  I do not mean to veto Tom's suggestion, merely to
state a negative preference.

(I hang my head in shame for not knowing proper protocol)

Russell Butek
butek@us.ibm.com


Tom Jordahl <tomj@macromedia.com> on 12/04/2001 09:38:14 AM

Please respond to axis-dev@xml.apache.org

To:   "'axis-dev@xml.apache.org'" <axis-dev@xml.apache.org>
cc:
Subject:  RE: --package switch for Wsdl2java




Well, I expected Russell to object, but not to vote -1.  Let me address
Russell's points.

> First of all, this goes against JAX-RPC.

This is an extension switch that in no way breaks JAX-RPC.  By default we
do
everything JAX-RPC (vaguely) specifies.

> Secondly, XML namespaces are confusing to most people.
> If we don't treat them properly, we will just add to the confusion.

By default Wsdl2java treats them 'properly', which in 99% of the cases is
the cause of the confusion ("Why is the Address.java file getting generated
in the com.ibm.www package when my stubs are in org.apache?").  This switch
simplifies the 'problem' in to a non-problem - everything goes in to the
package I (as a developer) want it to go in to.  I don't *have* to
understand namespaces, which is a really good thing.  I can just get my
work
done, with the caveat that *IF* my WSDL has multiple namespaces that I need
to care about, I better not be using a switch on my tool that has clear
warnings in the docs about how this can affect me.  We can also easily add
runtime warnings for the cases where a single package is going to do the
wrong thing.

> Much of our WSDL and all of the WSDL from elsewhere that we use already
have
> multiple namespaces, typically one for the WSDL objects and another for
the
> schema types.

And in every case, we have to specify the http://foo.com/namespace=test.foo
mapping on the command line for each of the many namespaces. Why?  Does
this
enhance usability?  Does it make me as a user understand namespaces better?
I say it does not.

The addition of this switch does not in any way interfere with the package
mapping switch and properties file, which are the 'right' way to do
namespaces.  So those that care, have the tools at their disposal to do the
right thing.  If a user does nothing (no switches) they get the JAX-RPC
compliant behavior, which also satisfies the 'do the right thing with
namespaces' criteria.

I think this switch only enhances the usability of the tool and does not
prevent the correct handling of namespaces.

--
Tom Jordahl
Macromedia Server Development





-----Original Message-----
From: Russell Butek [mailto:butek@us.ibm.com]
Sent: Tuesday, December 04, 2001 8:13 AM
To: axis-dev@xml.apache.org
Subject: Re: --package switch for Wsdl2java


-1 from me (I'm sure you expected this, Tom!).  I'd rather you didn't do
this.  But if I lose, PLEASE add to the user's guide (and maybe even a
brief warning in the usage statement itself) warning against using it and
why.  I'd be even happier if you generated a brief warning at runtime, too.

Let me reiterate once again why this is bad.  This option puts everything
in the same package, regardless of namespace.  First of all, this goes
against JAX-RPC.  Secondly, XML namespaces are confusing to most people.
If we don't treat them properly, we will just add to the confusion.  Much
of our WSDL and all of the WSDL from elsewhere that we use already have
multiple namespaces, typically one for the WSDL objects and another for the
schema types.

Russell Butek
butek@us.ibm.com


Tom Jordahl <tomj@macromedia.com> on 12/03/2001 05:28:06 PM

Please respond to axis-dev@xml.apache.org

To:   "'axis-dev@xml.apache.org'" <axis-dev@xml.apache.org>
cc:
Subject:  --package switch for Wsdl2java




Just a heads up.  I am going to add back the --package switch to the
Wsdl2java emitter sometime tomorrow.  I have missed this functionality
(particularly for testing) since it was removed.  It will be an error to
use
it with --NStoPkg, the namespace to package mapping switch, to prevent
confusion.

The switch will skip any namespace -> package mappings and place all of the
emitted Java files in the specified package.  You can get in to trouble if
you have name conflicts in multiple namespaces, but I expect the majority
of
WSDL files out there don't have this issue.


--
Tom Jordahl
Macromedia Server Development






Mime
View raw message