org.ow2.petals.binding.soap.util
Class AttachmentHelper

java.lang.Object
  extended by org.ow2.petals.binding.soap.util.AttachmentHelper

public final class AttachmentHelper
extends java.lang.Object

Helper class for SOAP attachment handling

Author:
chamerling - eBMWebSourcing

Method Summary
static java.util.List<javax.activation.DataHandler> getAttachments(org.apache.axiom.om.OMElement omElement)
          Get all the direct attachments from an OMElement
static org.apache.axiom.om.OMElement hasAttachmentElement(org.apache.axiom.om.OMElement omElement, javax.activation.DataHandler dh, java.lang.String cid)
          Test if the given OMElement has an attachment corresponding to the provided CID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAttachments

public static java.util.List<javax.activation.DataHandler> getAttachments(org.apache.axiom.om.OMElement omElement)
Get all the direct attachments from an OMElement

Parameters:
omElement -
Returns:

hasAttachmentElement

public static org.apache.axiom.om.OMElement hasAttachmentElement(org.apache.axiom.om.OMElement omElement,
                                                                 javax.activation.DataHandler dh,
                                                                 java.lang.String cid)
Test if the given OMElement has an attachment corresponding to the provided CID. If it exists, it this replace by itself using AXIOM API. This replacement is needed by Axis2

Parameters:
omElement -
dh -
cid - the attachment content id
Returns:
The OMElement containing the attachement link (ie. containing: <xop:Include href="..."/> in case of a XOP attachement, the element containing the attribut "href" in case of Swa)


Copyright © 2005-2010 OW2 Consortium. All Rights Reserved.