IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Customized Response

    Posted 08/20/09 12:58 AM

    Originally posted by: SystemAdmin


    Hi,

    I want to construct the customized response from WCC. The response xml should be looks like below.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE TCRMService SYSTEM "tCRMResponse.dtd">
    <TCRMService>
    <ResponseControl>
    <ResultCode>SUCCESS</ResultCode>
    <ServiceTime>27719</ServiceTime>
    <DWLControl>
    <requesterLanguage>100</requesterLanguage>
    <requesterLocale>en</requesterLocale>
    <requesterName>sstg</requesterName>
    <requestID>100185</requestID>
    <userRole>grole</userRole>
    </DWLControl>
    </ResponseControl>
    <TxResponse>
    <RequestType>fifthThirdGetCustProfile</RequestType>
    <TxResult>
    <ResultCode>SUCCESS</ResultCode>
    </TxResult>
    <ResponseObject>
    <AcctId>123451</AcctId>
    <AcctId>123452</AcctId>
    <AcctId>123453</AcctId>
    <TCRMContractBObj>
    ....................
    ......................
    </TCRMContractBObj>
    </ResponseObject>
    </TxResponse>
    </TCRMService>

    Please help me to achive this.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 2.  Re: Customized Response

    Posted 08/20/09 08:25 AM

    Originally posted by: SystemAdmin


    I'm acronym challenged sometimes so I'm not sure what WCC means, but I'm assuming that you're using some version of a Mercator or WTX map since you're on the WTX forum.

    I've also had to provide this same type of formatted XML to customers on some earlier Oracle platforms. As a general practice I run what I call a "stub" map that has a text blob as its input(s) and a text blob as its output. My "text blob" is just a character text data item of unlimited size.

    The main rule in the "stub" map is a RUN command that runs the original "executable" map that has all of my transformation rules. Since the output from the "executable" map is treated as a text blob by my "stub" map I can do additional formatting on the result of the RUN command, as needed.

    In your case, I'm assuming that you want to insert a CR-LF sequence between each occurrence of the "><"stub" map.

    =SUBSTITUTE(
    RUN("YourExecutableMapName", "YourExecutableMapParameters"),
    "><",
    ">" + SYMBOL(13) + SYMBOL(10) + "<"
    )

    If your original input format was this:
    <Root><Element1>Data</Element1><Element2>Data</Element2></Root>

    then the result from the "stub" map rule above would be:
    <Root>
    <Element1>Data</Element1>
    <Element2>Data</Element2>
    </Root>
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: Customized Response

    Posted 08/20/09 11:04 AM

    Originally posted by: TarunB


    I would suggest 2 things:-

    1) Use (or obtain) the DTD specified in the DOCTYPE tag in your example below to auto-generate a type tree.
    2) Go on a TX training course.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender