You can use the Apache Axis WSDL2Java tool to convert a
LiveCycle service into Java proxy classes. These classes
enable you to invoke LiveCycle service operations. Using
Apache Ant, you can generate Axis library files from a service WSDL.
You can download Apache Axis at the URL http://ws.apache.org/axis/.
Install Apache Ant on the client computer. It is available
at http://ant.apache.org/bindownload.cgi.
Install Apache Axis 1.4 on the client computer. It is available
at http://ws.apache.org/axis/.
Set up the class path to use the Axis JAR files in your web
service client, as described in the Axis installation instructions
at http://ws.apache.org/axis/java/install.html.
Use the Apache WSDL2Java tool in Axis 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"?>
<project name="axis-wsdl2java">
<path id="axis.classpath">
<fileset dir="C:\axis-1_4\lib" >
<include name="**/*.jar" />
</fileset>
</path>
<taskdef resource="axis-tasks.properties" classpathref="axis.classpath" />
<target name="encryption-wsdl2java-client" description="task">
<axis-wsdl2java
output="C:\JavaFiles"
testcase="false"
serverside="false"
verbose="true"
username="administrator"
password="password"
url="http://localhost:8080/soap/services/EncryptionService?wsdl&lc_version=9.0.1" >
</axis-wsdl2java>
</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.
Create a BAT file to execute the Ant build script. The following
command can be located within a BAT file that is responsible for
executing the Ant build script:
ant -buildfile "build.xml" encryption-wsdl2java-client
The
JAVA files are written to the C:\JavaFiles folder as specified by
the output property. To successfully invoke the
LiveCycle service, import these JAVA files into your class
path.
By default, these files belong to a Java package named com.adobe.idp.services.
It is recommended that you place these JAVA files into a JAR file.
Then import the JAR file into your client application’s class path.
Note: There are different ways to put .JAVA files into
a JAR. One way is using a Java IDE like Eclipse. Create a Java project
and create acom.adobe.idp.services package (all .JAVA files belong to this package). Next import all the .JAVA files into the package. Finally, export the project as a JAR file.
Amend the URL in the EncryptionServiceLocator class
to specify the encoding type. For example, to use base64, specify ?blob=base64 to ensure
that the BLOB object returns binary data. That
is, in the EncryptionServiceLocator class, locate
the following line of code:
http://localhost:8080/soap/services/EncryptionService;
and
change it to:
http://localhost:8080/soap/services/EncryptionService?blob=base64;
Add the following Axis JAR files to your Java project’s class
path:
These JAR files are in the [install directory]/Adobe/LiveCycle9/sdk/lib/thirdparty
directory.