Skip navigation links

Java API Reference for Oracle Infrastructure Web Services
11
Release 1 (11.1.1)

E10654-02


oracle.webservices.attachments
Interface AttachmentFault


public interface AttachmentFault

This class is used to manage MIME attachments in a SOAP Fault

Since:
release specific (what release of product did this appear in)
Version:
$Header: $

Method Summary
 void addAttachment(AttachmentPart attachmentPart)
          Adds an attachment to be associated with this fault.
 void addAttachment(DataHandler dh)
          Adds an attachment to be associated with this fault using a DataHandler.
 void addAttachment(Object content, String contentType)
          Adds an attachment to be associated with this fault.
 Iterator getAttachments()
          Get a list of all attachments for this fault.
 boolean hasAttachments()
          Checks if the fault has any MIME attachments.

 

Method Detail

addAttachment

void addAttachment(DataHandler dh)
                   throws SOAPException
Adds an attachment to be associated with this fault using a DataHandler. This is a convenience method that creates a new javax.xml.soap.AttachmentPart and adds it to the list of attachments.
Parameters:
dh - A DataHandler object containing the attachment.
Throws:
SOAPException - If the DataHandler is null or an exception is thrown while adding the attachment.
See Also:
addAttachment(javax.xml.soap.AttachmentPart)

addAttachment

void addAttachment(Object content,
                   String contentType)
                   throws SOAPException
Adds an attachment to be associated with this fault. This is a convenience method that creates a DataHandler with the content and contentType specified and adds the DataHandler as an attachment.
Parameters:
content - The object to be attached
contentType - The mime type of the object. Ex. "image/jpeg", "application/xml", etc.
Throws:
SOAPException

addAttachment

void addAttachment(AttachmentPart attachmentPart)
Adds an attachment to be associated with this fault. Each attachment is added to the SOAP message with a content-id that is constructed according to the content-id part encoding specified in R2933 of the WS-I Attachments Profile 1.0 For example: For a fault part "foo" each attachment will have a content-id mime header similar to <foo=uniquenumber@oracle.com>
Parameters:
attachmentPart - An attachment to be added to the SOAP message.

getAttachments

Iterator getAttachments()
Get a list of all attachments for this fault. A fault can have attachments if and only if the ouput message of the operation in the binding of the corresponding wsdl specifies a mime:multipartRelated as a child element. See R2920 of the WS-I Attachments Profile 1.0 for more information.
Returns:
An iterator of javax.xml.soap.AttachmentPart objects. Each object represents an attachment mapped to this fault.

hasAttachments

boolean hasAttachments()
Checks if the fault has any MIME attachments.
Returns:
true if there are MIME attachments with this fault.

Skip navigation links

Copyright © 2006, 2009 Oracle. All Rights Reserved.