Package org.citrusframework.ws.message
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.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorSoapAttachment(String content) Constructor using fields.SoapAttachment(String contentId, String contentType, String content) Constructor using fields.SoapAttachment(String contentId, String contentType, String content, String charsetName) Constructor using fields. -
Method Summary
Modifier and TypeMethodDescriptionstatic SoapAttachmentfrom(org.springframework.ws.mime.Attachment attachment) Static construction method from Spring mime attachment.Get the charset name.Get the content body.Get the content file resource path.jakarta.activation.DataHandlerGets the attachment encoding type.longgetSize()booleanGet mtom inlinevoidsetCharsetName(String charsetName) Set the charset name.voidsetContent(String content) Set the content body.voidsetContentId(String contentId) Set the content id.voidsetContentResourcePath(String path) Set the content file resource path.voidsetContentType(String contentType) Set the content type.voidsetDataHandler(jakarta.activation.DataHandler dataHandler) Sets the data handler.voidsetEncodingType(String encodingType) Sets the attachment encoding type.voidsetMtomInline(boolean inline) Set mtom inlinevoidsetTestContext(TestContext context) Sets the test context this attachment is bound to.toString()
-
Field Details
-
ENCODING_BASE64_BINARY
- See Also:
-
ENCODING_HEX_BINARY
- See Also:
-
-
Constructor Details
-
SoapAttachment
public SoapAttachment()Default constructor -
SoapAttachment
Constructor using fields.- Parameters:
content-
-
SoapAttachment
Constructor using fields.- Parameters:
contentId-contentType-content-
-
SoapAttachment
Constructor using fields.- Parameters:
contentId-contentType-content-charsetName-
-
-
Method Details
-
from
Static construction method from Spring mime attachment.- Parameters:
attachment-- Returns:
-
getContentId
- Specified by:
getContentIdin interfaceorg.springframework.ws.mime.Attachment
-
getContentType
- Specified by:
getContentTypein interfaceorg.springframework.ws.mime.Attachment
-
getDataHandler
public jakarta.activation.DataHandler getDataHandler()- Specified by:
getDataHandlerin interfaceorg.springframework.ws.mime.Attachment
-
setDataHandler
public void setDataHandler(jakarta.activation.DataHandler dataHandler) Sets the data handler.- Parameters:
dataHandler-
-
getInputStream
- Specified by:
getInputStreamin interfaceorg.springframework.ws.mime.Attachment- Throws:
IOException
-
getSize
public long getSize()- Specified by:
getSizein interfaceorg.springframework.ws.mime.Attachment
-
toString
-
getContent
Get the content body.- Returns:
- the content
-
setContent
Set the content body.- Parameters:
content- the content to set
-
getContentResourcePath
Get the content file resource path.- Returns:
- the content resource path
-
setContentResourcePath
Set the content file resource path.- Parameters:
path- the content resource path to set
-
getCharsetName
Get the charset name.- Returns:
- the charsetName
-
setCharsetName
Set the charset name.- Parameters:
charsetName- the charsetName to set
-
setContentType
Set the content type.- Parameters:
contentType- the contentType to set
-
setContentId
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
Gets the attachment encoding type.- Returns:
-
setEncodingType
Sets the attachment encoding type.- Parameters:
encodingType-
-
setTestContext
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
-