WSDL2Java – generating java code for your WSDL
- 01
- August
- 2008
- By admin
- Uncategorized
- Comments Off on WSDL2Java – generating java code for your WSDL
you need to create a build.xml file
<!DOCTYPE project>
<project name=”AxisProject” default=”usage” basedir=”.”>
<property name=”project-name” value=”AxisProject”/>
<property file=”build.properties”/><property name=”build” value=”build”/>
<property name=”src” value=”src”/>
<property name=”build.classes” value=”build/classes” /><path id=”axis.classpath”>
<pathelement location=”build/classes” />
<fileset dir=”C:/axis2-1.4.1/lib”>
<include name=”**/*.jar” />
</fileset>
<pathelement location=”${build.classes}” />
</path><path id=”axis_client.classpath”>
<pathelement location=”build/classes” />
<fileset dir=”C:/axis2-1.4.1″>
<include name=”**/*.jar” />
</fileset>
<fileset dir=”lib”>
<include name=”*.jar” />
</fileset>
<pathelement location=”${build.classes}” />
</path><target name=”usage” description=”Build file usage info (default task)”>
<echo message=” ” />
<echo message=”${project-name} ” />
<echo message=”——————————————————-” />
<echo message=” ” />
<echo message=”Available Targets:” />
<echo message=” ” />
<echo message=” Compiling:” />
<echo message=” compile – Compiles the WSDL2Java source code” />
<echo message=” ” />
<echo message=” Compiling client:” />
<echo message=” compile_client – Compiles the client source code” />
<echo message=” ” />
<echo message=” Cleaning up:” />
<echo message=” clean – Delete class files” />
<echo message=” ” />
<echo message=” WSDL:” />
<echo message=” wsdl2java – Generate source from WSDL” />
<echo message=” ” />
<echo message=” AAR:” />
<echo message=” aar – Generate an .aar for deployment into WEB-INF/services” />
<echo message=” ” />
<echo message=” Executing:” />
<echo message=” runLogin – Execute the runLogin client” />
</target><target name=”prepare” >
<mkdir dir=”${build.classes}” />
</target><target name=”clean” >
<delete dir=”${build}” />
<delete dir=”${dist}” />
</target><target name=”compile”>
<echo message=”Compiling wsdl2 files”/><javac
srcdir=”output”
destdir=”${build.classes}”
deprecation=”true”
failonerror=”true” debug=”true”
><classpath refid=”axis.classpath”/>
</javac></target>
<target name=”wsdl2java” depends=”clean,prepare”>
<delete dir=”output” />
<java classname=”org.apache.axis2.wsdl.WSDL2Java” fork=”true”>
<classpath refid=”axis.classpath”/>
<arg value=”-d”/>
<arg value=”xmlbeans”/>
<arg value=”-uri”/>
<arg file=”wsdl/businessservices/examinermanagementservice/ExaminerManagementService.wsdl”/>
<arg value=”-ss”/>
<arg value=”-g”/>
<arg value=”-sd”/>
<arg value=”-o”/>
<arg file=”output”/>
<arg value=”-p”/>
<arg value=”org.example.types”/>
</java><!– Move the schema folder to classpath–>
<move todir=”${build.classes}”>
<fileset dir=”output/resources”>
<include name=”**/*schema*/**/*.class”/>
<include name=”**/*schema*/**/*.xsb”/>
</fileset>
</move></target>
<target name=”jar_wsdl” depends=”compile”>
<jar jarfile=”lib/axis2_example_wsdl.jar” >
<fileset dir=”${build.classes}” />
</jar>
</target><!– build an .aar file for axis2 web services –>
<target name=”aar” depends=”compile”>
<delete dir=”${build.classes}/META-INF” />
<mkdir dir=”${build.classes}/META-INF” />
<copy todir=”${build.classes}/META-INF” >
<fileset dir=”output/resources” >
<!– axis2 web services definitions file –>
<include name=”services.xml”/>
</fileset>
<fileset dir=”wsdl” >
<include name=”ExaminerManagementService.wsdl”/>
</fileset>
</copy>
<jar jarfile=”dist/ExaminerManagementService.aar” >
<fileset dir=”${build.classes}” />
</jar>
</target><target name=”compile_client”>
<echo message=”Compiling client files”/><javac
srcdir=”src”
destdir=”${build.classes}”
deprecation=”true”
failonerror=”true” debug=”true”
><classpath refid=”axis.classpath”/>
</javac></target>
<target name=”runLogin” depends=”prepare,compile_client” description=”run simple Login client”>
<java classname=”org.client.LoginClient” >
<classpath refid=”axis_client.classpath”/>
</java>
</target></project>
http://ws.apache.org/axis2/tools/1_0/CodegenToolReference.html
Related
Recent Posts
- 12.1.0.2 RAC Installation – Step by Step installation on VMware
- OSB FTP Poller continuously throwing exception – while no file pending on FTP Location
- Using JMS Transport with OSB
- Installing Spring Tool Suite and configuring Spring for a development PC
- Rest Enabling SOA using OSB in Oracle 12c
Recent Comments
- Nits on Installing Oracle SOA Suite 12c
- Rajesh Krishna on Installing Oracle SOA Suite 12c
- Nits on Installing Oracle SOA Suite 12c
- Rohinii on Installing Oracle SOA Suite 12c
- Mahitha on Oracle Service Bus (OSB) Development Best Practices.
Archives
- December 2015
- May 2015
- November 2014
- September 2014
- August 2014
- July 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- July 2013
- June 2013
- May 2013
- March 2013
- February 2013
- November 2012
- October 2012
- September 2012
- May 2012
- March 2012
- February 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- June 2011
- May 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- July 2010
- June 2010
- March 2010
- February 2010
- December 2009
- September 2009
- August 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- November 2008
- October 2008
- August 2008
- June 2008
- May 2008
Categories
- AIA
- AXIS2
- Best Practices
- BPEL
- BPM
- Budget
- Build
- Design Patterns
- ESB
- Hermes
- Hibernate
- Home Owners
- Java
- JMS
- JSR 168
- Maven
- Mediator
- Messaging
- Nitin
- OER
- OESB
- Oracle
- OSB
- OWSM
- Portlets
- SDLC
- Sequencing
- Singleton
- SOA
- SOAP
- Spring
- Struts
- UK
- Uncategorized
- Web Services
- WLST
Meta
To find out more, including how to control cookies, see here: Cookie Policy
Recent Posts
- 12.1.0.2 RAC Installation – Step by Step installation on VMware
- OSB FTP Poller continuously throwing exception – while no file pending on FTP Location
- Using JMS Transport with OSB
- Installing Spring Tool Suite and configuring Spring for a development PC
- Rest Enabling SOA using OSB in Oracle 12c
Recent Comments
- Nits on Installing Oracle SOA Suite 12c
- Rajesh Krishna on Installing Oracle SOA Suite 12c
- Nits on Installing Oracle SOA Suite 12c
- Rohinii on Installing Oracle SOA Suite 12c
- Mahitha on Oracle Service Bus (OSB) Development Best Practices.
Archives
- December 2015
- May 2015
- November 2014
- September 2014
- August 2014
- July 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- July 2013
- June 2013
- May 2013
- March 2013
- February 2013
- November 2012
- October 2012
- September 2012
- May 2012
- March 2012
- February 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- June 2011
- May 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- July 2010
- June 2010
- March 2010
- February 2010
- December 2009
- September 2009
- August 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- November 2008
- October 2008
- August 2008
- June 2008
- May 2008
Categories
- AIA
- AXIS2
- Best Practices
- BPEL
- BPM
- Budget
- Build
- Design Patterns
- ESB
- Hermes
- Hibernate
- Home Owners
- Java
- JMS
- JSR 168
- Maven
- Mediator
- Messaging
- Nitin
- OER
- OESB
- Oracle
- OSB
- OWSM
- Portlets
- SDLC
- Sequencing
- Singleton
- SOA
- SOAP
- Spring
- Struts
- UK
- Uncategorized
- Web Services
- WLST