aspose file tools*
The moose likes Web Services and the fly likes cannot enable MTOM Feature Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "cannot enable MTOM Feature" Watch "cannot enable MTOM Feature" New topic
Author

cannot enable MTOM Feature

Goran Markovic
Ranch Hand

Joined: Sep 26, 2008
Posts: 399
Hi, I cannot enable MTOM feature, and all my binary files are transferred in the body of the SOAP. I have enabled this fature on either server and client side, as much as I could gathered on the net:
this is client side code, where I tried all of this ways of MTOM enabling :



And on the server side :



Also, I have changed XSD file for response element , in order to client receive DataHandler, not byte [] :



But, my SOAP response is continuously :



So, does anyone could mark me what I am doing wrong?
Thanks in advance!
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Have you tried the example in section 10.3 of my study notes?
If so, did it work as expected, that is, with MTOM enabled?
Best wishes!
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi again!
Also note that when you are creating the instance of MTOMFeature on the client side, I recommend supplying a boolean "true" to specify that the MTOM feature is to be enabled:

In your code, you only supply the threshold.
I have had problems using SOAPBinding in connection to enabling/disabling MTOM in the past but found the above method to be more reliable.

Also, note that you have to include the following Metro JAR files on the classpath of the CLIENT, in order for MTOM to be used:
• webservices-api.jar
• webservices-extra-api.jar
• webservices-extra.jar
• webservices-rt.jar
• webservices-tools.jar

Best wishes!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cannot enable MTOM Feature