Skip to main content

When I used  the IFS_XML_TO_JSON transformer, try to transform  unknown XML to JSON, I can’t get the simple JSON like the Document’s Sample.

Configure the REST Transport Connector (ifs.com)

but like that with a header, what should I do, Thank you!

 

Hi @peak0610 ,

Can you further elaborate the steps followed to pass the input xml and test the transformer. 

Did you invoke it from a routing address?

 

I checked the app10 latest version and got the expected output  by creating a routing address and connecting this transformer to receive the output as an email attachment .

 

I can check latest IFS Cloud 21R1 based on your inputs if you share your test steps.

 

Regards

Manoj


Hi @Manoj Ruwanhewa 

 

Thank you for your reply.

I’m sorry for an misunderstanding. I’m expecting an output JSON without a header, like Document’s Sample.

 

>>Did you invoke it from a routing address?

Yes, I invoked it from a routing address(FTP) connecting this transformer to receive the output as a FTP file. So I got the same output as your.

 

My test steps as :

step1.  Create a routing address(FTP), and set the Transformer as IFS_XML_TO_JSON

step2.  Create a rule, then set the Route From as UNKNOWN_XML, and set a Destination Address that we created in step1 

 

I want to known why the Document’s sample can get an output JSON without a header?

Configure the REST Transport Connector (ifs.com)

 

Thank you

Best Regards

 


Hi @peak0610 ,

 

I tried with below input with another subheader

 

 

 

Got the output json as below 

 

So this is the behaviour in the latest xml to jason transformer.

I hope the documentation should be updated to the latest scenario of the output.

Otherwise you have to customize the transformer and create a new one to remove to the headers.

Or we can write a new xsl transformer 

 

Regards

Manoj


Hi @Manoj Ruwanhewa 

 

Thank you for your reply.

There is another way to output an output without a header.

 

 

Thank you

Best Regards


Have you tried to use the transformer when you have more complex types, e.g. a header and lines like an order header and order lines? I’ve tried that in a Cloud R2 and no matter how I’ve tried to send in the xml it won’t work - is this transformer unable to handle only simple types?