Sending attachments to external Webservice in MTOM_Packaging

Dear Community,

I’m trying to send attachments to external web service where the provider is looking for MTOM_Packaging.

I placed the file to be attached under IS location - IntegrationServer/test.xml and I used cid:test.xml to pass attachment with below settings (Ref: send an attachment when invoking an external Web Service - webMethods - Software AG Tech Community & Forums)

Created on version: 9.5
Pre-8.2 compatibility mode: False
Attachment enabled: False

But received No attachment Found response from the provider

This was working fine from SoapUI.

So looking for options on how to implement it in webemthods


CIDAtConsumer.JPG

There is a WmMtomStreamingSample.zip on code samples.

If you still have issues with the implementation, attach your package I will have a look.

Hello,

Additionally, you can find more info in these places:

Thanks for the replies.
I went through MtomStreamingSample package.

The provider web service contains 2 string params

1.PayloadName (In soapUI request, it contains the name of attachment as CID:)
2.AttachmentFile (Optional Field and Not Used in the soapUI request)

As I can’t import this string based WSDL directly in WBM to pass MTOM, I updated WSDL for these 2 fields from string to base64Binary and imported it.

Created MTOM object for the file to be attached in flow service and mapped it to base64Binary field
And also, I set “Attachment Enabled” to TRUE in webservice consumer.

When I submit the request, I’m receiving the response as “Payload name did not mached with attached payload….”

Looking for options on how/where to send the file name for attachment when we set Attachment Enabled to TRUE.
MTOMCreation.JPG

Hi,

The webservice provider is not expecting XOP (Which contains href in request).
It’s expecting only MIME (i.e EnableMTOM=false in soapUI client). [url]http://tech.forums.softwareag.com/techjforum/posts/list/55544.page[/url]

This seems to be SWA design (Which contains CID in request)
([url]SOAP Attachments and Files | SoapUI)

Now, how to design SWA webservice client in webMethods.
or how to convert MTOM request into SWA request.

Are there any WS-policies which we can use?

AFAIK, until 9.12 Integration Server’s web services do not have support for SWA as it is an older mechanism of attaching files to SOAP messages.

Consult SAG support if it is supported on the latest version or any workaround available.

Thanks Mahesh.

As a workaround, we designed the connectivity using JAVA services.