Join wMUsers | Blog at wMUsers | Edit my wMUsers Profile | Site Map | Invite your peers | webMethods Jobs | For Employers

webMethods Ezine: Complex Record Mapping using Java

wMUsers Discussion Forums » Integration Server & Trading Networks » Flow and Java services » Archive through April 29, 2003 » webMethods Ezine: Complex Record Mapping using Java

Author Message
Dan Green

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, March 12, 2003 - 02:11 pm:   Print Post

Questions or comments about this webMethods Ezine article?

Click here to read the original text.
Will Kriski

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, March 12, 2003 - 02:19 pm:   Print Post

Good article. I prefer to use the IDataUtil class for
parsing the IData object since you can retrieve the desired
value in one line rather than two. I have also gotten into
trouble using 'first' when trying to reset an existing
pipeline variable.

So we can replace the following two lines:

idcItem.first("Price");
String price = (String)idcItem.getValue();

with:

String price = IDataUtil.getString(idcItem,"Price");

There are other API calls for getting IData records, arrays,
etc.

Will
Fred

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, March 12, 2003 - 02:19 pm:   Print Post

Good suggestion.

The cursor position after a first returned false was not
defined in the initial release of IData (I believe this was
IS 3.5). So code like:

idcItem.first("Price");
String price = (String)idcItem.getValue();

could return unexpected results if first returns false and
the cursor was positioned off the end of the data set or if
it was left were it was before the first call.

String price = null;
if (idcItem.first("Price"))
price = (String)idcItem.getValue();

force the behavior that most people expect. IDataUtil.get
provides this behavior in one line.
Carl

Rating: N/A
Votes: 0 (
Vote!)

Posted on Wednesday, March 12, 2003 - 02:19 pm:   Print Post

Great Suggestions! Thanks!

 

 

Add Your Message Here
Post:
Username: wMUsers Members: Use your username/password to increase your "Total Posts" ranking and link your profile.

Non-members: Use your full name as a username.
Password:
Email:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:


Advertise at wMUsers

Check out our Frappr!




© All Rights Reserved, 2001-2005.

Script Execution Error

Your discus.conf file could not be opened.
Error:  Open discus.conf: No such file or directory
Script: dummy.cgi
OS:     linux
Perl:   5.008008
Descr:  No such file or directory
Discus: 4.0

Read documentation in the Support Center
Also try your Program Diagnostics