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.  WTX XML_ELEMENT Query

    Posted 10/09/07 01:53 PM

    Originally posted by: SystemAdmin


    Hi,
    Can any one please tell how to add the type information in XML_ELEMENT.
    I have a element in the XML
    eg:-
    <testelement>{Info}</testelement>
    I have the type tree for {Info} (which works fine if the input is non-xml.
    But I dont know how to use it in the xml_element,so that I can retrive the information from the element.

    Many thanks in advance

    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 2.  Re: WTX XML_ELEMENT Query

    Posted 10/10/07 05:23 AM

    Originally posted by: TarunB


    Correct me if I misunderstand here, but it appears that you are receiving structured data (SWIFT?) within an XML wrapper. And what you are looking to do is remove the wrapper and read the structured content field by field. You say you have the type tree for the structured data.

    Assuming you receive the XML with the structured data within it, I would be tempted to RUN another map and send across the structured data only. The map that you RUN will have the type tree for this structured data as the main input. You could also send across any other required data to the map that is RUN.

    This way, your structured data will be validated and you will have all elements available to you for processing as you wish.

    Hope that helps.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 3.  Re: WTX XML_ELEMENT Query

    Posted 10/10/07 05:26 AM

    Originally posted by: janhess


    That's the best way to do it. We used a router map which read in the xml using a blob of data for the body and sent it off to the relevant map depending on the message type specified in the xml.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 4.  Re: WTX XML_ELEMENT Query

    Posted 10/10/07 06:24 AM

    Originally posted by: SystemAdmin


    Many thanks for the info,
    The problem I have is that I will be receiving the XML request over MQ
    .
    The scenario is:-
    1.XmL Request received over MQ let the request have MQ Msg id as 12345.
    Example:-
    <Request>
    <someheaders>
    <ref>userref</ref>
    <name>userref</name>
    </someheaders>

    <Payload>amount=20,destination=euro,fee=100</Payload>
    </Request>

    2. I need to translate this to:-
    <StrucutredRequest>
    <someheaders>
    <ref>userref</ref>
    <name>userref</name>
    </someheaders>

    <frompayload>
    <amount>20</amount>
    <destination>20</destination>
    <fee>100</fee>
    </frompayload>

    <Payload>amount=20,destination=euro,fee=100</Payload>
    </StrucutredRequest>

    This structured request needs to have the correlation id as 12345.

    I am not sure about the router as i think if we use router map then i will have to route the request to the another MQ and dont know how to manage the MQ Message id and correlation id mapping thing.


    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 5.  Re: WTX XML_ELEMENT Query

    Posted 10/10/07 06:37 AM

    Originally posted by: janhess


    When you send the payload data to the second map it is done using the RUN function. MQ isn't involved.
    The second map has the input card with the definition of the payload and you can have an output card with the structure of the xml to produce from the payload.
    In the calling map echo out the output card from map 2. have a second output card with the structure of the new xml excluding
    <frompayload> and <Payload>

    have a data blob that you can package the output from map 2 plus the start and end tags round the payload.

    The MQ message ID comes from the header of the input MQ message which you get from a command option to the MQ adapter I believe.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 6.  Re: WTX XML_ELEMENT Query

    Posted 10/10/07 07:30 AM

    Originally posted by: TarunB


    At the risk of repeating Janhess :) - if your map is triggered by MQ, use the -HDR command on the adapter command line. Use the standard MQ header type tree (supplied in the TX installation example MQ folder) as a header on top of your XML structure. This will allow you to obtain the CorrID, MsgId etc. as part of your input data.

    Then you can RUN the 2nd map and pass down the structured data, perform the mapping, and either ECHO the data back and output as MQ with same CorrelationID (use -CID in your output card command line) or just output it from the RUN map.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender