tags:

views:

43

answers:

1

We have a java based enterprise web application. User enter / edit data using web forms and that data usually goes to the database.

Some user data is gathered just to send it through a web service. So the process is

  1. enter data (which is turned into a xml document)
  2. optionally edit data (which modifies above xml document)
  3. send it to a 3rd party web service

I wonder if there is a clever way to accomplish the tasks of converting the form data into xml (step 1) and especially from xml to web form and back (step 2). Some data in the xml is static (not editable) and data may be in both attributes and elements.

Any ideas?

+1  A: 

If you have just one XML schema to deal with, and it's reasonably simple, you could create a plain old HTML form-based webapp and map between the form and the XML manually.

For anything remotely complicated, or for more than one or two schemas, I would definitely consider XForms.

We used Orbeon's implementation a few years ago at my last job, ran it on Tomcat, and it worked quite well. We had a fairly complicated form, partially pre-filled from existing data, that was filled out many times a day by front-line health care workers. At the end of the day, all the XML files would be batch processed as needed.

Orbeon completely manages the transformation from screen data to the XML, and gives you quite a range of options. I always liked this demo: http://www.orbeon.com/orbeon/xforms-government/detail/DMV-14/, if only for the interactive license-plate creator. :-)

In your case, you could probably use a "pipeline" to do the web services call for you.

Rodney Gitzel