Class SoapAttachment

java.lang.Object
org.citrusframework.ws.message.SoapAttachment
All Implemented Interfaces:
Serializable, org.springframework.ws.mime.Attachment

public class SoapAttachment extends Object implements org.springframework.ws.mime.Attachment, Serializable
Citrus SOAP attachment implementation.
Author:
Christoph Deppisch
See Also:
  • Field Details

  • Constructor Details

    • SoapAttachment

      public SoapAttachment()
      Default constructor
    • SoapAttachment

      public SoapAttachment(String content)
      Constructor using fields.
      Parameters:
      content -
    • SoapAttachment

      public SoapAttachment(String contentId, String contentType, String content)
      Constructor using fields.
      Parameters:
      contentId -
      contentType -
      content -
    • SoapAttachment

      public SoapAttachment(String contentId, String contentType, String content, String charsetName)
      Constructor using fields.
      Parameters:
      contentId -
      contentType -
      content -
      charsetName -
  • Method Details

    • from

      public static SoapAttachment from(org.springframework.ws.mime.Attachment attachment)
      Static construction method from Spring mime attachment.
      Parameters:
      attachment -
      Returns:
    • getContentId

      public String getContentId()
      Specified by:
      getContentId in interface org.springframework.ws.mime.Attachment
    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface org.springframework.ws.mime.Attachment
    • getDataHandler

      public jakarta.activation.DataHandler getDataHandler()
      Specified by:
      getDataHandler in interface org.springframework.ws.mime.Attachment
    • setDataHandler

      public void setDataHandler(jakarta.activation.DataHandler dataHandler)
      Sets the data handler.
      Parameters:
      dataHandler -
    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface org.springframework.ws.mime.Attachment
      Throws:
      IOException
    • getSize

      public long getSize()
      Specified by:
      getSize in interface org.springframework.ws.mime.Attachment
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getContent

      public String getContent()
      Get the content body.
      Returns:
      the content
    • setContent

      public void setContent(String content)
      Set the content body.
      Parameters:
      content - the content to set
    • getContentResourcePath

      public String getContentResourcePath()
      Get the content file resource path.
      Returns:
      the content resource path
    • setContentResourcePath

      public void setContentResourcePath(String path)
      Set the content file resource path.
      Parameters:
      path - the content resource path to set
    • getCharsetName

      public String getCharsetName()
      Get the charset name.
      Returns:
      the charsetName
    • setCharsetName

      public void setCharsetName(String charsetName)
      Set the charset name.
      Parameters:
      charsetName - the charsetName to set
    • setContentType

      public void setContentType(String contentType)
      Set the content type.
      Parameters:
      contentType - the contentType to set
    • setContentId

      public void setContentId(String contentId)
      Set the content id.
      Parameters:
      contentId - the contentId to set
    • setMtomInline

      public void setMtomInline(boolean inline)
      Set mtom inline
      Parameters:
      inline -
    • isMtomInline

      public boolean isMtomInline()
      Get mtom inline
      Returns:
    • getEncodingType

      public String getEncodingType()
      Gets the attachment encoding type.
      Returns:
    • setEncodingType

      public void setEncodingType(String encodingType)
      Sets the attachment encoding type.
      Parameters:
      encodingType -
    • setTestContext

      public void setTestContext(TestContext context)
      Sets the test context this attachment is bound to. Variable resolving takes place with this context instance.
      Parameters:
      context - Test context used to resolve dynamic content