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 IndexWebSphere Message Broker Supportserializing issues from soaprequest to fixed length

Post new topicReply to topic
serializing issues from soaprequest to fixed length View previous topic :: View next topic
Author Message
naveeng
PostPosted: Sun Jul 09, 2017 11:28 pm Post subject: serializing issues from soaprequest to fixed length Reply with quote

Novice

Joined: 10 Jan 2011
Posts: 14

Hi Team,

Below is the copybook to which I need to transform the incoming Soaprequest into fixed length.

01 HOCHD1RQ.
03 RQ-HEADER.
05 RQ-MSG-CODE PIC X(02).
05 RQ-CLIENT-PROF-ID PIC X(0.
05 FILLER PIC X(04).
05 RQ-NETWORK-ID PIC X(0.
05 RQ-SIGNATURE PIC X(0.
05 RQ-DATA-PREFIX PIC X(06).
05 RQ-CLIENT-OFFICE PIC X(05).
05 FILLER PIC X(01).
05 RQ-SESSION-ID PIC X(0.
05 RQ-CORRELATION-ID PIC X(15).
05 RQ-MSG-LEN PIC 9(05).
05 RQ-SIM-DEBUG-IND PIC X(01).
05 RQ-WF-STATIC-PREFIX PIC X(01).
05 RQ-WF-DYNAMIC-PREFIX PIC X(01).
05 RQ-MDA-PROCESS-MODE PIC X(01).
05 RQ-SERVER-ID PIC X(01).
05 RQ-PCB-PREFIX PIC X(01).
05 RQ-NLS-CODE-PAGE PIC X(05).
05 RQ-NLS-LOCALE-NAME PIC X(05).
05 FILLER PIC X(14).
05 RQ-TYPE PIC X(10).
05 RQ-FUNCTION PIC X(10).
05 RQ-BUSREQ-CODE PIC X(05).
05 RQ-CONTINUATION-IND PIC X(01).
05 RQ-TASK-ID PIC X(0.
05 FILLER PIC X(02).
05 RQ-SUB-SYNC PIC X(0.
05 RQ-CONT-TYPE PIC X(01).
05 FILLER PIC X(50).
05 RQ-DATA-LEN PIC 9(05).
03 RQ-BODY.
05 RQ-SUBCOY PIC X(03).
05 RQ-RISKSTATE PIC X(02).
05 RQ-POLICY PIC X(12).
05 RQ-ITEMNO PIC X(04).
05 RQ-RISKSEQ PIC X(04).
05 RQ-COUNTRY PIC X(03).
05 RQ-ADDRREF PIC X(09).
05 RQ-EFFECTDTE PIC X(0.
05 RQ-TRANSACTION PIC X(10).
05 RQ-CALCSI PIC X(09).
05 RQ-BUILDING-SI PIC X(09).
05 RQ-RECSI PIC X(01).
05 RQ-GNCT-SI PIC X(09).
05 RQ-QUESTION-SET OCCURS 30.
07 RQ-QUESTIONNM PIC X(10).
07 RQ-ANSWER PIC X(10).

I have done the below piece of coding to generate/create the outputroot.

BEGIN
CALL CopyMessageHeaders();

DECLARE inRef REFERENCE TO InputRoot.XMLNSC.nsHomMsg:HOCHD1Request;
DECLARE inMdpReqHdrRef REFERENCE TO inRef.nsHomMsg:MDpRequestHeader;
DECLARE inBusReqDataRef REFERENCE TO inRef.nsHomMsg:BusinessRequestData_HOCHD1;
DECLARE inCmnMsgReqHdrRef REFERENCE TO inMdpReqHdrRef.nsInsCommonHdr:CommonMessageInputHeader;
DECLARE inBusReqHdrRef REFERENCE TO inMdpReqHdrRef.nsInsCommonHdr:BusinessRequestHeader;

DECLARE outHdrRef REFERENCE TO OutputRoot.DFDL.HOCHD1RQ.RQ_HEADER;
DECLARE outBdyRef,outQtnSetRef REFERENCE TO OutputRoot.DFDL.HOCHD1RQ.RQ_BODY;


DECLARE outQtnSetCnt, outQtnSetNo INTEGER;

CREATE LASTCHILD OF OutputRoot DOMAIN 'DFDL' NAME 'DFDL';
CREATE FIRSTCHILD OF OutputRoot.DFDL NAME 'HOCHD1RQ';

CREATE FIRSTCHILD OF OutputRoot.DFDL.HOCHD1RQ AS outHdrRef NAME 'RQ_HEADER';
CREATE FIRSTCHILD OF OutputRoot.DFDL.HOCHD1RQ AS outBdyRef NAME 'RQ_BODY';


-- Create element MDpRequestHdr
CALL ConstructCommonBuildingSIRequestHeader(inCmnMsgReqHdrRef, inBusReqHdrRef, outHdrRef, 883, 683);

-- Create body of HOCHD1RQ

SET outBdyRef.RQ_SUBCOY = COALESCE(inBusReqDataRef.nsHomMdp:SubCoy.nsHomBaseType:String3,'');
SET outBdyRef.RQ_RISKSTATE = COALESCE(inBusReqDataRef.nsHomMdp:RiskState.nsHomBaseType:String2,'');
SET outBdyRef.RQ_POLICY = COALESCE(inBusReqDataRef.nsHomMdp:Policy.nsHomBaseType:String12,'');


In the Userlogs it throws below error:

2017-07-09 21:36:35.581000 6 UserTrace BIP5841I: ''Offset: 255. Finished processing element 'RQ_BODY'.''
2017-07-09 21:36:35.581024 6 UserTrace BIP5843E: ''The DFDL serializer cannot output element 'RQ_HEADER'
because it does not match an element declaration at the current position in the DFDL schema model.''

An error occurred whilst serializing with DFDL /DFDL/HORHD1RQ/RQ_HEADER'''.
Back to top
View user's profile Send private message
timber
PostPosted: Mon Jul 10, 2017 12:24 am Post subject: Reply with quote

Yatiri

Joined: 25 Aug 2015
Posts: 654

When posting code or trace, please use [c o d e] tags so that the result is readable.

Please can you insert a Trace node just before the output node, and set the pattern to ${Root}. Post the result here.
Back to top
View user's profile Send private message
timber
PostPosted: Mon Jul 10, 2017 12:27 am Post subject: Reply with quote

Yatiri

Joined: 25 Aug 2015
Posts: 654

Change that...I've just spotted your problem:
Code:
CREATE FIRSTCHILD OF OutputRoot.DFDL.HOCHD1RQ AS outHdrRef NAME 'RQ_HEADER';
CREATE FIRSTCHILD OF OutputRoot.DFDL.HOCHD1RQ AS outBdyRef NAME 'RQ_BODY';
In your message tree, you are creating the body as the first child. That second line should be 'CREATE LASTCHILD...'
Back to top
View user's profile Send private message
timber
PostPosted: Mon Jul 10, 2017 12:29 am Post subject: Reply with quote

Yatiri

Joined: 25 Aug 2015
Posts: 654

One more thing:
Code:
DECLARE outQtnSetCnt, outQtnSetNo INTEGER;

This style of code is hardly ever the best solution. Use a FOR loop or a WHILE loop, not a counter.
Back to top
View user's profile Send private message
naveeng
PostPosted: Mon Jul 10, 2017 2:34 am Post subject: Reply with quote

Novice

Joined: 10 Jan 2011
Posts: 14

Thanks for your response timber. Below is the root before the output :-

Code:

Root :
 ( ['SOAPRoot' : 0x2ab6189e2e20]
  (0x01000000:Name):Properties      = ( ['MQPROPERTYPARSER' : 0x2ab618afbac0]
    (0x03000000:NameValue):MessageSet             = '' (CHARACTER)
    (0x03000000:NameValue):MessageType            = '' (CHARACTER)
    (0x03000000:NameValue):MessageFormat          = '' (CHARACTER)
    (0x03000000:NameValue):Encoding               = 546 (INTEGER)
    (0x03000000:NameValue):CodedCharSetId         = 1208 (INTEGER)
    (0x03000000:NameValue):Transactional          = FALSE (BOOLEAN)
    (0x03000000:NameValue):Persistence            = FALSE (BOOLEAN)
    (0x03000000:NameValue):CreationTime           = GMTTIMESTAMP '2017-07-10 10:20:35.013445' (GMTTIMESTAMP)
    (0x03000000:NameValue):ExpirationTime         = -1 (INTEGER)
    (0x03000000:NameValue):Priority               = 0 (INTEGER)
    (0x03000000:NameValue):ReplyIdentifier        = X'000000000000000000000000000000000000000000000000' (BLOB)
    (0x03000000:NameValue):ReplyProtocol          = 'SOAP-AXIS2' (CHARACTER)
    (0x03000000:NameValue):Topic                  = NULL
    (0x03000000:NameValue):ContentType            = 'text/xml; charset=UTF-8' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceType     = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceToken    = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourcePassword = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceIssuedBy = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedType     = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedToken    = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedPassword = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedIssuedBy = '' (CHARACTER)
  )
  (0x01000000:Name):HTTPInputHeader = ( ['WSINPHDR' : 0x2ab618b83dd0]
    (0x03000000:NameValue):X-Original-HTTP-Command = 'POST http://10.37.4.72:7804/InsuranceServices/InsuranceHomeService_v1.0/ HTTP/1.1' (CHARACTER)
    (0x03000000:NameValue):Host                    = '10.37.4.72:7804' (CHARACTER)
    (0x03000000:NameValue):Accept                  = 'application/soap+xml,multipart/related,text/*' (CHARACTER)
    (0x03000000:NameValue):User-Agent              = 'IBM WebServices/1.0' (CHARACTER)
    (0x03000000:NameValue):Cache-Control           = 'no-cache' (CHARACTER)
    (0x03000000:NameValue):Pragma                  = 'no-cache' (CHARACTER)
    (0x03000000:NameValue):SOAPAction              = '"createHomeBuildingDetails_HOCHD1"' (CHARACTER)
    (0x03000000:NameValue):Connection              = 'Keep-Alive' (CHARACTER)
    (0x03000000:NameValue):Saveconnection          = '19058814971499682035017' (CHARACTER)
    (0x03000000:NameValue):Ibm-Was-Client          = 'TRUE' (CHARACTER)
    (0x03000000:NameValue):Content-Type            = 'text/xml; charset=UTF-8' (CHARACTER)
    (0x03000000:NameValue):Content-Length          = '8184' (CHARACTER)
    (0x03000000:NameValue):Date                    = 'Mon, 10 Jul 2017 10:20:34 GMT' (CHARACTER)
    (0x03000000:NameValue):X-Remote-Addr           = '10.37.3.93' (CHARACTER)
    (0x03000000:NameValue):X-Remote-Host           = '10.37.3.93' (CHARACTER)
    (0x03000000:NameValue):X-Server-Name           = '10.37.4.72' (CHARACTER)
    (0x03000000:NameValue):X-Server-Port           = '7804' (CHARACTER)
  )
  (0x01000000:Name):DFDL            = ( ['dfdl' : 0x2ab618c39460]
    (0x01000000:Name):HOCHD1RQ = (
      (0x01000000:Name):RQ_HEADER = (
        (0x03000000:NameValue):RQ_MSG_CODE          = '05' (CHARACTER)
        (0x03000000:NameValue):RQ_CLIENT_PROF_ID    = 'TST79' (CHARACTER)
        (0x03000000:NameValue):fill_0               = '' (CHARACTER)
        (0x03000000:NameValue):RQ_NETWORK_ID        = '' (CHARACTER)
        (0x03000000:NameValue):RQ_SIGNATURE         = 'INV ' (CHARACTER)
        (0x03000000:NameValue):RQ_DATA_PREFIX       = '' (CHARACTER)
        (0x03000000:NameValue):RQ_CLIENT_OFFICE     = '' (CHARACTER)
        (0x03000000:NameValue):fill_1               = '' (CHARACTER)
        (0x03000000:NameValue):RQ_SESSION_ID        = '02419643' (CHARACTER)
        (0x03000000:NameValue):RQ_CORRELATION_ID    = '345678901234512' (CHARACTER)
        (0x03000000:NameValue):RQ_MSG_LEN           = 883 (INTEGER)
        (0x03000000:NameValue):RQ_SIM_DEBUG_IND     = '' (CHARACTER)
        (0x03000000:NameValue):RQ_WF_STATIC_PREFIX  = '' (CHARACTER)
        (0x03000000:NameValue):RQ_WF_DYNAMIC_PREFIX = '' (CHARACTER)
        (0x03000000:NameValue):RQ_MDA_PROCESS_MODE  = '1' (CHARACTER)
        (0x03000000:NameValue):RQ_SERVER_ID         = '' (CHARACTER)
        (0x03000000:NameValue):RQ_PCB_PREFIX        = 'A' (CHARACTER)
        (0x03000000:NameValue):RQ_NLS_CODE_PAGE     = '' (CHARACTER)
        (0x03000000:NameValue):RQ_NLS_LOCALE_NAME   = '' (CHARACTER)
        (0x03000000:NameValue):fill_2               = '' (CHARACTER)
        (0x03000000:NameValue):RQ_TYPE              = 'HOCHD1' (CHARACTER)
        (0x03000000:NameValue):RQ_FUNCTION          = '' (CHARACTER)
        (0x03000000:NameValue):RQ_BUSREQ_CODE       = '' (CHARACTER)
        (0x03000000:NameValue):RQ_CONTINUATION_IND  = '' (CHARACTER)
        (0x03000000:NameValue):RQ_TASK_ID           = '' (CHARACTER)
        (0x03000000:NameValue):fill_3               = '' (CHARACTER)
        (0x03000000:NameValue):RQ_SUB_SYNC          = '' (CHARACTER)
        (0x03000000:NameValue):RQ_CONT_TYPE         = '' (CHARACTER)
        (0x03000000:NameValue):fill_4               = '' (CHARACTER)
        (0x03000000:NameValue):RQ_DATA_LEN          = 683 (INTEGER)
        (0x03000000:NameValue):RQ_GNCT_SI           = '' (CHARACTER)
      )
      (0x01000000:Name):RQ_BODY   = (
        (0x03000000:NameValue):RQ_SUBCOY       = '300' (CHARACTER)
        (0x03000000:NameValue):RQ_RISKSTATE    = '03' (CHARACTER)
        (0x03000000:NameValue):RQ_POLICY       = 'QTE328740111' (CHARACTER)
        (0x03000000:NameValue):RQ_ITEMNO       = '0001' (CHARACTER)
        (0x03000000:NameValue):RQ_RISKSEQ      = '0001' (CHARACTER)
        (0x03000000:NameValue):RQ_COUNTRY      = 'AUS' (CHARACTER)
        (0x03000000:NameValue):RQ_ADDRREF      = '' (CHARACTER)
        (0x03000000:NameValue):RQ_EFFECTDTE    = '20170629' (CHARACTER)
        (0x03000000:NameValue):RQ_TRANSACTION  = 'EST' (CHARACTER)
        (0x03000000:NameValue):RQ_CALCSI       = '565000' (CHARACTER)
        (0x03000000:NameValue):RQ_BUILDING_SI  = '450000' (CHARACTER)
        (0x03000000:NameValue):RQ_RECSI        = 'Y' (CHARACTER)
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
        (0x01000000:Name     ):RQ_QUESTION_SET = (
          (0x03000000:NameValue):RQ_QUESTIONNM = '' (CHARACTER)
          (0x03000000:NameValue):RQ_ANSWER     = '' (CHARACTER)
        )
      )
    )
  )
)
Time is: 2017-07-10 20:20:35.040307
Back to top
View user's profile Send private message
naveeng
PostPosted: Mon Jul 10, 2017 2:36 am Post subject: Reply with quote

Novice

Joined: 10 Jan 2011
Posts: 14

Hi Timber,

Below is the code change I have done.
Code:


CREATE COMPUTE MODULE SF_MapToHOCHD1Request_Map_To_HOCHD1RQ
   CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN
      CALL CopyMessageHeaders();
      
      DECLARE inRef          REFERENCE TO InputRoot.XMLNSC.nsHomMsg:HOCHD1Request;
      DECLARE inMdpReqHdrRef    REFERENCE TO inRef.nsHomMsg:MDpRequestHeader;
      DECLARE inBusReqDataRef REFERENCE TO inRef.nsHomMsg:BusinessRequestData_HOCHD1;
      DECLARE inCmnMsgReqHdrRef REFERENCE TO inMdpReqHdrRef.nsInsCommonHdr:CommonMessageInputHeader;
      DECLARE inBusReqHdrRef      REFERENCE TO inMdpReqHdrRef.nsInsCommonHdr:BusinessRequestHeader;
      
      DECLARE outQtnSetCnt, outQtnSetNo INTEGER;
            
      CREATE LASTCHILD OF OutputRoot DOMAIN 'DFDL' NAME 'DFDL';
      CREATE FIRSTCHILD OF OutputRoot.DFDL NAME 'HOCHD1RQ';
      
      DECLARE outHdrRef REFERENCE TO OutputRoot.DFDL.HOCHD1RQ.RQ_HEADER;
      DECLARE outBdyRef,outQtnSetRef REFERENCE TO OutputRoot.DFDL.HOCHD1RQ.RQ_BODY;
      
      CREATE FIRSTCHILD OF OutputRoot.DFDL.HOCHD1RQ AS outHdrRef NAME 'RQ_HEADER';
      CREATE LASTCHILD OF OutputRoot.DFDL.HOCHD1RQ AS outBdyRef NAME 'RQ_BODY';
      
      -- Create element MDpRequestHdr
      CALL ConstructCommonBuildingSIRequestHeader(inCmnMsgReqHdrRef, inBusReqHdrRef, outHdrRef, 883, 683);
      
      -- Create body of HOCHD1RQ
      
      SET outBdyRef.RQ_SUBCOY           = COALESCE(inBusReqDataRef.nsHomMdp:SubCoy.nsHomBaseType:String3,'');
      SET outBdyRef.RQ_RISKSTATE          = COALESCE(inBusReqDataRef.nsHomMdp:RiskState.nsHomBaseType:String2,'');
      SET outBdyRef.RQ_POLICY           = COALESCE(inBusReqDataRef.nsHomMdp:Policy.nsHomBaseType:String12,'');
      SET outBdyRef.RQ_ITEMNO          = COALESCE(inBusReqDataRef.nsHomMdp:ItemNo.nsHomBaseType:String4,'');
      SET outBdyRef.RQ_RISKSEQ           = COALESCE(inBusReqDataRef.nsHomMdp:RiskSeq.nsHomBaseType:String4,'');
      SET outBdyRef.RQ_COUNTRY          = COALESCE(inBusReqDataRef.nsHomMdp:Country.nsHomBaseType:String3,'');
      SET outBdyRef.RQ_ADDRREF          = COALESCE(inBusReqDataRef.nsHomMdp:AddrRef.nsHomBaseType:String9,'');
      SET outBdyRef.RQ_EFFECTDTE          = COALESCE(inBusReqDataRef.nsHomMdp:EffectDte.nsHomBaseType:String8,'');
      SET outBdyRef.RQ_TRANSACTION       = COALESCE(inBusReqDataRef.nsHomMdp:Transaction.nsHomBaseType:String10,'');
      SET outBdyRef.RQ_CALCSI           = COALESCE(inBusReqDataRef.nsHomMdp:CalcSI.nsHomBaseType:String9,'');
      SET outBdyRef.RQ_BUILDING_SI       = COALESCE(inBusReqDataRef.nsHomMdp:Building_SI.nsHomBaseType:String9,'');
      SET outBdyRef.RQ_RECSI              = COALESCE(inBusReqDataRef.nsHomMdp:RecSI.nsHomBaseType:String1,'');
      SET outHdrRef.RQ_GNCT_SI          = COALESCE(inBusReqDataRef.nsHomMdp:Gnct_SI.nsHomBaseType:String9,'');
      
      -- # Start populating RQ_QUESTION_SET block
      SET outQtnSetCnt   =   1;
      SET outQtnSetNo   =   30; -- Max occurences of 'RQ_QUESTION_SET' array.
      WHILE (outQtnSetCnt   <=   outQtnSetNo) DO
               
         CREATE LASTCHILD OF outBdyRef AS outQtnSetRef  NAME 'RQ_QUESTION_SET';
         
            SET outQtnSetRef.RQ_QUESTIONNM      =   COALESCE(inBusReqDataRef.nsHomMdp:QuestionReferenceSet[outQtnSetCnt].nsHomMdp:QuestionNum.nsHomBaseType:String10,'');
            SET outQtnSetRef.RQ_ANSWER         =   COALESCE(inBusReqDataRef.nsHomMdp:QuestionReferenceSet[outQtnSetCnt].nsHomMdp:Answer.nsHomBaseType:String10,'');
                     
            SET outQtnSetCnt   =   outQtnSetCnt   +   1;
      END WHILE;
      --# End populating RQ_QUESTION_SET block
      
      CALL SetDistVariables(Environment, 'DefaultMDpService', 'REQ', 'HUON', NULL, NULL);
      SET inRef = NULL;
      RETURN TRUE;
   END;

   CREATE PROCEDURE CopyMessageHeaders() BEGIN
      DECLARE I INTEGER 1;
      DECLARE J INTEGER;
      SET J = CARDINALITY(InputRoot.*[]);
      WHILE I < J DO
         SET OutputRoot.*[I] = InputRoot.*[I];
         SET I = I + 1;
      END WHILE;
   END;

   CREATE PROCEDURE CopyEntireMessage() BEGIN
      SET OutputRoot = InputRoot;
   END;
END MODULE;

Back to top
View user's profile Send private message
naveeng
PostPosted: Mon Jul 10, 2017 2:44 am Post subject: Reply with quote

Novice

Joined: 10 Jan 2011
Posts: 14

it has failed with error :

An error occurred whilst serializing with DFDL /DFDL/HOCHD1RQ/RQ_HEADER/RQ_GNCT_SI'''
Back to top
View user's profile Send private message
timber
PostPosted: Mon Jul 10, 2017 3:22 am Post subject: Reply with quote

Yatiri

Joined: 25 Aug 2015
Posts: 654

Please explain what you are expecting us to do with that information.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker Supportserializing issues from soaprequest to fixed length
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.