Sending MTOM attachments with Consumer Web Service Descriptor

Hello,

I have a bit of trouble sending an attachment when invoking a Web Service from IS in 8.2.2 version (CoreFix6).

The Web Service I’m trying to invoke resides on the same IS as the invoking service, and has been coded to handle incoming attachments and print their contents to the server log.
When I invoke it with SOAP UI, I am able to send an attachment and see it printed in the logs, so the receiving part is working well.

I created a Consumer Web Service Descriptor from the WSDL of this Web Service and set its “Attachment enabled” property to “true”. I created a flow service with the following sequence:

MAP (Set Value “some text” on a String variable)
stringToBytes (on the String variable)
createXOPObject (on the output from previous step)
ConsumerWSD (with the XOPObject as input, and IS URL/credentials…)

When I run this service, the Web Service is called, I get a 200 OK Response from it, but nothing gets printed in the server log (or rather, an empty line gets printed, showing that the debugLog did execute).

I set the watt.server.SoapRPC.debug to true in the Extended Settings and ran the test again, and got this puzzling result:

The first line features the contents of the attachment base64 encoded, but the second line, which seems to be the actual SOAP request sent by the client, features an empty string instead.
I’m aware that MTOM/XOP attachments do not appear in the SOAP message but are transported as MIME attachments, but I think there should be a reference to a content ID, as there is when testing with SOAP UI, and not an empty string.

I also tried to use a stream-based XOPObject instead of a byte array-based one, but it didn’t change anything.
I checked the “Enable MTOM streaming for elements of type base64Binary” checkbox when creating the WSD, and it’s not running in compatibility mode. I used SOAP 1.2 Protocol and Document/Literal Style.

I think I followed the documentation, but obviously there’s something I’m missing.
I’m out of ideas and thought I’d ask here before opening a case.

Any help would be appreciated!

Hi Fabien,

A similar problem is discussed here: Issue with pub.soap.utils:getXOPObjectContent ..... MTOM objects - webMethods - Software AG Tech Community & Forums .

Can you download the attachments from the link and try them?

Hope it helps,
Vlad Turian