Author |
Message
|
pottas |
Posted: Fri Nov 07, 2014 12:43 am Post subject: MTOM setup in ESQL |
|
|
 Disciple
Joined: 27 Oct 2005 Posts: 185 Location: South Africa
|
Guys, I am running the following configuration in IIB9:
IBM Integration Toolkit
Version: 9.0.0.1
Build id: 9.0.0.1-20131122-1731
I want to send MTOM messages to an external vendor from IIB.
I have the following configuration :
FileInput Node --> esql Node --> SoapRequest Node
So, a file lands in a location, I pick up the file, and I attach it to my message going to the Soap Request call.
But the message gets sent as an in-line message as opposed to an MTOM attachment.
My esql looks like:
Code: |
SET OutputRoot.XMLNSC.soap:Envelope.soap:Body.gid:UploadReconFileMessageIn.gid:FileNameProvider = InputLocalEnvironment.File.Name;
SET OutputRoot.XMLNSC.soap:Envelope.soap:Body.gid:UploadReconFileMessageIn.gid:ReconFile = BASE64ENCODE(InputRoot.BLOB.BLOB);
SET OutputRoot.XMLNSC.soap:Envelope.soap:Body.gid:UploadReconFileMessageIn.gid:ServiceProvider = 'NEDBANK';
|
My wsdl is 'set up' for MTOM, added the following in the xsd header:
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
And the tag is defined as:
<xsd:element name="ReconFile" xmime:expectedContentTypes="application/octet-stream" type="xsd:base64Binary" minOccurs="1" maxOccurs="1"/>
Also, i checked 'Allow MTOM', and enabled validation on the node.
What am I missing? my best guess would be that I need to define something more on the line where I add the attachment to my base64 element.
Any assistance appreciated.[/b] |
|
Back to top |
|
 |
mgk |
Posted: Fri Nov 07, 2014 1:17 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
|
Back to top |
|
 |
pottas |
Posted: Fri Nov 07, 2014 6:53 am Post subject: |
|
|
 Disciple
Joined: 27 Oct 2005 Posts: 185 Location: South Africa
|
Thanks MGK,
Still battling, so I followed what the instructions was in the link you referred me to:
1. I enabled the flag 'Allow MTOM' on the Soap Request Node
2. I enabled 'Content and Value' Validation on the preceding esql node, as well as the Soap Request Node
3. I set the following two lines in the ESQL:
Code: |
SET InputLocalEnvironment.Destination.SOAP.Request.AllowMTOM = TRUE;
SET InputLocalEnvironment.Destination.SOAP.Request.MTOMThreshold = 1000;
|
4. I took off the base64 function for the tag I use for attaching the file:
Code: |
SET OutputRoot.XMLNSC.soap:Envelope.soap:Body.gid:UploadReconFileMessageIn.gid:FileNameProvider = InputLocalEnvironment.File.Name;
SET OutputRoot.XMLNSC.soap:Envelope.soap:Body.gid:UploadReconFileMessageIn.gid:ReconFile = InputRoot.BLOB.BLOB;
SET OutputRoot.XMLNSC.soap:Envelope.soap:Body.gid:UploadReconFileMessageIn.gid:ServiceProvider = 'NEDBANK';
|
Still, the data in the file gets sent in-line in the tag 'ReconFile'.
As stated, I am running IIB9, my colleague did the exact same setup on WMB, and he is sending it successfully as an MTOM attachment. |
|
Back to top |
|
 |
anandratan |
Posted: Sun Mar 06, 2016 9:20 am Post subject: |
|
|
Newbie
Joined: 06 Mar 2016 Posts: 2
|
pottas,were you able to resolve this issue.
I am also facing same issue and i am using IIB 9.0.0.4 |
|
Back to top |
|
 |
ibmmiddleware |
Posted: Fri Mar 11, 2016 10:12 am Post subject: |
|
|
Newbie
Joined: 11 Mar 2016 Posts: 4
|
Hi, I am using IIB 9.0.0.4 and was able to create the MTOM attachments. I followed exactly the same steps 1, 2 & 3 as mentioned in pottas post below.
On step 4, I still pass the BASE64ENCODE data to the SOAP Request node. |
|
Back to top |
|
 |
ibmmiddleware |
Posted: Fri Mar 11, 2016 10:32 am Post subject: |
|
|
Newbie
Joined: 11 Mar 2016 Posts: 4
|
Here is how my SOAP BODY & Header look:
Accept-Encoding: gzip,deflate
SOAPAction: "BulkRequestTransmitter"
Connection: Keep-Alive
Content-Type: multipart/related; boundary="WMBMIME1Boundaryurn_uuid_F4E872740D4FACC2271457719676677"; type="application/xop+xml"; start="<0.urn:uuid:F4E872740D4FACC2271457719676678@ibm.com>"; start-info="text/xml"; charset=utf-8
<soapenv:Body>
<acaBodyReq:ACABulkRequestTransmitter version="1.0">
<irs:BulkExchangeFile>
<xop:Include href="cid:1.urn:uuid:F4E872740D4FACC2271457719676772@ibm.com" xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
</irs:BulkExchangeFile>
</acaBodyReq:ACABulkRequestTransmitter>
</soapenv:Body> |
|
Back to top |
|
 |
shruti mehta 2817 |
Posted: Thu Aug 11, 2016 1:58 am Post subject: Issue Solution ? |
|
|
Newbie
Joined: 11 Aug 2016 Posts: 1
|
Hi,
pottas what you finally did to solve this issue ?
Newbie can you send your snippet which includes BASE64ENCODE.
Regards,
Shruti Mehta |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Aug 11, 2016 3:49 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
|