webMethods

webMethods

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

How to convert string to object

  • 1.  How to convert string to object

    Posted Wed December 22, 2004 04:24 PM

    hi
    i am new to webMethods, how to convert string to object
    problem is date is in string format and input field for adapter service is object we are using oracleapps adapter.u guys have any java code ??

    thanks
    sagi


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


  • 2.  RE: How to convert string to object

    Posted Wed December 22, 2004 04:40 PM

    You can download “WmTransformation Services Package” from the Advantage site, which would be useful for all such kind of Transformations. Also otherwise look into the WmPubic Package for such kind of utilties.


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


  • 3.  RE: How to convert string to object

    Posted Wed December 22, 2004 06:38 PM

    There are two different ways to do it:

    1. In the Adapter service accept the date as string and use to_date function like this to_date(‘dd/mm/yyyy’., ?)

    You might want to do this.

    1. Use the wmpubic datebuild service. PSUtilities has some date services.

    the java code is simple:

    Create a SimpleDateformat object with the format of the date.
    SimpleDateFormat df = new SimpleDateFormat (“yyyy-MM-dd”)
    Date d= df.parse(inputDate);
    this should return you a date.


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