IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Basic conversion Float to String

    Posted 06/10/04 10:59 AM

    Hi,

    I have this rudimentary question. Do I need to write my own java service in order to convert Float variable in the pipeline to a String??? I would expect there is something that does that.
    But when I have a map step and I just map a Float variable into a String variable the String is empty.
    I didn’t find any transformers to do this work.

    I am on IS 6.1

    TIA


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 2.  RE: Basic conversion Float to String

    Posted 06/10/04 11:22 AM

    Hi,

    Yes I think so, even I couldnot find and hence written my own java service that converts to String. Lets wait and see for the answer in this thread.

    Regards,
    Kalyan


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: Basic conversion Float to String

    Posted 06/10/04 12:12 PM

    Hi,
    Float values are represented in String variables. No need to convert it again to String variable.
    Thanks
    Shiv


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: Basic conversion Float to String

    Posted 06/10/04 12:39 PM

    Hi Shiva,

    You statement holds good for the webMethods version 4.6 but not for 6.1

    Regards,
    Kalyan


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 5.  RE: Basic conversion Float to String

    Posted 06/10/04 02:38 PM

    Check out the WmTransformationServices Package on Advantage. It has many useful services that have already been written, including a FloatToString. It can be found under Best Practices -> Utilities and Samples.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 6.  RE: Basic conversion Float to String

    Posted 06/10/04 02:59 PM

    Tim,

    I will check out the services. However my surprise was rather the fact that the map step does not perform this automatic conversion. In fact I have already created a simple one-line java service that takes Object as input and calls toString() on that object and returns the resulting string to the pipeline. This is really easy and I am sure that WmTransformationServices package contains services like that. I was just surprised that when mapping to String value the map step is not converting the source object automatically.

    The Enterprise Server with its Enterprise Integrator was more helpful as it did the work automatically…

    Thanks.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 7.  RE: Basic conversion Float to String

    Posted 06/17/04 03:04 AM

    Can you show us that one line of java code? I’m having the same problem as well with IS6.0.1 with a number from Oracle.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: Basic conversion Float to String

    Posted 06/17/04 09:17 AM

    The java service takes an input parameter called object of type Object and returns output parameter called string of type String. The body of the service is

    IDataCursor idcPipeline = pipeline.getCursor();

    IDataUtil.put( idcPipeline, “string”, IDataUtil.getString( idcPipeline, “object” ) );

    idcPipeline.destroy();

    The service converts any Object to String, not just Float.

    HTH.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 9.  RE: Basic conversion Float to String

    Posted 05/01/05 11:42 AM

    the service will not work when u try to convert an xmlnode object
    to xml string…try for urself if u dont beleive


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods