Invoking a Business Service to Insert an Attachment

In this example, the business service RetrieveAttachmentService contains the Insert method, which accepts the AttachmentDocIO integration object as input. The AttachmentDocIO integration object contains the SR Resolution Item integration component, which has a field named Res Attachment Id. The attachment contents are provided as Base64 encoded string value to the Res_spcAttachment_spcId field. When you invoke the Insert method, the attachment with the file contents provided in the Res_spcAttachment_spcId field is inserted. The response contains the attachment ID, for example: <Id>88-1YPNAZ</Id>.

  • URI: http://ServerName:port/siebel/v1.0/service/RetrieveAttachmentService/Insert

  • HTTP Method: POST

  • Content-Type: application/xml

  • Transfer-Encoding: chunked

  • Authorization: Basic

  • Request body:

<?xml version="1.0" encoding="UTF-8" ?>
<body>
    <LOVLanguageMode>LDC</LOVLanguageMode>
    <SiebelMessageIn>
        <MessageId></MessageId>
        <MessageType>Integration Object</MessageType>
        <IntObjectName>AttachmentDocIO</IntObjectName>
        <IntObjectFormat>Siebel Hierarchical</IntObjectFormat>
        <ListOfAttachmentDocIO>
            <SR_spcResolution_spcItem>
                <ResFileName>SGService_Demo44</ResFileName>
                <ResFileExt>txt</ResFileExt>
                <Id>11111111</Id>
                <Res_spcAttachment_spcId>//5XAHcAMABLAEkAQwBCADcARABRAG8AZwBJAEMAQQBnAEkA.....</Res_spcAttachment_spcId>
            </SR_spcResolution_spcItem>
        </ListOfAttachmentDocIO>
    </SiebelMessageIn>
</body>
Response Body	
  • Response body:
    <?xml version="1.0" ?>
    <response>
        <SiebelMessageOut>
            <IntObjectFormat>Siebel Hierarchical</IntObjectFormat>
            <MessageId></MessageId>
            <IntObjectName>AttachmentDocIO</IntObjectName>
            <MessageType>Integration Object</MessageType>
            <SR_spcResolution_spcItem>
                <Id>88-1YPNAZ</Id>
                <Mod_spcId>0</Mod_spcId>
            </SR_spcResolution_spcItem>
        </SiebelMessageOut>
    </response>