send an attachment when invoking an external Web Service

Hello,

I have to send an attachment when invoking a Web Service from IS in 8.2.2 version.
The Web Service I’m trying to invoke resides in our partners system.
When I invoke it with SOAP UI, I am able to send an attachment and the response is working fine.

Please help me to implement the same in webmethods.

Please share if you have any detailed step to step guide with example.

Any help would be muchappreciated!

Hi Anu,

if you have access to the WSDL create a WebServiceDesciptor as a Consumer for it.

After that you can access the generated connector service in your flow.

Regards,
Holger

Hi Holger,

Thank you for the reply.
I have downloaded and saved the wsdl file in the server and created the Consumer Connector.
When I tried to test the flow, I got the attached screen.

In the mhb:href field I have provided the xml file name (cid:S3_3B18_20151019_0009_ett4001.xml) . I am not sure how to attach the file.
Please advise how do I attach the file in designer for testing?

And also how to provide rest of the values from auth, message to transportHeaders.

Please help to proceed
Thanks again

Regards,
Anu[img]

Hi Anu,

when testing the service on the IS (even via Designer) the file name need to resolve to a file on the box where IS is running.
Path is relative to IntegrationServer/ or for newer installations IntegrationServer//.

How to fill the requested fields is dependent on whether Basic Authentication, WS-Authentication or WS-Security is used.
Can you check this with your partner?
Or check with your SoapUI-Project what has been set there.

Regards,
Holger

Hi Holger,

Thank you for the information.

Will get the details from partner and try.

Please tell me, What should be the Pre-8.2 compatibility mode here ? and also is there a way to customize the file path ?

Thank you

Regards,
Anu

Hi Anu,

as you are on 8.2 and creating a new node the Pre-8.2-Compatibility will be automatically set to false.

This flag has been introduced to handle the different WS-behaviour before 8.2 (old) and for 8.2ff (new).

For the filepath:
You can either use an absolute path (starting with a ‘/’) or a relative path as described in my previous post.
If your location is lcoated outside the IntegrationServer you will have to add some ‘…/’ to traverse the directory structure.

Regards,
Holger

Hi Holger,

This is noted.
Thank you for your guidance and I am able to invoke the web service and send attachment.

Regards,
Anu

Hi Holger,

This is noted.
Thank you for your guidance and I am able to invoke the web service and send attachment.

Regards,
Anu

Hi,

Could you suggest how to implement this from the consumer?

The file to be attached is under this location - IntegrationServer/test.xml
So, I used cid:test.xml

But received No attachment Found response from provider

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

Thanks,
Punith
CIDAtConsumer.JPG

–Just an update–

Looks like SWA (cid) support is not present till WM9.12.

http://tech.forums.softwareag.com/techjforum/posts/list/0/68586.page#235111

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