About Question enthuware.ocejws.v6.2.158 :

Moderators: Site Manager, fjwalraven

Post Reply
fabiolino
Posts: 25
Joined: Wed Jun 24, 2015 7:26 am
Contact:

About Question enthuware.ocejws.v6.2.158 :

Post 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 5674 times

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post 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

ramy6_1
Posts: 124
Joined: Wed Feb 12, 2014 2:44 am
Contact:

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

Post by ramy6_1 »

Hello ,

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

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post by fjwalraven »

  1. Fixed: Thanks!
  2. Check this nice explanation:
http://www.informit.com/library/content ... &seqNum=40

Regards,
Frits

asdf_16
Posts: 2
Joined: Sun Oct 30, 2016 2:45 am
Contact:

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

Post 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.

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post 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

asdf_16
Posts: 2
Joined: Sun Oct 30, 2016 2:45 am
Contact:

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

Post 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.

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post 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

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests