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 » XMLNSC to Cobol using ESQL

Post new topic  Reply to topic
 XMLNSC to Cobol using ESQL « View previous topic :: View next topic » 
Author Message
pottas
PostPosted: Mon Sep 15, 2008 9:01 am    Post subject: XMLNSC to Cobol using ESQL Reply with quote

Disciple

Joined: 27 Oct 2005
Posts: 185
Location: South Africa

Guys,
I have the following scenario:

I expose a Web Service in Broker that accepts a SOAP message. From here I need to convert this XMLNSC message to a Cobol Copybook for the call to the back-end system.
My first attempt was to physically map the XMLNSC message to the Copybook. Now I looking for a more clever alternative - as the Copybook and the XMLNSC has the same fields in it, except the Copybook has a Channe Header and Enterprise Context (see ESQL below).

So I tried the following in the esql:

Code:
      --Remove the HTTP headers - Output is MQ
      SET OutputRoot.HTTPInputHeader = null;
      
      -- Add MQMD      
      CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN 'MQMD';
      SET OutputRoot.MQMD.Transactional = 'True';
      SET OutputRoot.MQMD.Encoding = 546;
      SET OutputRoot.MQMD.CodedCharSetId = 437;
      SET OutputRoot.MQMD.Expiry = -1;
      SET OutputRoot.MQMD.Format = 'MQSTR';

      SET OutputRoot.MQMD.ReplyToQ = 'SOADEV.KD000000.RESPONSE';
      SET OutputRoot.MQMD.ReplyToQMgr = 'TSTBRK99';

      SET OutputRoot.Properties.MessageSet = 'D41120K002001';
      SET OutputRoot.Properties.MessageType = 'msg_KDICUSTREFENQRQ';
      SET OutputRoot.Properties.MessageFormat = 'Binary1';
      
      --Build the Channel Header:
      SET OutputRoot.MRM.ZDLSOI_CHANNEL_HEADER.ZDLSOI_LOGICAL_SERVICE            = 'http://xxxxxx.xx.xx/services/customer-services/2009-01-10/Customer';
      SET OutputRoot.MRM.ZDLSOI_CHANNEL_HEADER.ZDLSOI_COMMAND               = 'CustRefEnq';
      SET OutputRoot.MRM.ZDLSOI_CHANNEL_HEADER.ZDLSOI_RETURN_DATA.ZDLSOI_SEVERITY      = '0';
      SET OutputRoot.MRM.ZDLSOI_CHANNEL_HEADER.ZDLSOI_RETURN_DATA.ZDLSOI_RETURN_CODE      = '0';
      SET OutputRoot.MRM.ZDLSOI_CHANNEL_HEADER.ZDLSOI_RETURN_DATA.ZDLSOI_RCDESCRIPTION   = '';
      SET OutputRoot.MRM.ZDLSOI_CHANNEL_HEADER.ZDLSOI_DUMMY.ZDLSOI_TICKETSHAR         = '';
      SET OutputRoot.MRM.ZDLSOI_CHANNEL_HEADER.ZDLSOI_DUMMY.ZDLSOI_FILLER1         = '';
      SET OutputRoot.MRM.ZDLSOI_CHANNEL_HEADER.ZDLSOI_DUMMY.ZDLSOI_SYSID         = '';
      SET OutputRoot.MRM.ZDLSOI_CHANNEL_HEADER.ZDLSOI_DUMMY.ZDLSOI_EIBTRNID         = '';
      SET OutputRoot.MRM.ZDLSOI_CHANNEL_HEADER.ZDLSOI_DUMMY.ZDLSOI_FILLER2         = '';
      SET OutputRoot.MRM.ZDLSOI_CHANNEL_HEADER.ZDLSOI_DUMMY.ZDLSOI_REPLYQ_DNS         = '';
      SET OutputRoot.MRM.ZDLSOI_CHANNEL_HEADER.ZDLSOI_DUMMY.ZDLSOI_REPLYQ_Q         = '';
      
      --Set the Enterprise Context:
      SET OutputRoot.MRM.ZDLSOI_ENTERPRISE_CONTEXT.ZDLSOI_EXECUTION_CONTEXT_ID               = '';
      SET OutputRoot.MRM.ZDLSOI_ENTERPRISE_CONTEXT.ZDLSOI_SOURCE_INFO.ZDLSOI_CHANNEL_ID            = 0;
      SET OutputRoot.MRM.ZDLSOI_ENTERPRISE_CONTEXT.ZDLSOI_SECURITY_INFO.ZDLSOI_TICKET.ZDLSOI_IDENTITY         = InputLocalEnvironment.Identity;
      SET OutputRoot.MRM.ZDLSOI_ENTERPRISE_CONTEXT.ZDLSOI_SECURITY_INFO.ZDLSOI_TICKET.ZDLSOI_AUTHENTICATION_LOC   = InputLocalEnvironment.AuthenticationLOC;
      SET OutputRoot.MRM.ZDLSOI_ENTERPRISE_CONTEXT.ZDLSOI_SECURITY_INFO.ZDLSOI_TICKET.ZDLSOI_SESSION_SEQUENCE_NR   = InputLocalEnvironment.SessionSequenceNr;
      SET OutputRoot.MRM.ZDLSOI_ENTERPRISE_CONTEXT.ZDLSOI_SECURITY_INFO.ZDLSOI_TICKET.ZDLSOI_EXPIRY_DATE_TIME      = InputLocalEnvironment.ExpiryDateTime;
      SET OutputRoot.MRM.ZDLSOI_ENTERPRISE_CONTEXT.ZDLSOI_SECURITY_INFO.ZDLSOI_TICKET.ZDLSOI_IDENTIFIER_TYPE      = InputLocalEnvironment.IdentifierType;
      SET OutputRoot.MRM.ZDLSOI_ENTERPRISE_CONTEXT.ZDLSOI_SECURITY_INFO.ZDLSOI_TICKET.ZDLSOI_TICKET_SIGNATURE      = InputLocalEnvironment.TicketSignature;
      SET OutputRoot.MRM.ZDLSOI_ENTERPRISE_CONTEXT.ZDLSOI_INSTRUMENTATION_INFO.ZDLSOI_INSTRUMENTATION_CTX_ID      = '';

      --Build the message Body:
      SET OutputRoot.MRM.KDI23_CUST_REF_ENQ_RQ.* = InputRoot.XMLNSC.tnsval:CustRefEnqRq.*;


I even tried the following as an alternative for the message body:

Code:
      --Build the message Body:
      SET OutputRoot.MRM.KDI23_CUST_REF_ENQ_RQ.*[] = InputRoot.XMLNSC.tnsval:CustRefEnqRq.*[];


...but to no avail, doesn't work.
so - I need your assistance - what am I doing wrong - and do I have other alternatives?
Back to top
View user's profile Send private message
paranoid221
PostPosted: Mon Sep 15, 2008 9:52 am    Post subject: Reply with quote

Centurion

Joined: 03 Apr 2006
Posts: 101
Location: USA

Can you post the error you get?
Would be helpful if you could get a generate a trace by using the trace node and post its contents here. That would help is nailing down the issue.
Regardless, this is my first stab at your problem.
Since you are interfacing with a mainframe system, I believe you should cast the input body with the appropriate/applicable CCSID & encoding before you put it into your Output message.
Try the above too and let us know. Search in the broker infocenter as to what values you need to use for CCSID & encodings for mainframe systems. A search in these forums should also get you a few results.
_________________
LIFE is a series of complex calculations, somewhere multiplied by ZERO.
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 » XMLNSC to Cobol using ESQL
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.