Attaching Binary Data
The following SOAP sample shows how the Base64 encoded attachment file must be embedded within the SOAP document:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/
2001/XMLSchema">
<soap:Body>
<AccountWS_AccountInsert_Input xmlns="urn:crmondemand/ws/account/10/2004">
<ListOfAccount>
<Account>
<Description>This is for missing fields test</Description>
<Location>Bangalore</Location>
<AccountName>Atach_Test1</AccountName>
<NumberEmployees>300</NumberEmployees>
<ListOfAttachment>
<Attachment>
<FileNameOrURL>Attached</FileNameOrURL>
<FileExtension>doc</FileExtension>
<DisplayFileName>A Doc Attachment</DisplayFileName>
<Attachment ContentId="content_doc">0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAA
........
........
AAAAAAAAAAAAAAAAAAAAAAAAAA=</Attachment>
</Attachment>
</ListOfAttachment>
</Account>
</ListOfAccount>
</AccountWS_AccountInsert_Input>
</soap:Body>
</soap:Envelope>
The attachment content is specified within the <Attachment> element which has the data type SiebelXmlAttachmentType.
Note: It is not required to specify the ContentId attribute.