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: wsdl patch
Date Tue, 18 Sep 2001 21:48:27 GMT
Ravi, I just checked in most of your changes, with some tweaks.  Thanks for
the work.  Let me know whether I screwed anything up.  Here's a summary of
what I did - and didn't do.

1. Surface the auto packageName generation all the way up to WSDL2Java
- I had some problems with this.  When I made "-p" ARGUMENT_OPTIONAL as you
did it wouldn't accept "-p google.plex".  It only accepted "-p" with no
arguments.  So I did everything you did EXCEPT I left "-p"
ARGUMENT_REQUIRED.

2. Add an output directory option
- Done.

3. Fix a bug in WriteType to avoid creating duplicate constructors, when
elements size is 0
- Done.

4. Fix another small bug in the skeleton class with respect to the name
of the impl class
- I don't agree this is a bug.  The type of the impl is either <portType>
(with only -s) or <portType>Axis (with -s -m).  The names of the skeleton,
stub, and by extrapolation, the impl, are all based on the binding name.
So the impl name is ALWAYS <binding>Impl.  I'm not sure this is necessarily
the right thing to do.  It's just what I did.  You also asked why we'd want
-s without -m.  Answer:  for remote/local transparency; in other words the
client should program to the interface <portType> and the implementation of
<portType> will be either a stub or the actual implementation.  To
accomplish this we don't want the first parameter of every method to be
MessageContext.  Take a look at what I did and let me know if you still
have problems with it.

5. Emit a dummy impl class. The idea is that as soon as generation is
done the src will build without any compile errors
- Done, with the caveats above.  Also, the impl class is generated ONLY if
it doesn't already exist.

6. Emit classes to the appropriate directory based on package name
- Done.

7. Some very minor changes to WsdlAttributes with one question marked as
RRK regarding faultBodyType
- I did not add these.  Tom Jordahl wrote this class and I figure he should
have some say about these changes.  He's on vacation until late this week
or early next week, so I just left it out until he's back.

8. Added more type mappings for standard xsd to java
- Done.

Russell Butek
butek@us.ibm.com



Ravi Kumar <rkumar@borland.com> on 09/18/2001 01:12:20 PM

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

To:   axis-dev@xml.apache.org
cc:
Subject:  Re: wsdl patch



Russel,

Thanks for your quick response. my comments below

Ravi

Russell Butek wrote:

> Thanks, Ravi.  These look mostly reasonable.  I've got a couple
questions,
> though.  Here's my 2 cents' worth, between <RJB>...</RJB>.  If folks
agree
> with my +1's, I'll make those particular changes.  I'll reserve the rest
> until Ravi and Tom comment.
>
> Attached is a set of changes in the WSDL -> Java area which you might
> find useful
>
> 1. Surface the auto packageName generation all the way up to WSDL2Java
> <RJB>
> +1
> </RJB>
>
> 2. Add an output directory option
> <RJB>
> +1 with modifications.  If the --output option is not specified, the
> generated files go into the current directory (it might just be an oops,
> but with these fixes, if --output is NOT specified, the files are
generated
> in "/")

I realized this as soon as I was driving back home last night.

This change is what I thought will do:

---- from
new FileWriter(outputDir + "/" + getPackageDir() + fileName)
--- to
new FileWriter(getPackageDir() + fileName)

and modify getPackageDir() to

    private String getPackageDir() {
      String value = "";
      if ("".equals(outputDir))
        value = "";
      else
        value = outputDir + "/";

      String packageDir = (packageName == null?"":packageName.replace('.',
'/'));
      if( "".equals(packageDir))
        return value + packageDir;
      else
        return value + packageDir +"/";
    }


> .
> </RJB>
>
> 3. Fix a bug in WriteType to avoid creating duplicate constructors, when
> elements size is 0
> <RJB>
> +1
> </RJB>
>
> 4. Fix another small bug in the skeleton class with respect to the name
> of the impl class
> <RJB>
> ??  What's the bug?
> </RJB>

see next

>
>
> 5. Emit a dummy impl class. The idea is that as soon as generation is
> done the src will build without any compile errors
> <RJB>
> +1 with modifications.  If the Impl file already exists, DO NOT overwrite
> it.  Also, this impl is only generated when "-s -m" are both specified.
> The dummy Impl should be specified whenever "-s" is specified, whether or
> not "-m" is there.

Hmm, haven't looked at this --what is the purpose of -s without -m?

> Why is your impl class name based on portType rather
> than binding?

This is what used to happen

public class InteropTestSoapBindingSkeleton {
    private InteropTestPortTypeAxis impl;

    public InteropTestSoapBindingSkeleton() {
        this.impl = new InteropTestSoapBindingImpl();
    }

    public InteropTestSoapBindingSkeleton(InteropTestPortTypeAxis impl) {
        this.impl = impl;
    }


This is what happens with my change

public class InteropTestSoapBindingSkeleton {
    private InteropTestPortTypeAxis impl;

    public InteropTestSoapBindingSkeleton() {
        this.impl = new InteropTestPortTypeAxisImpl();
    }

    public InteropTestSoapBindingSkeleton(InteropTestPortTypeAxis impl) {
        this.impl = impl;
    }

Why PortType and no binding impl?

Having no impl class to look at, I guessed it's just going to be an
implementation of the InteropTestPortTypeAxis interface. So, I named it so.
The
rationale is that there is no binding specific stuff which need to part of
the
implementation (...?, wonder if I am right ???) My guess, at this stage of
the
execution, all that has been already processed and the engine is looking
for an
implementation of the PortType.


>
> </RJB>
>
> 6. Emit classes to the appropriate directory based on package name
> <RJB>
> +1
> </RJB>
>
> 7. Some very minor changes to WsdlAttributes with one question marked as
> RRK regarding faultBodyType
> <RJB>
> ??  Tom, this is your code.  Do you agree with Ravi's changes?
> </RJB>
>
> 8. Added more type mappings for standard xsd to java
> <RJB>
> +1
> </RJB>

BTW, are you guys looking at java2wsdl as well ?

Rgds
Ravi





Mime
View raw message