• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

cannot enable MTOM Feature

 
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic