Siebel Application Integration for Oracle Fusion Middleware Guide > Working with Siebel RESTful Services >

Example of Using Code to Insert Data into the Siebel File System


This topic is one example of using code to insert data into the Siebel File System. In this example you insert data for the Account Attachment business component. You might use this feature differently, depending on your business model. For more information about file attachments, see Integration Platform Technologies: Siebel Enterprise Application Integration.

Assume you attach a sample file for an account that contains row ID 1-5GZO. The content of this file is stored in Base64 encoding as follows:

VGhpcyBpcyBhIHNhbXBsZSB0ZXh0IGZpbGUNClRoaXMgaXMgYSBzYW1wbGUgdGV4dCBmaWxlLg==

You can use any Base64 decoder to decode the file. After decoding, the content is as follows:

This is a sample text file

This is a sample text file

Use the following URL to access the data from the Siebel File System:

http://localhost:7101/oracle-crm/api/rest/siebel/<your adapter name>/Account%20Attach%20IO/1-5GZO

The XML returned is:

<?xml version="1.0" encoding="ISO-8859-1"?>

<SiebelREST>

<NumOutputObjects>1</NumOutputObjects>

<ErrorCode>0x0</ErrorCode>

<ListOfAccount_0x20_Attach_0x20_IO>

<Account>

<Name>AG Edwards & Sons, Inc</Name>

<Location>San Francisco</Location>

<Primary_0x20_Organization>Millennium Healthcare HC ENU

</Primary_0x20_Organization>

<ListOfAccount_0x20_Attachment>

<Account_0x20_Attachment>

<AccntFileSize>98</AccntFileSize>

<AccntFileName>TextFile</AccntFileName>

<Account_0x20_Id>1-5GZO</Account_0x20_Id>

<AccntFileDate>12/14/2009 16:09:41</AccntFileDate>

<AccntFileDockStatFlg>E</AccntFileDockStatFlg>

<AccntFileSrcType>FILE</AccntFileSrcType>

<AccntFileAutoUpdFlg>Y</AccntFileAutoUpdFlg>

<AccntFileDockReqFlg>N</AccntFileDockReqFlg>

<AccntFileExt>txt</AccntFileExt>

<AccntFileDeferFlg>R</AccntFileDeferFlg>

<Accnt_0x20_Attachment_0x20_Id>88-1NKG

</Accnt_0x20_Attachment_0x20_Id>

</Account_0x20_Attachment>

</ListOfAccount_0x20_Attachment>

</Account>

</ListOfAccount_0x20_Attach_0x20_IO>

<Attachments>

<Document>

<TimedOut>false</TimedOut>

<EndOfData>true</EndOfData>

<AttachmentIsTextData>false</AttachmentIsTextData>

<ContentId>88-1NKG</ContentId>

<Extension>txt</Extension>

<Document>

VGhpcyBpcyBhIHNhbXBsZSB0ZXh0IGZpbGUNClRoaXMgaXMgYSBzYW1wbGUgdGV4dCBmaWxlLg==

</Document></Document>

</Attachments>

</SiebelREST>

When the string in the XML is returned, your application that is written to access and process this data, searches for the Document tag and processes the data found between the Document tags.

NOTE:  Use localhost only if Oracle WebLogic Server is running on the computer you are using.

Related Topics

Example of Using Code to Access Data from the Siebel File System

Siebel Application Integration for Oracle Fusion Middleware Guide Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.