addTicketAttachment()

void addTicketAttachment(string ticketNumber, Attachment attachment)

This method adds an attachment to a ticket. Ticket attachments may be a URL or a directly attached file.

URLs are attached as links from the ticket and are not downloaded to Smile. Operators must have access to the URL provided for as long as the attachment is to be used.

Parameters

ticketNumber
Format: string
Purpose: Specifies the Smile ticket number to which the attachment is added.
attachment
Format: Attachment XML
Purpose: Defines an Attachment XML document that specifies the details of the attachment to add.

Example: Adding a URL attachment

This example shows how to add a URL attachment to a ticket.

<Attachment xmlns="http://xml.inomial.com/smile/2.xsd">
  <name>Signed Contract</name>
  <url>http://example.com/871bjiad8h/contract.pdf</url>
</Attachment>

Example: Uploading a file attachment

This example shows how to upload a file attachment to a ticket.

<Attachment xmlns="http://xml.inomial.com/smile/2.xsd">
  <name>Signed Contract</name>
  <mimeType>application/pdf</mimeType>
  <filename>contract.pdf</filename>
  <data><!-- bytes encoded as base64Binary --></data>
  <description>The contract signed by the customer</description>
</Attachment>

Results

This method adds an attachment link to a Smile ticket.

This method does not return any output. There are no messages defined by this method.

Faults

NoSuchItemException

This fault is returned when the provided ticket number does not exist or does not refer to a ticket.

InvalidRequestException

This fault is returned when the provided attachment document is not valid.

Java client syntax

java -cp build/smilewsv2-client.jar [options]
 com.inomial.smile.client.v2.examples.AddTicketAttachment ticketNumber
 filename
ticketNumber
Purpose: Specifies the Smile ticket number to which the attachment is added.
filename
Purpose: Defines the filename of the Attachment XML document.
Note: For more information about the Java client and the options it accepts, see Java client syntax.