cancel
Showing results for 
Search instead for 
Did you mean: 

SCPI - Convert XML to Plain Text error

Mirko_Longhi
Explorer
0 Kudos

Hello everyone,

I got a problem with my SCPI project, i have to convert an XML to a plain text and set the result text in a property.

I follow various tutorial and in particular this:

> https://blogs.sap.com/2018/09/04/formatconversionbean-arrives-in-cpi/

> https://blogs.sap.com/2015/03/06/deepfccbean-the-better-fcc-at-meeting-your-deep-structure-needs-par...

In the tutorial i have to insert a content modifier and inside "converter class" with value "com.equalize.converter.core.XML2DeepPlainConverter", but if i test it requires this mandatory parameters: recordsetStructure and defaultFieldSeparator

If i fill the mandatory parameters with test value it gives me this error:

> com.equalize.converter.core.util.ConverterException: Record Type TransactionDetail not listed in parameter 'recordsetStructure'

How i can solve it? I try to search but for now i didn't find correct value for recordsetStructure and defaultFieldSeparator

Thanks a lot a regards,

Mirko

MortenWittrock
Active Contributor

Hi Mirko

Could you show examples of what you are converting from and to, respectively? That would make it easier to suggest solutions.

Regards,

Morten

Accepted Solutions (0)

Answers (1)

Answers (1)

Mirko_Longhi
Explorer
0 Kudos

I have first a REST call, then a SOAP call and at the end a js script in order to format the json output, following certain rules. I need to merge some data from the REST call with the SOAP response, this will a json attribute, with the structure shown below.

"output":{ "reportXML": HereSOAPResponse }

When I merge them in the js script at the end i get this error. Error Details com.sun.phobos.script.util.ExtendedScriptException: org.mozilla.javascript.EvaluatorException: Java class "[Ljava.lang.reflect.Constructor;" has no public instance field or method named "toJSON". (//src/main/resources/script/script18.js#20) in //src/main/resources/script/script18.js at line number 20, cause: org.mozilla.javascript.EvaluatorException: Java class "[Ljava.lang.reflect.Constructor;" has no public instance field or method named "toJSON". (//src/main/resources/script/script18.js#20)

The js script generates a js fed with the two responses, t the end I set the body with

message.setBody(JSON.stringify(body));