About Question enthuware.ocejws.v6.2.157 :

Moderators: Site Manager, fjwalraven

howdy2u
Posts: 3
Joined: Sat Apr 25, 2015 10:51 am
Contact:

About Question enthuware.ocejws.v6.2.157 :

Post by howdy2u » Sat Apr 25, 2015 10:59 am

The answer may be correct, but I haven't been able to confirm.

1) The API doc says ABOVE, ' binary data above this size in bytes will be XOP encoded or sent as attachment. ' So if attachment is 100 bytes and MTOM(threshold=100), then it should be sent inline. 101 would be sent as attachment.

2) Hell if this works correctly on Weblogic 12.1.3. I have an image that is 32063 bytes. I have to set the threshold real high to get it to be sent inline. Not sure where the cut off is. With MTOM(threshold=320640) (notice the extra 0) it is still sent as an attachment. If I add another zero to the end, it gets sent inline.

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

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

Post by fjwalraven » Sun Apr 26, 2015 2:05 pm

Hi!
With MTOM(threshold=320640) (notice the extra 0) it is still sent as an attachment. If I add another zero to the end, it gets sent inline.
That is odd, you should check Weblogic for this particulair behaviour. It is obvious that Weblogic does not follow the JAX-WS specs here.

Regards,
Frits

khaled
Posts: 3
Joined: Thu Jun 18, 2015 3:42 am
Contact:

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

Post by khaled » Wed Jul 29, 2015 4:09 am

Hi,
But the client didn't specify any threshold, why the file will be sent as attachment from the client ? I don't understand that. Can anyone explain me please.

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

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

Post by fjwalraven » Wed Jul 29, 2015 4:47 am

If no threshold is specified then the default of 0 bytes is used. That is why it is sent as an attachment.

Regards,
Frits

victor2016
Posts: 12
Joined: Wed Jan 20, 2016 7:16 pm
Contact:

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

Post by victor2016 » Sat Jul 30, 2016 10:30 pm

Hi,

Please confirm my understanding:

- the File is always sent inline when the size is less than specified threshold
- if no threshold is specified, the File is always sent as attachment

Thanks,
Victor.

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

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

Post by fjwalraven » Sun Jul 31, 2016 1:06 am

Hi Victor!

Yes, you understood it correctly!

Note that if you don't specify a threshold, the default of 0 bytes will be used.

Regards,
Frits

Gerardo
Posts: 16
Joined: Tue Nov 08, 2016 9:39 pm
Contact:

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

Post by Gerardo » Sun Nov 13, 2016 6:15 pm

Hi,
As howdy2u mentioned:
The API doc says ABOVE, ' binary data above this size in bytes will be XOP encoded or sent as attachment. ' So if attachment is 100 bytes and MTOM(threshold=100), then it should be sent inline. 101 would be sent as attachment. (http://docs.oracle.com/javase/6/docs/ap ... /MTOM.html)

For sending the binary data as an attachment which is true?
SIZE >= threshold?
or
SIZE > threshold?

Thanks in advance.

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

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

Post by fjwalraven » Sun Nov 13, 2016 11:41 pm

The API doesn't mention it like he is writing it, the answer is:

SIZE >= threshold?

You can verify it in the Metro JAX-WS documentation ( https://jax-ws.java.net/2.2.10/docs/rel ... ation.html )
7.2.4.1. How to specify MTOM data Threshold
Default threshold value for MTOM feature is 0 bytes. You can set a threshold value for MTOM by using @MTOM annotation on server-side or using MTOMFeature on client-side. Let's say you set MTOM threshold as 3000, this serves as hint to JAX-WS when to send binary dat as attachments. In this case, JAX-WS will send any byte array in the message thats equal to or larger than 3KB as attachment and the corresponding XML infoset will be XOP encoded (will contain reference to this attachment)
Regards,
Frits

Gerardo
Posts: 16
Joined: Tue Nov 08, 2016 9:39 pm
Contact:

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

Post by Gerardo » Mon Nov 14, 2016 12:57 am

Thanks for the clarification Frits

johnlong
Posts: 185
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

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

Post by johnlong » Wed Nov 23, 2016 11:30 am

Client does not define any threshold, so it is assumed to be 0.
Does client infer threshold from server?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest