I am very familiar with Java and webMethods and I find that it is easy to use either option. For IS Java Service, I wrote some ant scripts that automatically synchronizes Eclipse projects with webMethods jars directory and java sources for java flows (fragging/compiling). Usually I use Developer to create the IS java service; Eclipse is instructed to automatically pick up new java files (using a Linked Source Directory) and from there on Eclipse is used to write the rest of code, of course you have to pay attention to not screw the formatting. Also, I could debug using Remote Debugging starting the flow from Developer (IS has to be started with some extra flags) and then pass the control to Eclipse Debugger where you can go step by step.
One way to design Java Services, is to write Java modules that are not dependent on Wm jars and use Java Services just to wrap those modules. This way you can test w/o depending on webMethods using well defined tools like JUnit/JMock/DynaMock etc. Also you can keep under SCM (Source Control Management) your java code.
Is IS Java Service more error prone than IS Flow Service? No if you are doing the right things (aka proper Unit Testing); it may depend if you are more familiar with one or other.
One issue I have with Flow Services, is hard to merge two different versions and SCM is a nightmare specially when you have many different versions in Production and you have to support all of them, branches etc.
Saying this, I rarely choose to use Java Services for Production packages; mostly for design time to generate automatically IS Doc Type, Flow Services for mappings etc. If this gives me troubles, all I have to do is change the “generator” to create Java Services instead of Flow Services but I never had yet this problem.
You don’t know how much I would like to have this option, I am trying to push for a variant to allow at least just one line as free text instead of 4 with <delimiter/> between; in this case *body should be enough.
mixedModel – true will give you *body, if is false you won’t get value into *body. Not what I am looking for.
Regarding XQL options, there is no much you can do, basically //address/text() will give you directly what *body gives to you, the concatenated value of all text nodes. If you try to use source(), you have to have xmlNode not IS Document. And then you have somehow to use Java DOM parser/custom parser to extract text nodes. This solution is too complicated as the address type is used in many places into incoming document.
One ugly solution (for this ugly requirement) that I found is use string.replace() upon XML content before initial parsing and replace <delimiter with ${del}<delimiter . After parsing I will get into *body something like “1202 Jane St ${del}Apt #1012 ${del}Buzzer #7762". When I am mapping to CanonicalDoc I can apply a tokenize for *body using ${del} as delimiter and I will get my separate lines. When I map back from CanonicalDoc I have to do the reverse, put in the *body “1202 Jane St ${del}Apt #1012 ${del}Buzzer #7762" and after transforming IS Document to string, replace ${del} with . Don’t like it, but is the only solution that works so far.
I will put a service request for WM, but I am not sure if they will have a solution any time soon!
#Flow-and-Java-services#Integration-Server-and-ESB#webMethods