Skip to main content

Hi,

I need to send a json string with an application message.

I’m on IFS9 so I can’t use a REST destinationtype, so I’m using Http.

Is there any way I can send a json string instead of an XML ? Its just one line.

Please correct me if I’m wrong, but I don’t think I can create a transformer to do this without access to IFS Developer studio, and I don’t have that. Also I’m unsure if transformers will do json.

Can I create an application message with a json using pl/sql code?

 

 

Best regards

Kresten

krestensb,

I've checked IFS10 and it contains the following transformer:

Please find attached xmltojson.tar

See if you can create a transformer with it and try to use that. Once saved give it the extension .jar as a jar is not allowed for an attachment.

Steve


Thanks for your answer.

I’m affraid this is over my head. I need to design the output in details in order to get the reciever to accept the message, and I can’t make any changes to this .jar.

So I’m affraid I cant use it.


But the jar is to transform an xml to json. So any form of xml can be used as input.

However, I can't help you with the inner function of the jar, so I'm also not aware of what it actually is doing.

I checked the options to make changes to the jar and found the following: how-can-i-edit-a-jar-file

Gives me a fair bit of shivers if I read the steps:stuck_out_tongue_winking_eye: .


Hi @eqbstal,

It’s a nice hack you have done :sunglasses:

If it does’t work, you can always go for a xsl transformer where you don’t need developer studio.

This transformer in stackoverflow worked for me in App9. 

https://stackoverflow.com/questions/24122921/xsl-to-convert-xml-to-json

 

Duplicate any xsl transformer and create a new one

attached is the xsl copied from above thread, nothing else ;)

 

 

Then in the routing address add the transformer.

Here I used the file out but HTTP should work.

Give a try and let me know the feedback.

Cheers!


DSJ,

Thanks for the additional information. I might need that information later on (somewhere in my working life :nerd: )


Thanks for taking some of the magic out of this process!

I was not aware that the .xls file is just a XLST script to format XML into somthing else.

w3schools.com has a tutorial, and I’ll go home and read it and see where that brings me. It don’t seem to complicated.

https://www.w3schools.com/xml/xsl_intro.asp

I don’t think there will a need for any java code.

 


Thanks for taking some of the magic out of this process!

I was not aware that the .xls file is just a XLST script to format XML into somthing else.

w3schools.com has a tutorial, and I’ll go home and read it and see where that brings me. It don’t seem to complicated.

https://www.w3schools.com/xml/xsl_intro.asp

I don’t think there will a need for any java code.

 

 

Yeah, it’s not hard at all to play with xslt transformer. 

For the record, java transformer ‘really’ don’t need the developer studio also. I’ll try to find an example and post it soon


I’ll be looking forward to that!


Reply