<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to use MTOM in Ivy web service call</title><link>https://answers.axonivy.com/questions/483/how-to-use-mtom-in-ivy-web-service-call</link><description>&lt;p&gt;I need to use MTOM in web service calls. How can I do that?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/483/how-to-use-mtom-in-ivy-web-service-call" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 14 Nov 2013 08:03:57 -0500</lastBuildDate><item><title>Answer by SupportIvyTeam</title><link>https://answers.axonivy.com/questions/483/how-to-use-mtom-in-ivy-web-service-call/484</link><description>&lt;p&gt;Xpert.ivy generates Java stubs for each web service in order to call the web service. These files are located within your project. You can patch these files keeping in mind that a "Generate WS classes" (in the web service configuration editor) overwrites your changes.&lt;/p&gt;
&lt;p&gt;To enable MTOM you have to patch each WS client stubs you want to use MTOM for. There is no way to globally set options for the Axis2 client classes.&lt;/p&gt;
&lt;p&gt;So, locate your stub (e.g. MyXYWebServiceStub.java - this files ends with Stub.java). Find its method, which you want to invoke in your WS Step (the name is the same as the method you see in the WS Step, just like the parameters which you see in your WS Step configuration). Then, add your modifications there, e.g. &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;_serviceClient.getOption().setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;From Xpert.ivy 4.2 all Axis2 client files are packed into jars to improve compilation performance. So whenever you patch an Axis2 stub, these stubs have to be re-compiled, and re-packed into the jars.
These jars are located in your project's lib_ws/client folder.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">SupportIvyTeam</dc:creator><pubDate>Thu, 14 Nov 2013 08:03:57 -0500</pubDate><guid>https://answers.axonivy.com/questions/483/how-to-use-mtom-in-ivy-web-service-call/484</guid></item></channel></rss>