XML string to XML document in Enterprise Server

Hello

I am fairly new to webMethods.

I have a scenario where I am receiving an XML string document, which I want to convert to a structured document. I was wondering is what would be the best way to do that.

I am aware the in Integration Server these is a service stringToRecord which does the same. I want to know a corresponding way to do it in Enterprise server.

Please advice.

Ravi

Hi,
If my understanding is correct your requirement is to convert an XML string into a structured document in Enterprise Server.For that, you have to use an XML adapter and use the ParseXML operation template.The ParseXML operation template will accept the xmlstring as input and provides the output in a structured document.

where do you get the xml string from? I assume you are receiving it either from a file, in which case you are most likely using a file io adapter, or from a database, in which case you are using a db adapter.

The easiest approach, when already using an adapter that is not the xml adapter, is to parse the data using java in a custom step. Xerces is a good free opensource java library, which you can use for this purpose. Just be sure to include the xerces.jar file in the classpath when configuring the adapter, whichever type you are using.

One detail to pay attention to, if you ever find yourself in the situation where the EI tool is running on a different machine compared to the adapter, is to configure the Preferences | Session Data | external classpath (or something like it) with the path to the xerces.jar file on the machine running EI. This is required in order for EI to successfully compile the integration component with the parsing code in it.

good luck,
Andreas