how to write a java service to read a file and create a wM doc from the file

I have a file with two columns. Say it contains the following two rows excluding the header,

Name Comments

firstName first name of the client
lastName last name of the client

What I need to do is to create a webmethods document which contains two fields “firstName” and “lastName” and the comments value need to go to the field’s “comments” property. How to write a java service to do this? The real file contains more than a thousand rows.

Thanks!
LY

what you mean by comments property. is it the one which appears in comment of property window?

yes

I have few questions for you. What is the need of populating the comments property via coding? This requirement looks to me little strange and also very curious to know.

It’s normal that we need to put comments for each field as the field has specific definition. In fact the file has about a thousand of rows. So it is a huge wM doc. I just wonder if there is a java service that can automate it.

Yes… There should be a Java API for updating the comments property programmatically but unfortunately I cannot comment on this thread anymore. There might be someone who could help you.

I can suggest you to contact sag support if they could get you some answers from sag rnd team. If you feel this is a nice feature to have, you may also submit a feature request via sag empower brainstorm.

Post me if you find a solution… Good luck…

Hi Ly,

can you share a larger piece of the file (just to get a clearer picture of your requirement)?

What type of data is stored in these fields? Stirng, Boolean, Integer, Base64, …?

Looks for me like you are looking for a transformation from your current File-Format to XSD-File and then use the XSD to create the Document in IS/Designer.

If your requirement is different from that, please try to explain a bit more in detail.

Regards,
Holger

What you said looks like a proper solution. Generally it is roughly what my requirement is like. Can you give some detail of the two steps regarding XSD?

Thanks
LY