Creating Java proxy classes using Apache Axis
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/.
The web service quick starts associated with
the Forms service use Java proxy classes created using Apache Axis.
The Forms web service quick starts also use Base64 as the encoding
type. (See Forms Service API Quick Starts
You can generate Axis Java library files by performing the following
Install Apache Ant on the client computer. It is available
Install Apache Axis 1.4 on the client computer. It is available
Set up the class path to use the Axis JAR files in your web
service client, as described in the Axis installation instructions
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:
<fileset dir="C:\axis-1_4\lib" >
<include name="**/*.jar" />
<taskdef resource="axis-tasks.properties" classpathref="axis.classpath" />
<target name="encryption-wsdl2java-client" description="task">
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
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
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:
change it to:
Add the following Axis JAR files to your Java project’s class
These JAR files are in the [install directory]/Adobe/LiveCycle9/sdk/lib/thirdparty