Page 1 of 1

About Question enthuware.ocejws.v6.2.158 :

Posted: Tue Jul 07, 2015 9:25 am
by fabiolino
Correct answer:The attachments in SwA are not part of the XML infoset. With MTOM they are.
Explanation: One of the benefits of MTOM and XOP is that the attachments are part of the SOAP message. This makes the use of WS-Security features easier and interoperability better

but in follow url https://docs.oracle.com/javaee/5/tutori ... bnbhg.html
that Attachments are part of the SOAP message too,
see fig. Figure 19-2 in the url and below
saaj-twoAttach.gif
saaj-twoAttach.gif (44.42 KiB) Viewed 8542 times

Re: About Question enthuware.ocejws.v6.2.158 :

Posted: Tue Jul 07, 2015 1:33 pm
by fjwalraven
that Attachments are part of the SOAP message too,
True, but they are not part of the XML Infoset and that is the difference between SwA and MTOM.

MTOM is effectively SwA+XOP.
XOP is the key to this, it describes how you can serialize SOAP messages with binary content and still preserve the XML Infoset.

Or in other words: for a SOAP endpoint the MTOM attachments are just embedded SOAP elements.

Regards,
Frits

Re: About Question enthuware.ocejws.v6.2.158 :

Posted: Mon Nov 09, 2015 10:55 am
by ramy6_1
Hello ,

1- Spelling issue "attachents" should be "attachment".
2- Can you please let me understand what you mean "XML infoset" here ?

Re: About Question enthuware.ocejws.v6.2.158 :

Posted: Mon Nov 09, 2015 2:31 pm
by fjwalraven
  1. Fixed: Thanks!
  2. Check this nice explanation:
http://www.informit.com/library/content ... &seqNum=40

Regards,
Frits

Re: About Question enthuware.ocejws.v6.2.158 :

Posted: Sun Oct 30, 2016 2:52 am
by asdf_16
Hi,

Just to confirm, I was under the impression that swaRef attachments were encoded whereas MTOM were not. Would this not increase the size of the data being transferred using swaRef making the first option correct?

Thanks.

Re: About Question enthuware.ocejws.v6.2.158 :

Posted: Sun Oct 30, 2016 3:59 am
by fjwalraven
Hi,
Just to confirm, I was under the impression that swaRef attachments were encoded whereas MTOM were not.
No, the swaRef attachments are not encoded. They are sent as MIME attachments which can have any content.

Just look at the example response for this WebService:

Code: Select all

@WebService
public interface GifService {
   public @XmlAttachmentRef DataHandler getGifImage(String name);
}
Image

Regards,
Frits

Re: About Question enthuware.ocejws.v6.2.158 :

Posted: Sun Oct 30, 2016 5:31 am
by asdf_16
Hi Frits,

Thanks for your quick reply. Perhaps I'm getting confused between SwA in general and swaRef? The solution to enthuware.ocejws.v6.2.142 indicated the below:
With MTOM (unlike SwA) the binary data is not encoded in the attachment.

Re: About Question enthuware.ocejws.v6.2.158 :

Posted: Sun Oct 30, 2016 5:56 am
by fjwalraven
The solution to enthuware.ocejws.v6.2.142 indicated the below:

With MTOM (unlike SwA) the binary data is not encoded in the attachment.
That explanation is not correct. I have removed "unlike SwA" from the explanation.

Thanks for your feedback!
Frits