what is the best way to perform data type unmarshalling in webmethods flow service

Community members - can anybody suggest me the best possible way data type unmarshalling can be performed in webMethods service.

I have a situation where I receive an xml document which conforms to certain schema that has elements with various content type/data type ( string , double , date , char). However , when they appear in pipeline they appear as string.

My requirement is to map these fields to a canonical ( which is common to many ) which has fields with various java wrapper type ( string , double, date , char etc). When am performing a plain field-by-field mapping the resulting document shows all fields as string and fails in publishing to broker.

I can do a string to double transformation while mapping but thats way too tedious process as we have huge number of such cases. Can anybody suggest me ?

I know this post is a bit old, but in case someone else needs the info…

A couple of options:

  • Define the Broker document type without the type-specific wrappers. Keep fields as strings unless there is a specific need to convert to another data type. Converting back and forth between strings and other data types within middleware is usually unnecessary.

  • If one needs data represented in a specific type, then the one option is to transform each field as needed.

  • Create a generic service that accepts a document and a doc type, where the doc type specifies the data type of each field. Then transform each field as needed according to the doc type. The challenge here will be in getting the type definition of each field as I’m not certain there is an existing FLOW service nor Java API that will provide that metadata.