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.  SavePipelineToFile fails for type object

    Posted Sat April 09, 2005 01:47 AM

    I have a service I am using for testing purposes. It creates a connection to an AS400, saves the pipeline to a file, then closes the connection. I can see the AS400 connection object in the pipeline, but it doesn’t get saved to the file with savePipelineToFile. The object is of type com.ibm.as400.access.AS400 and it implements the Serializable interface.

    Why won’t this AS400 object, that is clearly in the pipeline, persist to the file?


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


  • 2.  RE: SavePipelineToFile fails for type object

    Posted Sat April 09, 2005 02:14 AM

    objects(bytes and streams) cannot be saved from the pipeline.with .using savePipelineToFile service.You have to convert to string and save the file to disk.

    HTH,
    RMG.


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


  • 3.  RE: SavePipelineToFile fails for type object

    Posted Mon April 11, 2005 05:19 AM

    There is a Java class com.wm.util.coder.IDataBinCoder, which will do everything the XML coder of savePipelineToFile, but serializes to a binary format and supports Java Serializable as a one of the types of object encoded.

    Objects like Java Streams still can’t roundtrip, but most interesting objects do. One tricky thing is the classloading of the objects during decode time. It should be described in the API JavaDoc, but here are the interesting methods:

    public IDataBinCoder()
    public IDataBinCoder( ClassLoader thePriorityClassLoader )
    public void encode(OutputStream os, IData data)
    throws IOException, InvalidDatatypeException
    public IData decode(InputStream is)
    throws IOException, InvalidDatatypeException

    See also com.wm.util.code.IDataCoder for some helper methods for dealing with files and byte:
    public IData readFromFile(File f)
    throws IOException
    public void writeToFile(File f, IData pipeline)
    throws IOException

    It isn’t too tough to make you own savePipelineToFile.

    HTH,
    Fred


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


  • 4.  RE: SavePipelineToFile fails for type object

    Posted Mon April 11, 2005 03:10 PM

    “It isn’t too tough to make you own savePipelineToFile.”

    Sounds like a good exercise for someone to tackle and post. Any takers?


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