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.  how to call java class and get the return value

    Posted 05/18/12 04:10 AM

    Originally posted by: johnxp


    I want to pass a string to a java class and do some formating in the java class and return the new string to WTX. How to do this sample thing in WTX?

    I tried the example javaclas, it didn't work.
    getting error as below:

    <3144-2652>: Trace started
    <3144-2652>: Trace file | SubClass.log
    <3144-2652>: Trace append | false
    <3144-2652>: Trace error | false
    <3144-2652>: Serialize | false
    <3144-2652>: Deserialize | false
    <3144-1280>: connect
    <3144-1280>: connect (rc = 0) OK
    <3144-1280>: onNotify
    <3144-1280>: | OnNotify called for PUTSTART
    <3144-1280>: onNotify (rc = 0) OK
    <3144-1280>: put
    <3144-1280>: | performClassOperation
    <3144-1280>: | | Size of input buffer: 262
    <3144-1280>: | | Class name : SubClass
    <3144-1280>: | | Include inherited members : no
    <3144-1280>: | | Return public fields : no
    <3144-1280>: | | Reference to the top level object : id1
    <3144-1280>: | | Instantiating root object
    <3144-1280>: | | instantiateObjectFromConstructorNode
    <3144-1280>: | | instantiateObjectFromConstructorNode (rc = -2) *** ERROR ***
    <3144-1280>: | performClassOperation (rc = 0) OK
    <3144-1280>: put (rc = 0) OK
    <3144-1280>: onNotify
    <3144-1280>: | OnNotify called for PUTSTOP
    <3144-1280>: onNotify (rc = 0) OK
    <3144-2652>: onNotify
    <3144-2652>: | OnNotify called for PREPARE_DESTROY
    <3144-2652>: onNotify (rc = 0) OK
    <3144-1280>: disconnect
    <3144-1280>: | Closing trace file and exiting function
    <3144-1280>: disconnect (rc = 0) OK
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: how to call java class and get the return value

    Posted 07/16/12 01:02 AM

    Originally posted by: Vikrant264


    Create a jar of ur java project, deploy it anywhere, add path of ur jar in the file dtx.ini in WTX installation directory.
    Call you java function like mentioned below
    JEXIT ("<fully qualified class path>" , "<function name>" , <Argument>)
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 3.  Re: how to call java class and get the return value

    Posted 07/18/12 09:53 AM

    Originally posted by: SystemAdmin


    You do not even net a .jar file, .class files work too. You only need to add the folder containing the files to dtx.ini.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender