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.  Write DocType content to a file

    Posted 05/10/05 03:36 PM

    Hi,
    I have a simple question : is there a flow service that can create/write a file (in a directory) from a Document Type…I didn’t find anything in the “Built-in_Services” Doc, but I’d like to be sure before writing a Java Service (and using java.io package).
    Thanks, Charles de Saint Andre.


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


  • 2.  RE: Write DocType content to a file

    Posted 05/10/05 03:58 PM

    The convertToString services (wm.b2b.edi:convertToString and pub.flatFile:convertToString) allow you to name a flat file schema and an output file name. This will convert an IS document type to a string and save it to a file. If you’d rather go the Java route, there’s an example in the Samples package (sample.IO.test:writeToFile).

    Tim


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


  • 3.  RE: Write DocType content to a file

    Posted 05/10/05 09:47 PM

    De,

    If it is a xml documenttype then make use of DocumentToXMLString and later as Tim mentioned use the sample.IO.test:writeToFile (service located in the WmSamples package).

    HTH,
    RMG


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


  • 4.  RE: Write DocType content to a file

    Posted 05/11/05 11:57 AM

    OK, thanks to both of you !

    But, when I’m using the convertToString service, the output string remains empty…does anyone experiment this kind of problem and know how to fix it ?

    The flat file structure to create is simple : a record is composed of seven fields delimited by ; and a new record is identified by a “newline”. I tried other values to fix the problem : “carriage return”, “carriage return line field”.

    I have created a dictionnary (one record definition and seven fields definition), then the FF shema, created by setting dictionnary reference…


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


  • 5.  RE: Write DocType content to a file

    Posted 05/11/05 03:14 PM

    De,

    Are you seeing any parsing errors using convertToString?Try to test the FFSchema in the FlatFile panel itself and so that you will find the bug.Also make sure the RecordDefinition with respect to the flatfile is recognizing.

    HTH,
    RMG


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


  • 6.  RE: Write DocType content to a file

    Posted 05/12/05 10:35 AM

    Oups…I mean, there is a space before each line.


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