uCosminexus Application Server, Web Service Development Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Glossary]](FIGURE/GLOSS.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
This subsection describes the notes on using the methods of the AttachmentPart class.
- Even if the MIME header is set up using the addMimeHeader(String name, String value) or setMimeHeader(String name, String value) methods, the MIME header does not appear on the sent or received SOAP messages.
- The value specified in the value argument of the addMimeHeader(String name, String value) or setMimeHeader(String name, String value) methods is set up as the MIME header value.
- The Content-Transfer-Encoding header cannot be obtained with the getAllMimeHeaders() method. With the Cosminexus JAX-WS functionality, an attachment is always sent in the binary format, and therefore, the Content-Transfer-Encoding header value of AttachmentPart becomes binary.
- When the getContentLocation() method is used, the operations are not guaranteed.
- When the setContentLocation(String contentLocation) method is used, the operations are not guaranteed. The Content-Id header set up with the AttachmentPart#setContentId method must be used instead of the Content-Location header.
- The value specified in the contentType argument of the following methods is set up in the Content-Type header value. Therefore, you must specify the MIME type suitable to the attachment type. If an invalid MIME type is specified, the operations are not guaranteed.
- setBase64Content(InputStream content, String contentType)
- setContentType(String contentType)
- setRawContent(InputStream content, String contentType)
- setRawContentBytes(byte[] content, int offset, int len, String contentType)
- Do not specify null or a MIME type that is not defined in the standard specifications in the contentType argument of the setContent(Object object, String contentType) method. If specified, the operations are not guaranteed.
- In the first argument of the setContent(Object object, String contentType) method, specify an object suitable to the MIME type specified in the second argument. If an unsuitable object is specified, the operations are not guaranteed. Also, if null is specified, the operations are not guaranteed.
- If null or null characters are specified in the contentId argument of the setContentId(String contentId) method that value is set up in the Content-Id header value.
- Specify the correct offset in the offset argument and the correct size in the len argument of the setRawContentBytes(byte[] content, int offset, int len, String contentType) method. If an invalid value is specified, the operations are not guaranteed.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.