Use JAX-WS and Apache Ant to generate Java proxy classes.
Create an Ant build script to accomplish this task. The following
script is a sample Ant build script named build.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="compile">
<property name="port" value="8080" />
<property name="host" value="localhost" />
<property name="username" value="administrator" />
<property name="password" value="password" />
<property name="tests" value="all" />
<target name="clean" >
<delete dir="classes" />
</target>
<target name="wsdl" depends="clean">
<mkdir dir="classes"/>
<exec executable="wsimport" failifexecutionfails="false" failonerror="true" resultproperty="foundWSIMPORT">
<arg line="-keep -d classes http://${host}:${port}/soap/services/EncryptionService?wsdl&lc_version=9.0.1"/>
</exec>
<fail unless="foundWSIMPORT">
!!! Failed to execute JDK's wsimport tool. Make sure that JDK 1.6 (or later) is on your PATH !!!
</fail>
</target>
<target name="compile" depends="clean, wsdl" >
<javac destdir="./classes" fork="true" debug="true">
<src path="./src"/>
</javac>
</target>
<target name="run">
<java classname="Client" fork="yes" failonerror="true" maxmemory="200M">
<classpath>
<pathelement location="./classes"/>
</classpath>
<arg value="${port}"/>
<arg value="${host}"/>
<arg value="${username}"/>
<arg value="${password}"/>
<arg value="${tests}"/>
</java>
</target>
</project>
Within this Ant build script, notice
that the url property is set to reference the Encryption
service WSDL running on localhost. The username and password properties
must be set to a valid LiveCycle user name and password.
Notice that the URL contains the lc_version attribute. Without
specifying the lc_version option, you cannot invoke
new LiveCycle service operations.
注意: Replace EncryptionService with the LiveCycle service name that you want to invoke using Java proxy classes. For example, to create Java proxy classes for the Rights Management service, specify:
http://localhost:8080/soap/services/RightsManagementService?WSDL&lc_version=9.0.1