NonStop SOAP for Java User's Manual

Using the SOAP Client APIs
NonStop SOAP for Java User’s Manual523860-001
6-4
Using Attachments on the Server
Using Attachments on the Server
As in the client case, if you are implementing an RPC-based service you may be able
to take advantage of the built-in serializers/deserializers for the
javax.activation.DataSource and javax.activation.DataHandler
objects.
If you are implementing a message-oriented service, you can use methods from the
following class to add or retrieve MimeBodyParts:
org.apache.soap.rpc.SOAPContext
Referencing Attachments From Within a SOAP Message
To refer to an attachment from within a SOAP message, add an element similar to the
following:
where
<elemName href="cid:cid-uri">
elemName
is the name of the element within the message.
cid-uri
is the URL-encoded name of the Content-ID for the attachment which you are
referring to, or alternatively, an absolute or relative URI referring to the Content-
Location of the attachment. (The Content-ID is set as part of the
javax.mail.internet.MimeBodyPart.)