GetAdapterTransfDetails Method

The GetAdapterTransfDetails method enables your application to launch SiAdapters that users can access in SmartOffice. This method is used in conjunction with the GetAdapterDetails method.

The GetAdapterTransfDetails method is invoked using the MethodOperation.

As an example of how this method can be used, suppose that you develop an application that you have integrated with SmartOffice to access contact data. You want to add a feature to your application that allows users to create life insurance illustrations for contacts. Because SmartOffice already has an adapter for the WinFlex illustration application, your application can send a request to launch WinFlex through SmartOffice (assuming that the user has access to WinFlex). SmartOffice supplies all of the contact data that WinFlex needs to create the illustration.

The response XML is handled differently depending on whether the specified adapter calls a web application or a local application.
  • For web applications, the response XML contains base64-encoded HTML that your application must decode and launch in the userís browser. A form in the HTML posts data to the appropriate URL.
  • For local applications, the response XML contains a base64-encoded file. Your application must decode and download this file to the userís computer for use by the local application.

Parameters

Name Type Description
ContextName String Required. Specifies the context from which you are calling the adapter. For example, to launch an adapter as if it were being launched from a SmartOffice contact record, set the ContextName to Contact. For a list of supported contexts, see GetAdapterDetails.
AdapterId String Required. This is obtained using the GetAdapterDetails method.
ObjectId String Required if the the value of ContextName is None. This is the ID of the object that will be passed to the adapter.

Examples

The following request launches an adapter in SmartOffice that calls a web application (identified by its ID, 458). The adapter context is None, which is the equivalent of selecting the adapter from the SmartOffice side menu and not from a specific contact or other record. Because the context is None, no ObjectId is specified.

Request XML
<request version='1.0'>
    <header>
        <office>myoffice</office>
        <user>jdoe</user>
        <password>password</password>
    </header>
    <method>
        <GetAdapterTransfDetails>
            <ContextName>None</ContextName>
            <AdapterId>458</AdapterId>
            <ObjectId/>
        </GetAdapterTransfDetails>
    </method>
</request>

Response XML
<?xml version="1.0" encoding="UTF-8" ?> 
<response version="1.0">
    <header>
        <sessionClosed /> 
    </header>
    <method>
        <GetAdapterTransfDetails>
            <LaunchDetails>
                <AdapterType>Web Server</AdapterType>
                <FileName/>
                <DataNode>
                    <![CDATA[
                    Base64-encoded data appears here 
                    ]]>
                </DataNode>
            </LaunchDetails>
        </GetAdapterTransfDetails> 
    </method>
    <_status>OK</_status> 
    <_systime>2015-07-23T07:11:00</_systime> 
<!-- Cost 994 mill seconds.--> 
</response>

The following request launches an adapter in SmartOffice that calls a local application (identified by its ID, 353). The adapter context is Contact, which is the equivalent of selecting the adapter while viewing a contact record in SmartOffice. For this reason, the object ID of a specific contact is required. In the response, the FileName element specifies the file name that the file must be saved under.

Request XML
<request version='1.0'>
    <header>
        <office>myoffice</office>
        <user>jdoe</user>
        <password>password<password/>
    </header>
    <method>
        <GetAdapterTransfDetails>
            <ContextName>Contact</ContextName>
            <AdapterId>353</AdapterId>
            <ObjectId>Contact.1.26</ObjectId>
        </GetAdapterTransfDetails>
    </method>
</request>

Response XML
<?xml version="1.0" encoding="UTF-8" ?> 
<response version="1.0">
    <header>
        <sessionClosed /> 
    </header>
    <method>
        <GetAdapterTransfDetails>
            <LaunchDetails>
                <AdapterType>Local Application</AdapterType>
                <FileName>filename.ext</FileName>
                <DataNode>
                    <![CDATA[
                    Base64-encoded data appears here 
                    ]]>
                </DataNode>
            </LaunchDetails>
        </GetAdapterTransfDetails> 
    </method>
    <_status>OK</_status> 
    <_systime>2015-07-27T11:45:57</_systime> 
    <!-- Cost 80 mill seconds. --> 
</response>

-- DinosLambropoulos - 03 Aug 2015
Topic revision: 06 Oct 2015, DinosLambropoulos
 

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback