It has been a long time for not blogging. Today, I am exploring webmethods stuff. it is about reading a file to xml. I want to give a bit comment on webmethods documentation. You guys, are suck. The documentation is definitely suck. Even more, the way they named the flow service. The reason why do i tell you, it is suck:
- You just give the explanation with less example. Of course for me as beginner, will be having a lot of damn trouble.
- The flow service's name is sometime a bit difficult to interpret. if you want to have people understand on some methods, you need to have a very representative method's name of its function.
- There are no official, detail and complete documentation so that people can learn your product easily.
Huh, after sometimes struggling to find out on how to read a file from file system (previously, I have sent a file through ftp and get the file from ftp using webmethods), now I will blog my experience. In order to read a file, webmethods has it's own way to treat each format file. it has a way to process an xml file but I am not sure on how to read another file type. To read an xml file, is pretty much simple. First, you need a flow service named getFile. Set the load type as Bytes. The output of this flow service can be an input for another xml flow service which is xmlStringToXMLNode.
That's it, until this state, you get the xml to be loaded as a note but you cannot read it as it is an object. In order to read a node, either you read it as String or you read it as document. In my experiment, I was using xmlNodeToDocument. Yeah!!!1, that's all. You can load, read and process after the output of this flow service comes out.