Solved

IFS SOAP Gateway with JSON format - how to set Application Message Header attributes

  • 17 December 2023
  • 5 replies
  • 187 views

Badge +2

Hi,

I am trying to use the IFS SOAP Gateway with JSON format in IFS Cloud 23R1, however I am struggling to set the Application Message Header attributes correctly.

 

Using XML format I am able to send the Header values (Sender/Receiver/Type/Function) as part of the Header in the SOAP_IFS envelope:

 

Using JSON format it does not matter what I send the application message in IFS is created without the Header attributes

The above JSON is pure guess as I don`t know how IFS expect the Header attributes to be sent. I tried a few variations including purely converting the prior XML to JSON but had no luck. Unfortunately, the IFS Docs does not have an example for JSON format, it only has it for XML.

SOAP Gateway - Technical Documentation For IFS Cloud

Understanding SOAP_IFS - Technical Documentation For IFS Cloud

Also Rest API calls with JSON is not an option in this specific scenario as I want to use IFS Connect to queue/route the messages.

 

So question is: How these Header attributes can be set when the IFS SOAP Gateway with JSON format is used?

 

 

Regards,

 

icon

Best answer by dsj 18 December 2023, 10:32

View original

5 replies

Userlevel 5
Badge +14

@stedile.jefferson This is a nice topic. If you find a solution. Please share with us.

Userlevel 7
Badge +20

Hi @stedile.jefferson , @hhy38 

 

My quick thought around this is that you won’t be able to use the IFS_SOAP header parameters to as routing conditions for JSON messages.

However, you can create routing rule of type NONE_XML and use Content Based Conditions to route the message to the destination

 

Note that only exists condition supports for JSON at the moment. Therefore you need to create a routing rule based on the values for header attributes.

 

Ex:

 

You’ll also need to develop a transformer to convert extract the Body and transform into the format required by the Projection action.

 

I’ve created n idea to include JSON xpath support for routing rules. Please upvote it :)

JSON support in Routing rules | IFS Community

 

Hope it helps!

Damith

Userlevel 5
Badge +14

@dsj Damith thank you. I voted. :)

Badge +2

Hi @stedile.jefferson , @hhy38 

 

My quick thought around this is that you won’t be able to use the IFS_SOAP header parameters to as routing conditions for JSON messages.

However, you can create routing rule of type NONE_XML and use Content Based Conditions to route the message to the destination

 

Note that only exists condition supports for JSON at the moment. Therefore you need to create a routing rule based on the values for header attributes.

 

Ex:

 

You’ll also need to develop a transformer to convert extract the Body and transform into the format required by the Projection action.

 

I’ve created n idea to include JSON xpath support for routing rules. Please upvote it :)

JSON support in Routing rules | IFS Community

 

Hope it helps!

Damith

 

Thanks Damith!

I will consider the option to handle the routing using content based conditions as you suggested.

Technically it does the job however I am afraid that it will become very hard to track messages. All messages will look like the same in Application Messages screen, being the only difference the content. We will have multiple integrations using this mechanism (and tons of messages) and the idea was to set different combinations of Type/Function/Sender/Receiver to be able to identify them.

So thank you very much for creating the idea to improve the JSON support. Unfortunately I can`t vote  in it (I don`t have access to it) but I encourage others that have the same problem to vote as this improvement would be greatly appreciated.

 

 

Userlevel 7
Badge +20

Hi @stedile.jefferson , @hhy38 

 

My quick thought around this is that you won’t be able to use the IFS_SOAP header parameters to as routing conditions for JSON messages.

However, you can create routing rule of type NONE_XML and use Content Based Conditions to route the message to the destination

 

Note that only exists condition supports for JSON at the moment. Therefore you need to create a routing rule based on the values for header attributes.

 

Ex:

 

You’ll also need to develop a transformer to convert extract the Body and transform into the format required by the Projection action.

 

I’ve created n idea to include JSON xpath support for routing rules. Please upvote it :)

JSON support in Routing rules | IFS Community

 

Hope it helps!

Damith

 

Thanks Damith!

I will consider the option to handle the routing using content based conditions as you suggested.

Technically it does the job however I am afraid that it will become very hard to track messages. All messages will look like the same in Application Messages screen, being the only difference the content. We will have multiple integrations using this mechanism (and tons of messages) and the idea was to set different combinations of Type/Function/Sender/Receiver to be able to identify them.

So thank you very much for creating the idea to improve the JSON support. Unfortunately I can`t vote  in it (I don`t have access to it) but I encourage others that have the same problem to vote as this improvement would be greatly appreciated.

 

 

 

Hi @stedile.jefferson 

One suggestion for better message tracking is to create different Message Queues for integrations and route messages to each queue instead of default IN1 queue.

Hope it helps!

Damith

Reply