• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

MTOM annotation and BindingType annotation

 
Ranch Hand
Posts: 1738
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In some references, it says when @BindingType (value = SOAPBinding.SOAP11HTTP_MTOM_BINDING) and @MTOM (enabled=false) are present in a SIB,
the MTOM annotation will take the precedence and it means MTOM will be disable.

But when I tried this with Martin Kalin's SkiImageService example in chapter 3, like this:


When I ran the publisher, I got this from my NetBean platform using JDK 1.7

It seems to me that MTOM cannot override BindingType in NetBean platform. This contradicts with what the references saying MTOM annotation overrides BindingType annotation
Any comments?
 
Creator of Enthuware JWS+ V6
Posts: 3288
296
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The specification say the following:

6.5.2 javax.xml.ws.soap.MTOMFeature
The MTOMFeature is used to specify if MTOM should be used with a web service. This feature should be used instead of the javax.xml.ws.soap.SOAPBinding.SOAP11HTTP MTOM BINDING, javax.xml.ws.soap.SOAPBinding.SOAP12HTTP MTOM BINDING and the javax.xml.ws.soap.SOAPBinding.setMTOMEnabled().


There is no precedence defined in the specs, so it is up to the application server developers to define a rule or not.
 
Himai Minh
Ranch Hand
Posts: 1738
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.
According to http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.base.doc%2Finfo%2Faes%2Fae%2Ftwbs_enablemtom.html,
"The presence and value of an @MTOM annotation overrides the value of the @BindingType annotation. For example, if the @BindingType indicates MTOM is enabled, but an @MTOM annotation is present with an enabled value of false, then MTOM is not enabled"

In my previous example, I put @MTOM(false) and @BindingType together in the same SIB. I expect MTOM is disabled according to the above specification. However, I got an error saying @MTOM(false) contradicts against @BindingType(....) .
 
Frits Walraven
Creator of Enthuware JWS+ V6
Posts: 3288
296
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are running NetBeans and not WebSphere where you got that information from. As the specs don't say anything about it (other than don't use the BindingType) you can't say NetBeans is wrong.
 
Himai Minh
Ranch Hand
Posts: 1738
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, using @MTOM (false) and @BindingType (...) together works for WebSphere , but not Netbean. That means @MTOM does not always overrides @BindingType in different platform.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Posts: 3288
296
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!