You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Steve Loughran <st...@iseran.com> on 2003/03/06 00:01:29 UTC
Re: wsdl and documentation
----- Original Message -----
From: "Pascale, Peter H." <Pe...@pearson.com>
To: <ax...@ws.apache.org>
Sent: Wednesday, February 26, 2003 06:33
Subject: RE: wsdl and documentation
> Why does java2wsdl run against the .class files? Is that to ensure the
WSDL
> is generated from a compile-able version of the interface? Or because
> reflection is the main approach to capturing the necessary info?
reflection is the main approach to getting the info, though debugging info
is used to get at things like parameter names. The alternative would be to
parse the source, and there is no need to do that when reflection does it
for you.
>
> I guess this kills my thinking that this might be simple.
>
i never thought it'd be simple :(. And like I said before: xdoclet. Though I
still think you should write the WSDL and generate the server and client
code from it, as if it was just another IDL syntax.
> Peter
>
> -----Original Message-----
> From: Steve Loughran [mailto:steve_l@iseran.com]
> Sent: Tuesday, February 25, 2003 10:37 AM
> To: axis-user@ws.apache.org
> Subject: Re: wsdl and documentation
>
>
> ----- Original Message -----
> From: "Pascale, Peter H." <Pe...@pearson.com>
> To: <ax...@ws.apache.org>
> Sent: Tuesday, February 25, 2003 07:49
> Subject: RE: wsdl and documentation
>
>
> > This is an interesting thought - it doesn't seem like it would be that
> hard.
> > Is anyone doing this, or interested in pairing up on it? I'd be game.
How
> > can you find out if someone else is already working it out?
> >
> > Peter
>
> java2wsdl runs against .class files. To get the javadocs you need to get
at
> the .java source, then somehow preserve the results for the existing
> java2wsdl file *or* completely generate the WSDL at compile time. Why not
> just write the WSDL and create the server-side code and the client-side
> code?
>
> if you must do it, use xdoclet as the foundation.
>
>
****************************************************************************
> This email may contain confidential material.
> If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
>
****************************************************************************
>
Re: wsdl and documentation
Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Nicholas" <nw...@yahoo.com>
To: <ax...@ws.apache.org>
Sent: Wednesday, March 05, 2003 15:18
Subject: Re: wsdl and documentation
> > i never thought it'd be simple :(. And like I said
> > before: xdoclet. Though I
> > still think you should write the WSDL and generate
> > the server and client
> > code from it, as if it was just another IDL syntax.
>
> Anyone know about any Ant tasks to do exactly this ?
<axis-wsdl2java>
The build file snippet I use to do this does the following
1. check that the source is up to date w.r.t the .WSDL file
2. create the soap api in build/axis/generated/ package tree
3. copy some (but not all) of the generated stuff to build/axis/src. I strip
out the bits I dont want.
My IDE and main <javac> task includes build/axis/src in the list of files to
compile, and depends on the "soapapi" target.
The hard part is now that WSDL is butt-ugly.
<!--
=================================================================== -->
<!-- SOAP -->
<!--
=================================================================== -->
<target name="check-soapapi">
<uptodate property="soapapi.uptodate"
targetfile="${build.axis.dir}/uptodate.txt"
srcfile="${zoo.wsdl}" />
</target>
<!-- create client and server stubs using axis -->
<target name="create-soapapi"
depends="init,check-soapapi"
unless="soapapi.uptodate"
>
<axis-wsdl2java
output="${build.axis.generated.dir}"
serverside="true"
skeletondeploy="true"
url="${zoo.wsdl}"
verbose="true"
testcase="true"
>
<mapping
namespace="http://zoo/"
package="${axis.soapapi.package}" />
<mapping
namespace="http://ranier:8080/zoo/dtds/zoo.xsd"
package="${axis.soapapi.package}.data" />
</axis-wsdl2java>
</target>
<!-- copy all but the zoo.java class and the test case -->
<target name="soapapi"
depends="create-soapapi"
unless="soapapi.uptodate"
description="pull generated classes into a directory for inclusion into
javac">
<mkdir dir="${build.axis.src.dir}/${axis.soapapi.package.dirs}"/>
<copy todir="${build.axis.src.dir}/${axis.soapapi.package.dirs}">
<fileset
dir="${build.axis.generated.dir}/${axis.soapapi.package.dirs}">
<include name="**/*.java"/>
<exclude name="ZooBindingImpl.java"/>
<exclude name="ZooTestCase.java"/>
<exclude name="ZooLocator.java"/>
<exclude name="ZooBindingStub.java"/>
<include name="*.wsdd"/>
</fileset>
</copy>
<touch file="${build.axis.dir}/uptodate.txt"/>
</target>
Re: wsdl and documentation
Posted by Nicholas <nw...@yahoo.com>.
> i never thought it'd be simple :(. And like I said
> before: xdoclet. Though I
> still think you should write the WSDL and generate
> the server and client
> code from it, as if it was just another IDL syntax.
Anyone know about any Ant tasks to do exactly this ?
//Nicholas
--- Steve Loughran <st...@iseran.com> wrote:
>
>
> ----- Original Message -----
> From: "Pascale, Peter H."
> <Pe...@pearson.com>
> To: <ax...@ws.apache.org>
> Sent: Wednesday, February 26, 2003 06:33
> Subject: RE: wsdl and documentation
>
>
> > Why does java2wsdl run against the .class files?
> Is that to ensure the
> WSDL
> > is generated from a compile-able version of the
> interface? Or because
> > reflection is the main approach to capturing the
> necessary info?
>
> reflection is the main approach to getting the info,
> though debugging info
> is used to get at things like parameter names. The
> alternative would be to
> parse the source, and there is no need to do that
> when reflection does it
> for you.
>
> >
> > I guess this kills my thinking that this might be
> simple.
> >
>
> i never thought it'd be simple :(. And like I said
> before: xdoclet. Though I
> still think you should write the WSDL and generate
> the server and client
> code from it, as if it was just another IDL syntax.
>
> > Peter
> >
> > -----Original Message-----
> > From: Steve Loughran [mailto:steve_l@iseran.com]
> > Sent: Tuesday, February 25, 2003 10:37 AM
> > To: axis-user@ws.apache.org
> > Subject: Re: wsdl and documentation
> >
> >
> > ----- Original Message -----
> > From: "Pascale, Peter H."
> <Pe...@pearson.com>
> > To: <ax...@ws.apache.org>
> > Sent: Tuesday, February 25, 2003 07:49
> > Subject: RE: wsdl and documentation
> >
> >
> > > This is an interesting thought - it doesn't seem
> like it would be that
> > hard.
> > > Is anyone doing this, or interested in pairing
> up on it? I'd be game.
> How
> > > can you find out if someone else is already
> working it out?
> > >
> > > Peter
> >
> > java2wsdl runs against .class files. To get the
> javadocs you need to get
> at
> > the .java source, then somehow preserve the
> results for the existing
> > java2wsdl file *or* completely generate the WSDL
> at compile time. Why not
> > just write the WSDL and create the server-side
> code and the client-side
> > code?
> >
> > if you must do it, use xdoclet as the foundation.
> >
> >
>
****************************************************************************
> > This email may contain confidential material.
> > If you were not an intended recipient,
> > Please notify the sender and delete all copies.
> > We may monitor email to and from our network.
> >
>
****************************************************************************
> >
>
=====
Nicholas Whitehead
Home: (973) 377 9335
Cell: (201) 615 2716
nwhitehe@yahoo.com
Get Your News From The Crowbar: http://crowbar.dnsalias.com:443/crowbar/