cancel
Showing results for 
Search instead for 
Did you mean: 

Convert XMl String to ModuleData in Adaptor Module?

Former Member
0 Kudos

Hi @,

I need to convert a String which is in XML format into the moduledata that is returned from the custom adaptor module.

I know it is to be first converted to Message then pass it to setPrincipalData but how to convert XML String to message i dont know.

please help in this conversion .

Thanks in advance.

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In order to fill the message object you will first have to create payload. fill the payload.this payload will have your string which is in xml format.

XMLPayload xp = response.createXMLPayload();

// response is of type Message

xp.setText(xml string); //set your string here.

xp.setName("MainDocument");

xp.setDescription("My xml payload");

xp.setContentType("application/xml");

response.setDocument(xp);

regards

fariha.

>>reward if useful

Answers (0)