Posted: Wed Mar 14, 2018 4:45 am Post subject: Sending attachments in SOAP Request
Newbie
Joined: 14 Mar 2018 Posts: 3
Hi All,
I have a requirement to send a SOAP request with Attachment (.jpg) to the end system. I can able to successfully send a attachment through SOAP UI tool but not able to achive it through ESQL code in IIB 10.
Also not sure on what are the properties (Outputroot.SOAP.Attachment.) are required when trying to implement it via ESQL coding. Could you please help me out on this issue in esql to send attachment through SOAP request?
==================================================
Please find the below esql code that i have used,
==================================================
-- Attchemt Code
CREATE LASTCHILD OF Environment.Variables DOMAIN 'XMLNSC' NAME 'XMLNSC';
DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
CREATE FIELD Environment.Variables.XMLNSC;
SET Environment.Variables.XMLNSC.SOAP.Attachment.Id0.MIME_Headers."Name" = '/apps/cdts/test_files/Image/Facilities to HCM Images Integration/Input/Test/105348.jpg';
SET Environment.Variables.XMLNSC.SOAP.Attachment.Id0.MIME_Headers."Content-Type" = 'image/jpeg';
--'binary'; 'UTF-8';
SET Environment.Variables.XMLNSC.SOAP.Attachment.Id0.MIME_Headers."Content-Transfer-Encoding" = 'binary';
SET Environment.Variables.XMLNSC.SOAP.Attachment.Id0.MIME_Headers."Content-Id" = '105348.jpg';
SET Environment.Variables.XMLNSC.SOAP.Attachment.Id0.MIME_Headers."Content-Disposition" ='attachment; name="/apps/cdts/test_files/Image/Facilities to HCM Images Integration/Input/Test/105348.jpg"'||';'||'filename="105348.jpg"';
-- Attached file
DECLARE soapEnv BLOB;
SET soapEnv = CAST (ASBITSTREAM(Environment.Variables.XMLNSC.SOAP.Attachment.Id0) AS BLOB CCSID 1208);
SET OutputRoot.SOAP.Attachment.Id0.BLOB = soapEnv;
SET OutputLocalEnvironment.Destination.SOAP.Request.AllowMTOM = true;
==================================================
And i am facing the below error,
==================================================
Fault
faultcode:CHARACTER:env:Server
faultstring:CHARACTER:Failure in SDOSerializer.deserialize.
The receiving web server/service is throwing the error.
Actually i suspect the issue is with the SOAP request which i am sending it to particular web service.
I don't have any other error. But the error i received is from fault terminal of that SOAP request node. Also i am seeing 200 OK response in HTTP Response header. SO from this i concluded the request is reached to particular web service.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum