Problems invoking client Webservices with MIME Attachments

Hello,

This is going to be a long explaination…but hopefully I’m explaining this correctly.

I am trying to invoke a webservice with MIME attachments. We are using webMethods 7.1.2

IBM is the provider of the service and it only supports SOAP 1.1 so the use of MTOM is out (as far as I can tell).

My assumption is I am stuck building the MIME message manually using built-in MIME services. I’ve been working in this direction for a couple of days now.

We have been successful in running the service using SoapUI (awesome tool).
Unfortunately, I haven’t had much luck getting this to work correctly in webMethods.

I’ve ran the SOAP message and mime attachments generate by SoapUI successfully.
I’ve ran the SOAP message generated by webMethods in SoapUI successfully.
The same SOAP message ran in webMethods results in SOAP Faults.

The only thing I can think of is that webMethods is not generating a correct HTTP header. The SOAP exception from IBM says basically “Unexpected Character: UNICODE (0x4D)” which is a Capital “M”.

Here is the working HTTP header from SOAP UI:

POST /CMBGenericWebService/services/CMBGenericWebService HTTP/1.1
SOAPAction: “”
Content-Type: multipart/related; type=“text/xml”; start=“rootpart@soapui.org”; boundary=“----=_Part_3_13090704.1250015070886”
MIME-Version: 1.0
User-Agent: Jakarta Commons-HttpClient/3.1
Host: localhost:8080
Content-Length: 3777

Here here is one being generate by webMethods:

POST /CMBGenericWebService/services/CMBGenericWebService HTTP/1.1
User-Agent: Mozilla/4.0 [en] (WinNT; I)
Accept: image/gif, /
Host: falcomj3alz6y.nu.com:8080
Content-Type: application/x-www-form-urlencoded
SOAPAction:
Content-Length: 1441

MIME-Version: 1.0
Content-Type: multipart/related;
boundary=“----=_Part_73_1302154653.1250015512356”; type=“text/xml”;
start=“rootpart@soapui.org

I think the error being throw by IBM is because the header generated by webMethods has 2 sections. The part I marked in bold I know is generated by the built in service “createMIMEData”. I added my own “Content-Type” to try and get it to match what SoapUI sent.

I’m not sure why webMethods would generate a header like this but I can’t imagine it’s actually valid.

Any thoughts?

Custom tokens cannot be passed in http headers. webMethods doesnt support it. We faced a similar problem.

Refer the below link…

[URL]http://brainstorm.softwareag.com/ideas/viewIdea.apexp?id=087200000004JcP[/URL]

You can also vote for it if you find it useful…

Regards,
Senthil