Runing Apollo's Wsdl2Java tool on a WSRF WSDL
Introduction
Apollo's Wsdl2Java file takes a WSRF WSDL file as its input and generates the following artifacts:
- XMLBeans for all XML Schema types and elements defined in the types section of the WSDL
- an abstract base Resource class
- a Resource class - described here
- an abstract base Service class
- a Service class - described here
- Callback classes for each resource property
- a Home class - described here
- a CustomOperationsPortType interface
- a PropertyQNames interface
- an Axis deploy.wsdd file
- a resource.cfg file
Note
The abstract classes and interfaces should NOT be modified.
Using the Wsdl2Java Ant Task
Apollo Wsdl2Java is invoked via an Ant task, as shown by the following example:
<property name="wsrf.webapp.dir" location="${apollo.home}/webapps/wsrf" /> <path id="apollo.classpath.id"> <pathelement location="${wsrf.webapp.dir}/WEB-INF/classes" /> <fileset dir="${wsrf.webapp.dir}/WEB-INF/lib" includes="*.jar" /> </path> <taskdef name="wsdl2Java" classname="org.apache.ws.resource.Wsdl2JavaTask" classpathref="apollo.classpath.id" /> <wsdl2Java wsdl="path/to/your.wsdl" srcOutputDir="generated/src" classesOutputDir="generated/classes" classpathref="apollo.classpath.id" />
Note
The apollo.home Ant property used above has to be set to your Apollo installation
directory (e.g. /opt/apollo-1.0beta).