Previous Topic: getStartRequestFormsNext Topic: Common Tags for Web Services Methods


ImportObject

Use this method to import objects into a CA Process Automation Library.

Note: Ensure that the maximum XML size that you want to import is 250 MB.

Example

<tns:ImportObject xmlns:tns="http://www.ca.com/itpam">
<tns:importFileParam>
<tns:auth>
<!--xsd:Choice Type-->
<tns:token>token__</tns:token>
<tns:user>Joe</tns:user>
<tns:password>thisismypassword</tns:password>
<tns:auth>
<tns:importLocation>importLocation__</tns:importLocation>
<tns:localSourceLocation>localSourceLocation__</tns:localSourceLocation>
<tns:isSetCurrent>isSetCurrent__</tns:isSetCurrent>
<tns:isMakeAvailable>isMakeAvailable__</tns:isMakeAvailable>
<tns:overwriteAction>overwriteAction__</tns:overwriteAction>
</tns:importFileParam>
<!--This SOAP request can have MIME contents-->
</tns:ImportObject>

<isSetCurrent> specifies whether to mark the imported objects as the current versions (optional).

<isMakeAvailable> specifies whether to mark imported custom operators as available (optional).

After you provide values in the inline text, create a MIME attachment for the file you specify in the <localsourcelocation> tag in the SOAP request. To add a MIME attachment, in the Properties panel under the MIME attachments, click Add, then provide appropriate values for:

Content Type

Type of content the MIME attachment is carrying. For example, text/xml.

Content ID

ID that the attachment is uniquely identified with. For example, 11111.

File URL

Path of the attachment. This path can be the path of the .xml to be imported. For example, C:\\SOAPExportedObjects.xm.

Save and run the process.

SOAP Request

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<tns:ImportObject xmlns:tns="http://www.ca.com/itpam">
<tns:importFileParam>
<tns:auth>
<tns:user>Joe</tns:user>
<tns:password>thisismypassword</tns:password>
<tns:auth>
<tns:importLocation>/</tns:importLocation>
<tns:localSourceLocation>"C:\\SOAPExportedObjects.xml"</tns:localSourceLocation>
<tns:isSetCurrent>true</tns:isSetCurrent>
<tns:isMakeAvailable>true</tns:isMakeAvailable>
<tns:overwriteAction>incrementObjectVersion</tns:overwriteAction>
</tns:importFileParam>
<!--This request can have MIME contents-->
</tns:ImportObject>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

<importLocation> specifies the location in the CA Process Automation library where you want to import the objects.

<isSetCurrent> specifies whether to mark the imported objects as the current versions (optional). The default value is false.

<isMakeAvailable> specifies whether to mark imported custom operators as available (optional). The default value is false.

<overwriteAction>

If an object with the same name already exists in the Library, you can select one of the following options for <overwriteAction>:

SOAP Response

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<importFileResponse xmlns="http://www.ca.com/itpam">
<successMessage>The specified object imported successfully.</successMessage>
</importFileResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

<successMessage> displays a successful import message.