axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russell Butek" <>
Subject RE: --package switch for Wsdl2java
Date Tue, 04 Dec 2001 16:19:29 GMT
I'll present my counterpoints to Tom and then shut up.  If folks want the
--package option, as long as the warnings are in place, I won't fight any
more (just squirm a little).

Tom wrote:
> > First of all, this goes against JAX-RPC.
> This is an extension switch that in no way breaks JAX-RPC.  By default we
> everything JAX-RPC (vaguely) specifies.

It breaks JAX-RPC.  Section 4.3.1:  "However, the JAX-RPC 1.0 requires that
a namespace definition in a WSDL document MUST be mapped to a UNIQUE Java
package name."

> > 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 file getting
> in the package when my stubs are in org.apache?").

Simple!  They're in different namespaces!  Understand that and you're a
long way to understanding namespaces.

>  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
> done, with the caveat that *IF* my WSDL has multiple namespaces that I
> 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
> runtime warnings for the cases where a single package is going to do the
> wrong thing.

I think this is the essence of where we disagree.  Allowing people to just
get their work done without understanding namespaces is like letting folks
program in Java without understanding packages (ie., putting everything in
the default, unnamed package).  I believe this is a disservice to users.
Tom does not.

> > 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
> mapping on the command line for each of the many namespaces. Why?  Does
> enhance usability?  Does it make me as a user understand namespaces
> I say it does not.

First of all, you DO NOT have to specify anything on the command line.  If
no mapping is specified, it will create a package - in this case,
"".  If we want tests that go to, we could simply create
the namespace "foo.test".  If we don't want to change the namespace then,
yes, I agree that -N is a little less usable than -p.  But you could also
use the file, do the mapping ONCE, and still not have to
put anything on the command line.

> The addition of this switch does not in any way interfere with the
> 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
> 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.

You have to know more to do the right thing, but we'll let you do the wrong
thing easily?  Tsk tsk.

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

View raw message