prsubject
asked on
How to generate a STUB
The target ant-wsdl2java is generating skeleton, I am looking for stub. It is generating the classes
and many other classes based on the wsdl.
I am looking for stub generation to call the service from client side.
The process I followed is
1. Wrote the service class
2. Wrote the services.xml
3. Compile the class and made an .aar archive out of it.
4. Generated the wsdl from the Class using java2wsdlBuild target.
5. Ran ant-wsdl2java target to generate the stub.
Where I am going wrong I am not sure.
CalculatorServiceSkeleton. java
CalculatorServiceMesageRec eiverInOut
and many other classes based on the wsdl.
I am looking for stub generation to call the service from client side.
The process I followed is
1. Wrote the service class
2. Wrote the services.xml
3. Compile the class and made an .aar archive out of it.
4. Generated the wsdl from the Class using java2wsdlBuild target.
5. Ran ant-wsdl2java target to generate the stub.
Where I am going wrong I am not sure.
<target name="declare">
<taskdef name="codegen" classname="org.apache.axis2.tool.ant.AntCodegenTask" classpathref="axis2.classpath"/>
</target>
<target name="ant-wsdl2java" depends="build-aar, declare">
<codegen wsdlfilename="${dist.dir}/calculatorservice.wsdl" output="." serverside="true" generateservicexml="true"/>
</target>
<target name="java2wsdlBuild" depends="compile">
<taskdef name="java2wsdl" classname="org.apache.axis2.tool.ant.Java2WSDLTask" classpathref="axis2.classpath"/>
<java2wsdl className="calculator.CalculatorService" classpath="${classes.dir}" outputfilename="calculatorservice.wsdl" outputlocation="${dist.dir}" targetNamespace="http://calculator.service/" schemaTargetNamespace="http://calculator.service/xsd">
<classpath>
<pathelement path="${axis2.classpath}"/>
<pathelement location="${classes.dir}"/>
</classpath>
</java2wsdl>
</target>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.