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.

 View Only
Expand all | Collapse all

Convert Int to String

  • 1.  Convert Int to String

    Posted Thu April 10, 2003 05:24 PM

    I have a int specificed as in input of a service to call a stored procedure. I need to convert that Int to a string for processing it after the stored Procedure. How do I convert that Int to a string?


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


  • 2.  RE: Convert Int to String

    Posted Thu April 10, 2003 05:29 PM

    String.valueOf(int)
    webMethods does the type casting automatically for most datatypes.
    Anyways, hope this helps.


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


  • 3.  RE: Convert Int to String

    Posted Thu April 10, 2003 06:16 PM

    For a reference:
    String to byte – Byte.parseByte(string)
    String to short – Short.parseShort(string)
    String to int – Integer.parseInt(string)
    String to long – Long.parseLong(string)
    String to float – Float.parseFloat(string)
    String to double – Double.parseDouble(string)

    Or read the following Java Tek Tip:
    [url=“http://developer.java.sun.com/developer/JDCTechTips/2002/tt0723.html”]http://developer.java.sun.com/developer/JDCTechTips/2002/tt0723.html[/url]#tip1


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


  • 4.  RE: Convert Int to String

    Posted Thu April 10, 2003 06:20 PM


  • 5.  RE: Convert Int to String

    Posted Thu April 10, 2003 06:36 PM

    So there isn’t a “Standard” webMethods service?


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


  • 6.  RE: Convert Int to String

    Posted Thu April 10, 2003 06:43 PM


  • 7.  RE: Convert Int to String

    Posted Thu April 10, 2003 06:50 PM

    You can use pub.string.makeString as referenced in B2BBuiltInServicesGuide.pdf HTH


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


  • 8.  RE: Convert Int to String

    Posted Thu April 10, 2003 07:11 PM

    Hi Billy - I’m assuming you’re calling the stored proc from a flow service. I believe webMethods handles this for you. The input value you pass to your stored procedure will be a String in the pipeline that you map into the ‘call’ service. You shouldn’t need to convert it to a String - since it already is one.

    Using a transformer has no relevance to your problem and the makeString concatenates an array of strings into one string (again no relevance to your problem).

    Will


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


  • 9.  RE: Convert Int to String

    Posted Thu April 10, 2003 07:33 PM

    Will you are right when I use the JDBC adapter it is required that I use int if the stored procedure uses int as the input, but pub.db:call it doesn’t matter if it is an int or a string. Since pub.db:call works better than the JDBC adapter for this particular stored procedure conversion is not revelent.


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