ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Sending attachments in SOAP Request

Post new topic  Reply to topic
 Sending attachments in SOAP Request « View previous topic :: View next topic » 
Author Message
Dhinesh Kumar S
PostPosted: Wed Mar 14, 2018 4:45 am    Post subject: Sending attachments in SOAP Request Reply with quote

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.

==================================================
I have referred both the below links but still the error is same,
==================================================
https://www.ibm.com/developerworks/websphere/library/techarticles/1601_crighton-trs/1601_crighton.html
https://www.ibm.com/developerworks/community/forums/html/topic?id=9a9d6f4a-be1d-44cf-b82d-29bf38b76669
Back to top
View user's profile Send private message
timber
PostPosted: Wed Mar 14, 2018 12:36 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Which system is throwing the error? IIB or the receiving web server?
Do you have any more details of the error - it doesn't give much information.
Back to top
View user's profile Send private message
Dhinesh Kumar S
PostPosted: Thu Mar 15, 2018 10:41 pm    Post subject: Reply with quote

Newbie

Joined: 14 Mar 2018
Posts: 3

Sorry for the delayed response.

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.
Back to top
View user's profile Send private message
Dhinesh Kumar S
PostPosted: Thu Mar 15, 2018 10:42 pm    Post subject: Reply with quote

Newbie

Joined: 14 Mar 2018
Posts: 3

Could you please help to validate the above ESQL code and let me know if there are any issues ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Sending attachments in SOAP Request
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.