Document-Literal Web Services

MsiAppOriginatorDocLit

MsiAppOriginatorDocLit allows you to load XML-format Client, Application, Asset, Insurance, Notebook, and User Defined Fields information into the LeasePak database. It also enables you to delete pending assets.

Supported Fields

The Supported Fields document lists the fields (and their LeasePak database column equivalents) you can use with MsiAppOriginatorDocLit.

API Reference

If you need additional information, Sun Microsystems maintains a Java developers' site at http://java.sun.com that includes API specifications, sample code and applications, and technical articles and tips.

Methods

MsiAppOriginatorDocLit contains only one method, createApplicationDocLit. For more information on this method, refer to the Java Call Reference.


public createApplicationDocLit(java.lang.String xmlDocument)
Where xmlDocument is the entire contents (as a String) of the XML document containing the records you wish to add to LeasePak. Call this when you want to update or add using the API username and password. This is a single synchronous, stateless API call. No session needs to be sent or stored. Default policy is to add records only. Existing records will not be added unless the XML element contains <localAddUpdate>true</localAddUpdate>. This allows for greater control of which records get updated.

The method throws java.rmi.RemoteException.

The available XML child elements within MSI_APP_ORIG are:

CUSTOMER_RECORD    (none required, only 1 allowed) 
LESSEE_RECORD      (at least one required, many allowed) 
GUARANTOR_RECORD   (none required, many allowed)
VENDOR_RECORD      (none required, many allowed)
BROKER_RECORD      (none required, many allowed)
APPLICATION_RECORD (none required, only 1 allowed)
ASSET_DELETE       (none required, only 1 allowed)
ASSET_RECORD       (none required, many allowed)
INSURANCE_RECORD   (none required, only 1 allowed) 
NOTEBOOK_RECORD    (none required, only 1 allowed) 
UDF_FIELDS_RECORD  (none required, many allowed)

Child elements are processed in the order specified above: all Customer elements first, then all Lessee elements, etc. If processing a child element results in an error or exception, no adds or updates are made for that element, and no further processing of child elements within the parent MSI_APP_ORIG element occurs.

localAddOnly

Any of the above child elements (with the exception of ASSET_DELETE--see below) can contain the localAddOnly element when needed. For example:

<LESSEE_RECORD>
	<localAddOnly>boolean</localAddOnly>
</LESSEE_RECORD>

where boolean is either 'true' or 'false'. If 'true', the LeasePak record will only be added if the corresponding key number does not already exist. If 'false', LeasePak will either add a record to the database or update an existing record with a matching key number. If you do not include a localAddOnly element, the default behavior is 'true'.

ASSET_DELETE

Use this child element to delete all pending assets from an application:

<ASSET_DELETE>
	<appNumber>application_number</appNumber>
</ASSET_DELETE>

where application_number is the application for which you wish to delete all pending assets.

XML Data Requirements

Data within the xmlDocument string must meet the following requirements:

  • No empty elements. For example, <appNumber></appNumber> in the XML string will throw an error;
  • No carriage returns, new line characters, or spaces between the closing tag of one element and the opening tag of the next. Below is an example (in Java) of how to strip CR/NL and between-element spaces from your XML text:
    String xml = new String();
    // where xml is the XML document (as a String) containing the records you wish to add to LeasePak
    StringBuffer data = new StringBuffer();
    
    BufferedReader reader = new BufferedReader(new StringReader(xml));
    		
    String res = reader.readLine();
    while ( res != null ) {
        data.append(res.trim());
        res = reader.readLine();
    }