wM 7.1 MTOM enabled SOAP Webservices

Has anyone gotten MTOM to work in the latest 7.1 release?

As a proof-of-concept, I am trying to create a MTOM enabled webservice provider hosted in Integration Server and then connect to it with a WS connector, preferably hosted in webMethods as well.

Using the 7.1 suite, I have made a flow with a string input and output of content type “base64Binary {XML Schema}” and then used the WS wizard to create a provider webservice for that flow. Finally, I use the providers WSDL to create a consumer.

Per the WS developers guide, I have set the SOAP version to 1.2 and Attachments enabled to true (On both provider and consumer). However, when this service executes, I can see through a TCP monitor that neither the request or response is broken up into MIME parts per the MTOM spec.

Another setting we checked was watt.server.SOAP.MTOMThreshold. It defaults to 0, and we have changed it to 1 and sent an 8kb message through with the same result.

We are expecting to see something similar to:

in the generated WSDL, but are getting

<xsd:element name=“myData” type=“xsd:base64Binary”/>

Is there a setting or namespace import missing? Can anyone confirm getting MTOM to work? This seems to be a newer feature and documentation is sparse. Thanks for the help!

I haven’t tried any MTOM tests. Let us know what else you learn.

Mark

The problem turned out not to be with any of the settings, but with how MTOM was handling the encoded strings.

pub.string:base64Encode puts newlines every 76 characters in the encoded message per w3 spec. However, the MTOM module does not accept these newlines and defaults to sending the data inline.

The fix is to take the newlines out of the encoded message. Not sure how webMethods is going to address this, but in the meantime at least we know what caused the problem.

As an update, webMethods Tech Support provided a new base64 encoder which corrected the problem.

I am also facing same issue, any help how to use new base64Encode service.

There are 3 inputs for this service –bytes, -useNewLine and –encoding. In bytes, we are passing the output which we got after reading a file and in –useNewLine, not passing anything, by default it is true and when we are hard coding it to false, getting error “com.wm.app.b2b.server.ServiceException: javax.xml.soap.SOAPException: MTOM Attachments Processing Failed: Cannot serialize the XOP Message; MIME serialization has failed” from soapClient, So not getting how to use it to remove new lines from binary data.

Thanks in advance.

-bsrajput

Hi Perrii,
I am trying to implent MTOM on webMethods 8.0 . Will it be possible for you to provide the new base64 encoder which corrected your problem.

Regards,
Amrendra