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
  • 1.  dateTimeFormat

    Posted Thu March 12, 2009 10:56 PM

    Hi All,

    I’m using pub.date:dateTimeFormat service and when the inString is empty its going to exception, is there a way to over come this problem other than writing Java service.

    All I need to do is to change the currentPattern to newPattern and sometimes its possible to get empty inString.

    System details:
    IS - 6.5
    Java - 1.4.2

    Please let me know your ideas and please let me know if you need more info. Thanks.


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


  • 2.  RE: dateTimeFormat

    Posted Thu March 12, 2009 11:09 PM

    What would you like to have happen? Return an empty string? Return the current date/time in the newPattern format?

    There are a couple of ways:

    • Where you make calls to dateTimeFormat, test that the inString value you will pass is not null nor empty.

    • Write your own wrapper service in FLOW. Accept the same parameters as dataTimeFormat and do the test there (or any other logic that would make the service “safe” to call in all situations). Then where you would call dateTimeFormat in your other services, call your own service instead. Wrapper services like this are pretty common–and usually placed in package named *Public. Like WmPublic except replace Wm with your company name/abbreviation.

    Hope this helps.


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


  • 3.  RE: dateTimeFormat

    Posted Fri March 13, 2009 08:08 PM

    Thank you for your quick response. It helped me.


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