Questo contenuto non è disponibile nella lingua selezionata.
10.19.2. SwaRef
WS-I Attachment Profile 1.0 defines mechanism to reference MIME attachment parts using swaRef. In this mechanism the content of XML element of type wsi:swaRef is sent as MIME attachment and the element inside SOAP Body holds the reference to this attachment in the CID URI scheme as defined by RFC 2111.
10.19.2.1. Using SwaRef with JAX-WS endpoints Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
JAX-WS endpoints delegate all marshaling/unmarshaling to the JAXB API. The most simple way to enable SwaRef encoding for
DataHandler
types is to annotate a payload bean with the @XmlAttachmentRef
annotation as shown below:
With document wrapped endpoints you may even specify the
@XmlAttachmentRef
annotation on the service endpoint interface:
The message would then refer to the attachment part by CID: