You
can use JAX-WS to convert a LiveCycle service WSDL to Java
proxy classes. These classes enable you to invoke LiveCycle services operations. Apache Ant lets you create a build script that
generates Java proxy classes by referencing a LiveCycle
service WSDL. You can generate JAX-WS proxy files by performing
the following steps:
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:
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.
Note: 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:
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" wsdl
Place
the ANT build script in the C:\Program Files\Java\jaxws-ri\bin directory. The
script writes the JAVA files to the ./classes folder. The script
generates JAVA files that can invoke the service.
Package the JAVA files into a JAR file. If you are working
on Eclipse, follow these steps:
Create a new Java
project that is used to package the proxy JAVA files into a JAR
file.
Create a source folder in the project.
Create a com.adobe.idp.services package
in the Source folder.
Select the com.adobe.idp.services package
and then import the JAVA files from the adobe/idp/services folder
into the package.
If necessary, create an org/apache/xml/xmlsoap package
in the Source folder.
Select the source folder and then import the JAVA files from
the org/apache/xml/xmlsoap folder.
Set the Java compiler’s compliance level to 5.0 or greater.
Build the project.
Export the project as a JAR file.
Import this JAR file in a client project’s class path. In
addition, import all of the JAR files located in <Install Directory>\Adobe\Adobe LiveCycle ES4\sdk\client-libs\thirdparty.
Note: All Java
web service quick starts (except for the Forms service) located
in Programming with LiveCycle create Java proxy files using
JAX-WS. In addition, all Java web service quick starts, use SwaRef.
(See Invoking LiveCycle using SwaRef.)