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 MArtin Schumacher <ma...@keineantwort.de> on 2004/08/02 14:55:31 UTC
using axis ant tasks, documentation
Hi there,
since several days I try to figure out how axis and the ant tasks for
axis work. But clear documentation is quite seldom...
Right now I try to find out how to use the complexType-Tag... but there
is no documentation about that. Does anyone has an idea? Some Links to
tutorials which work with the ant-tasks or some stuff like that. There
are a lot of tutorials where I can learn how to write my own WSDL ans
WSDD Files... But why do I have to do that?
MArtin
Re: using axis ant tasks, documentation
Posted by MArtin Schumacher <ma...@keineantwort.de>.
Arnaud Vezain wrote:
> The fact that your service is a wrapped one change the problem. I am not a
> specialist of wrapped service but here is what you can read in the axis
> user guide :
>
> "In other words, the ENTIRE <PurchaseOrder> element would be handed to
> your method as a single bean with three fields inside it. On the other
> hand, for a wrapped style service, it would map to a method like this:
>
> public void purchaseOrder(String item, int quantity, String description)"
> The complexType PurshaseOrder turns into new method params.
>
> You'd be beter check that.
Thx... I checked that. And I think I was wrong with wrapped-styled
services. I just took it from an example. Now I changed it into
RPC-styled services, but that did't change my Problem...
MArtin
>
>><axis-java2wsdl
>> style="wrapped"
>> location="${deploy.admin.url}/myws/services/Admin"
>> namespace="${namespace}"
>> output="${local.wsdl}"
>> classname="${package}.AdminWebServiceInterface" >
>> <classpath>
>> <pathelement path="classpath"/>
>> <pathelement location="${build.dest.java}"/>
>> </classpath>
>> <complextype
>> classname="${package}.UserTOImpl"
>> namespace="urn:admin" />
>></axis-java2wsdl>
>>-----------------------------------------------------------------------
>>--
>>
>>But if I run this I get the output below. The wired thing is, that the
>>"UserTOImpl" exists at the same place like the
>>"AdminWebServiceInterface". Without using the ComplexType everything
>>works fine... I am really confused...
>>
>>MArtin
>>
>>Exception:
>>-----------------------------------------------------------------------
>>--
>>[axis-java2wsdl] log4j:WARN No appenders could be found for logger
>>(org.apache.axis.i18n.ProjectResourceBundle).
>>[axis-java2wsdl] log4j:WARN Please initialize the log4j system
>>properly.
>>[axis-java2wsdl] Java2WSDL
>>de.dpcom.test.webservices.server.AdminWebServiceInterface
>>[axis-java2wsdl] java.lang.ClassNotFoundException:
>>de.dpcom.test.webservices.server.UserTOImpl
>>[axis-java2wsdl] at
>>org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoade
>>r.java:1149)
>>[axis-java2wsdl] at
>>org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1090)
>>[axis-java2wsdl] at
>>org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:960)
>>[axis-java2wsdl] at
>>java.lang.ClassLoader.loadClass(ClassLoader.java:255)
>>[axis-java2wsdl] at
>>java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
>>[axis-java2wsdl] at java.lang.Class.forName0(Native Method)
>>[axis-java2wsdl] at java.lang.Class.forName(Class.java:140)
>>[axis-java2wsdl] at
>>org.apache.axis.tools.ant.wsdl.ComplexType.register(ComplexType.java:52
>>)
>>[axis-java2wsdl] at
>>org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execute(Java2WsdlAntTas
>>k.java:206)
>>[axis-java2wsdl] at
>>org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>>[axis-java2wsdl] at
>>org.apache.tools.ant.Task.perform(Task.java:364)
>>[axis-java2wsdl] at
>>org.apache.tools.ant.Target.execute(Target.java:341)
>>[axis-java2wsdl] at
>>org.apache.tools.ant.Target.performTasks(Target.java:369)
>>[axis-java2wsdl] at
>>org.apache.tools.ant.Project.executeTarget(Project.java:1214)
>>[axis-java2wsdl] at
>>org.apache.tools.ant.Project.executeTargets(Project.java:1062)
>>[axis-java2wsdl] at
>>org.apache.tools.ant.Main.runBuild(Main.java:673)
>>[axis-java2wsdl] at
>>org.apache.tools.ant.Main.startAnt(Main.java:188)
>>[axis-java2wsdl] at
>>org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
>>[axis-java2wsdl] at
>>org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
>>-----------------------------------------------------------------------
>>--
>>
>>
>>
>
>
>
>
>
>
>
>
Re: using axis ant tasks, documentation
Posted by Arnaud Vezain <a....@nancy.fnclcc.fr>.
The fact that your service is a wrapped one change the problem. I am not a
specialist of wrapped service but here is what you can read in the axis
user guide :
"In other words, the ENTIRE <PurchaseOrder> element would be handed to
your method as a single bean with three fields inside it. On the other
hand, for a wrapped style service, it would map to a method like this:
public void purchaseOrder(String item, int quantity, String description)"
The complexType PurshaseOrder turns into new method params.
You'd be beter check that.
> <axis-java2wsdl
> style="wrapped"
> location="${deploy.admin.url}/myws/services/Admin"
> namespace="${namespace}"
> output="${local.wsdl}"
> classname="${package}.AdminWebServiceInterface" >
> <classpath>
> <pathelement path="classpath"/>
> <pathelement location="${build.dest.java}"/>
> </classpath>
> <complextype
> classname="${package}.UserTOImpl"
> namespace="urn:admin" />
> </axis-java2wsdl>
> -----------------------------------------------------------------------
> --
>
> But if I run this I get the output below. The wired thing is, that the
> "UserTOImpl" exists at the same place like the
> "AdminWebServiceInterface". Without using the ComplexType everything
> works fine... I am really confused...
>
> MArtin
>
> Exception:
> -----------------------------------------------------------------------
> --
> [axis-java2wsdl] log4j:WARN No appenders could be found for logger
> (org.apache.axis.i18n.ProjectResourceBundle).
> [axis-java2wsdl] log4j:WARN Please initialize the log4j system
> properly.
> [axis-java2wsdl] Java2WSDL
> de.dpcom.test.webservices.server.AdminWebServiceInterface
> [axis-java2wsdl] java.lang.ClassNotFoundException:
> de.dpcom.test.webservices.server.UserTOImpl
> [axis-java2wsdl] at
> org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoade
> r.java:1149)
> [axis-java2wsdl] at
> org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1090)
> [axis-java2wsdl] at
> org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:960)
> [axis-java2wsdl] at
> java.lang.ClassLoader.loadClass(ClassLoader.java:255)
> [axis-java2wsdl] at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
> [axis-java2wsdl] at java.lang.Class.forName0(Native Method)
> [axis-java2wsdl] at java.lang.Class.forName(Class.java:140)
> [axis-java2wsdl] at
> org.apache.axis.tools.ant.wsdl.ComplexType.register(ComplexType.java:52
> )
> [axis-java2wsdl] at
> org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execute(Java2WsdlAntTas
> k.java:206)
> [axis-java2wsdl] at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> [axis-java2wsdl] at
> org.apache.tools.ant.Task.perform(Task.java:364)
> [axis-java2wsdl] at
> org.apache.tools.ant.Target.execute(Target.java:341)
> [axis-java2wsdl] at
> org.apache.tools.ant.Target.performTasks(Target.java:369)
> [axis-java2wsdl] at
> org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> [axis-java2wsdl] at
> org.apache.tools.ant.Project.executeTargets(Project.java:1062)
> [axis-java2wsdl] at
> org.apache.tools.ant.Main.runBuild(Main.java:673)
> [axis-java2wsdl] at
> org.apache.tools.ant.Main.startAnt(Main.java:188)
> [axis-java2wsdl] at
> org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
> [axis-java2wsdl] at
> org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
> -----------------------------------------------------------------------
> --
>
>
>
Re: using axis ant tasks, documentation
Posted by MArtin Schumacher <ma...@keineantwort.de>.
Arnaud Vezain wrote:
> For the complexType tag, there no special things to do. If you write a web
> service which use a Java Bean classe (attributes+getters+setters), it will
> be generated as a complexType (xml schema) in the WSDL file when you
> deploy it with your ant script.
Thats what I thought. But it seems to be a little tricky. Here's my part
of the ant-skript:
-------------------------------------------------------------------------
<axis-java2wsdl
style="wrapped"
location="${deploy.admin.url}/myws/services/Admin"
namespace="${namespace}"
output="${local.wsdl}"
classname="${package}.AdminWebServiceInterface" >
<classpath>
<pathelement path="classpath"/>
<pathelement location="${build.dest.java}"/>
</classpath>
<complextype
classname="${package}.UserTOImpl"
namespace="urn:admin" />
</axis-java2wsdl>
-------------------------------------------------------------------------
But if I run this I get the output below. The wired thing is, that the
"UserTOImpl" exists at the same place like the
"AdminWebServiceInterface". Without using the ComplexType everything
works fine... I am really confused...
MArtin
Exception:
-------------------------------------------------------------------------
[axis-java2wsdl] log4j:WARN No appenders could be found for logger
(org.apache.axis.i18n.ProjectResourceBundle).
[axis-java2wsdl] log4j:WARN Please initialize the log4j system properly.
[axis-java2wsdl] Java2WSDL
de.dpcom.test.webservices.server.AdminWebServiceInterface
[axis-java2wsdl] java.lang.ClassNotFoundException:
de.dpcom.test.webservices.server.UserTOImpl
[axis-java2wsdl] at
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1149)
[axis-java2wsdl] at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1090)
[axis-java2wsdl] at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:960)
[axis-java2wsdl] at
java.lang.ClassLoader.loadClass(ClassLoader.java:255)
[axis-java2wsdl] at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
[axis-java2wsdl] at java.lang.Class.forName0(Native Method)
[axis-java2wsdl] at java.lang.Class.forName(Class.java:140)
[axis-java2wsdl] at
org.apache.axis.tools.ant.wsdl.ComplexType.register(ComplexType.java:52)
[axis-java2wsdl] at
org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execute(Java2WsdlAntTask.java:206)
[axis-java2wsdl] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[axis-java2wsdl] at org.apache.tools.ant.Task.perform(Task.java:364)
[axis-java2wsdl] at
org.apache.tools.ant.Target.execute(Target.java:341)
[axis-java2wsdl] at
org.apache.tools.ant.Target.performTasks(Target.java:369)
[axis-java2wsdl] at
org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[axis-java2wsdl] at
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
[axis-java2wsdl] at org.apache.tools.ant.Main.runBuild(Main.java:673)
[axis-java2wsdl] at org.apache.tools.ant.Main.startAnt(Main.java:188)
[axis-java2wsdl] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
[axis-java2wsdl] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
-------------------------------------------------------------------------
Re: using axis ant tasks, documentation
Posted by Arnaud Vezain <a....@nancy.fnclcc.fr>.
The use of axis ant task is quite simple, but you have to know how to
create, generate and deploy a service before. I firstly tried to do it
with the java tools AdminClient, Java2WSDL, WSDL2Java classes (provided
with axis) because it was well documented. After that, I switched to Ant
and was able to find common points and parameters between Ant script
deployment and java tools deployment.
For the complexType tag, there no special things to do. If you write a web
service which use a Java Bean classe (attributes+getters+setters), it will
be generated as a complexType (xml schema) in the WSDL file when you
deploy it with your ant script.
Arnaud.
> Hi there,
>
> since several days I try to figure out how axis and the ant tasks for
> axis work. But clear documentation is quite seldom...
>
> Right now I try to find out how to use the complexType-Tag... but there
> is no documentation about that. Does anyone has an idea? Some Links to
> tutorials which work with the ant-tasks or some stuff like that. There
> are a lot of tutorials where I can learn how to write my own WSDL ans
> WSDD Files... But why do I have to do that?
>
> MArtin
Re: using axis ant tasks, documentation
Posted by MArtin Schumacher <ma...@keineantwort.de>.
matthew.hawthorne wrote:
> MArtin Schumacher wrote:
>
>> Right now I try to find out how to use the complexType-Tag... but
>> there is no documentation about that. Does anyone has an idea? Some
>> Links to
>> tutorials which work with the ant-tasks or some stuff like that.
>
> How about the 'samples' directory in the Axis distribution...?
There is just one in the ejb-example... But no Documentation about it...
So in my case, I have no idea how to use the complexType-Tag. Where does
the Class specified in the complexType-Tag have to be. Just at the
classpath seems not to be enough... Just have a look at my former
posting <41...@keineantwort.de>
>> There are a lot of tutorials where I can learn how to write my own
>> WSDL ans WSDD Files... But why do I have to do that?
>
> You shouldn't have to write the WSDL unless you really want to. Writing
> the WSDD is necessary because it tells Axis about your service.
Thats my Point. I don't have to (and I don't want to). But why is there
nearly no full documentation about using of the generators for this
tasks? I know, that there is just less time to do the documentation, but
esp. for an OpenSource-Project its important, that people use their
stuff. But how, if I need to work more than a few hours to understand
how to use it?
MArtin
Re: using axis ant tasks, documentation
Posted by "matthew.hawthorne" <ma...@apache.org>.
MArtin Schumacher wrote:
> Right now I try to find out how to use the complexType-Tag... but there
> is no documentation about that. Does anyone has an idea? Some Links to
> tutorials which work with the ant-tasks or some stuff like that.
How about the 'samples' directory in the Axis distribution...?
> There are a lot of tutorials where I can learn how to write my own WSDL ans
> WSDD Files... But why do I have to do that?
You shouldn't have to write the WSDL unless you really want to. Writing
the WSDD is necessary because it tells Axis about your service.