For receiving expected attachments, use one of ATTACHMENT_SAVE_BY_INDEX or ATTACHMENT_SAVE_ALL.
ATTACHMENT_SAVE_ALL takes the following attribute:
ParamNamePrefix: The base name of the parameters to save the attachments.
The suffix "_<index>"
is automatically added to the ParamNamePrefix, so that if ParamNamePrefix is myParam
, the call creates myParam_1
, myParam_2
, and so on.
Parameters for the content type and content ID are created automatically. The names of the parameters are <ParamNamePrefix>_<index>_ContentType and <ParamNamePrefix>_<index>_ContentID.
For example:
ATTACHMENT_SAVE_ALL, "ParamNamePrefix=myParam
"
In the above example, if two attachments are received, the following six parameters are created:
myParam_1
and myParam_2
, contain the data of the first and second attachment, respectively.
myParam_1_ContentType
and myParam_2_ContentType
contain the content type of the first and second attachment, respectively.
myParam_1_ContentID
and myParam_2_ContentID
contain the content ID of the first and second attachment, respectively.
ATTACHMENT_SAVE_BY_INDEX takes the following attributes:
Index: The 1-based index of the attachment to save from among the attachments received as a result of this call.
ParamName: The name of a parameter to which to save the attachment.
Parameters for the content type and content ID are created automatically. The names of the parameters are <ParamName>_ContentType and <ParamName>_ContentID.
For example, to save the first attachment:
ATTACHMENT_SAVE_BY_INDEX, "Index=1", "ParamName=myNameParam1"
Note: The number of attachments received is saved automatically in a parameter named ResponseAttachmentsCount.
The parameter is not specified in the web_service_call invocation.