Oracle Web Services On Demand Guide > Using Attachments with Web Services On Demand >

About The Attachment Element


In a Web services call, the content of an attachment must be contained in the <Attachment> element, which has the complex data type SiebelXmlAttachmentType, as shown in the following sample WSDL for an Attachment child object:

<xsd:complexType name="ListOfAttachment">

<xsd:sequence>

<xsd:element name="Attachment" maxOccurs="unbounded" minOccurs="0" type="xsdLocal1:Attachment" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="Attachment">

<xsd:sequence>

<xsd:element name="Id" maxOccurs="1" minOccurs="0" type="xsdLocal1:string30"/>

<xsd:element name="DisplayFileName" maxOccurs="1" minOccurs="0" type="xsdLocal1:string200" />

<xsd:element name="FileNameOrURL" maxOccurs="1" minOccurs="0" type="xsdLocal1:string200" />

<xsd:element name="FileExtension" maxOccurs="1" minOccurs="0" type="xsdLocal1:string10" />

<xsd:element name="FileDate" maxOccurs="1" minOccurs="0" type="xsd:string" />

<xsd:element name="FileSize" maxOccurs="1" minOccurs="0" type="xsd:string" />

<xsd:element name="ContactId" maxOccurs="1" minOccurs="0" type="xsd:string" />

<xsd:element name="ExternalSystemId" maxOccurs="1" minOccurs="0" type="xsdLocal1:string30" />

<xsd:element name="AttachmentTag" maxOccurs="1" minOccurs="0" type="xsd:string" />

<xsd:element name="Description" maxOccurs="1" minOccurs="0" type="xsd:string" />

<xsd:element name="CreatedDate" maxOccurs="1" minOccurs="0" type="xsd:string" />

<xsd:element name="CreatedById" maxOccurs="1" minOccurs="0" type="xsd:string" />

<xsd:element name="CreatedBy" maxOccurs="1" minOccurs="0" type="xsd:string" />

<xsd:element name="ModId" maxOccurs="1" minOccurs="0" type="xsdLocal1:string30"/>

<xsd:element name="ModifiedDate" maxOccurs="1" minOccurs="0" type="xsd:string"/>

<xsd:element name="ModifiedById" maxOccurs="1" minOccurs="0" type="xsd:string"/>

<xsd:element name="ModifiedBy" maxOccurs="1" minOccurs="0" type="xsd:string" />

<xsd:element name="Attachment" maxOccurs="1" minOccurs="0" type="xsdLocal1:SiebelXmlAttachmentType"/>

</xsd:sequence>

</xsd:complexType>

...

<xsd:complexType name="SiebelXmlAttachmentType">

<xsd:simpleContent>

<xsd:extension base="xsd:base64Binary">

<xsd:attribute name="ContentId" type="xsd:string" />

<xsd:attribute name="AttachmentIsTextData" type="xsd:string" />

</xsd:extension>

</xsd:simpleContent>

</xsd:complexType>

As the WSDL sample indicates. the <Attachment> child element can have the following optional attributes:

    • ContentId. Uniquely identifies the attachment content. If the attribute is not specified, the Web Services framework creates one for internal processing and to identify the content. This attribute is also used to achieve content reuse within a SOAP message, as described in Attaching a File to Multiple Records.
    • AttachmentIsTextData. Indicates that the content is plain text and that no Base64 decoding needs to be performed on it. The default value for this attribute is false. This attribute must be specified when text content is being specified.
Oracle Web Services On Demand Guide, Version 21.0 (Oracle CRM On Demand Release 33) Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices.