aspose file tools*
The moose likes Web Services and the fly likes MTOM - CXF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "MTOM - CXF" Watch "MTOM - CXF" New topic
Author

MTOM - CXF

Aruna Jayabalu
Greenhorn

Joined: Aug 09, 2011
Posts: 13
Hi,

I have the MTOM property enabled in the configuration file.
But now I wanted the mtom property to change dynamically.
Please suggest on how to enable this mtom at class level?

Thanks,
Aruna.J

Aruna Jayabalu
Greenhorn

Joined: Aug 09, 2011
Posts: 13
When I remove the mtom property in the configuration file and when I add @MTOM(enabled=true, threshold=1024)
in the endpoint class, then I am getting the content type as 'application/xop'.
But I want the content type as 'text/plain' for some of the services.
So can I disable this mtom on the method level?
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
As you surely have seen, the @MTOM annotation can only be applied to the class level.
As far as I know, it is not possible to disable MTOM for a single method in a web service that uses MTOM - it is all or nothing, it seems.
While not entirely elegant, I would separate the service, creating two services. One that uses MTOM and one that does not.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: MTOM - CXF