|
|
You can invoke a service using Axis-generated library files. To fully explain how to do this task, this document describes how to invoke the Repository service’s writeResource operation, which places a new resource into the Repository.
1.
3. Create a RepositoryServiceServiceLocator object by using its constructor.
4. Create a RepositoryService object by invoking the RepositoryServiceServiceLocator object’s getRepositoryService method.
5. Set authentication values by setting the javax.xml.rpc.Stub.USERNAME_PROPERTY and javax.xml.rpc.Stub.PASSWORD_PROPERTY values with valid LiveCycle ES user name and password values.((javax.xml.rpc.Stub)repositoryClient)._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY, "administrator");((javax.xml.rpc.Stub)repositoryClient)._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY, "password");
6. Create a Resource object by invoking its constructor.
7. Set a unique identifier value for the resource by invoking the Resource object’s setId method and passing a new instance of Id (new Id()).
8. Set a UUID value for the resource by invoking the Resource object’s setLid method and passing a new instance of Lid ( new Lid()).
9. Set the name for the resource by invoking the Resource object’s setName method and passing a string value that represents the name of the resource.
10. Create a ResourceContent object by invoking its constructor.
11. Create a BLOB object by using its constructor. This BLOB object will store the XDP file that is uploaded to the LiveCycle ES repository. For information about a BLOB, see Web service data types.
12. Create a java.io.FileInputStream object by invoking its constructor and passing a string value that represents the location of the XDP file to upload to the LiveCycle ES repository.
13. Create a byte array that stores the content of the java.io.FileInputStream object. You can determine the size of the byte array by invoking the java.io.FileInputStream object’s available method.
14. Populate the byte array by invoking the java.io.FileInputStream object’s read method and passing the byte array.
15.
16. Add the content of the BLOB object to the ResourceContent object by invoking the ResourceContent object’s setDataDocument method and passing the BLOB object.
17. Set the MIME type of the XDP file to add to the Repository by invoking the ResourceContent object’s setMimeType method and passing application/vnd.adobe.xdp+xml.
18. Add the content of the ResourceContent object to the Resource object by invoking the Resource object ‘s setContent method and passing the ResourceContent object.
19. Add a description of the resource by invoking the Resource object ‘s setDescription method and passing a string value that represents a description of the resource.
20. Add the form design to the LiveCycle ES repository by invoking the RepositoryService object’s writeResource method and passing the following values:
•
• The Resource object that was created
•
•
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/invokingSOAP.27.9.html