|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Handling URLs in JSON message format |
« View previous topic :: View next topic » |
Author |
Message
|
Pats21 |
Posted: Mon Jun 05, 2017 9:32 pm Post subject: Handling URLs in JSON message format |
|
|
Disciple
Joined: 08 Sep 2006 Posts: 154
|
Hi,
I have a developed messageflow which takes input in both SOAP and JSON message formats and replies to the consumer in the respective formats.
One of the fields in the response is an URL.
The issue which I am facing is that the '/' characters in the URL are appended with control character '\' while replying in JSON message format.
Due to this behaviour, the consumer of the API is not able to open the link.
For e.g.
Actual URL
http://machinename:1234/abc/xyz/123/456
Becomes
http:\/\/machinename:1234\/abc\/xyz\/123\/456
The updated URL does not work.
I understand that this is pretty much the right behaviour of handling special characters.
One of the way to handle this scenario would be encode the URL using BASE64 encoding. However, wanted to know whether is there any way to suppress the escape characters?
Note that the same behaviour does not happen in case of SOAP message format.
I am using IIB version 9.0.0.0.
Thanks in advance.
Regards,
Pats ... |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jun 05, 2017 9:53 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Well Pats, looks like you are confusing the URL String with the URL class and the internals of the URL...
So in your JSON are you passing the URL Class or a URL String like "http://machine:port/path" ???  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Pats21 |
Posted: Mon Jun 05, 2017 10:33 pm Post subject: |
|
|
Disciple
Joined: 08 Sep 2006 Posts: 154
|
|
Back to top |
|
 |
Pats21 |
Posted: Mon Jun 05, 2017 10:46 pm Post subject: |
|
|
Disciple
Joined: 08 Sep 2006 Posts: 154
|
One additional information.
Response is sent using HTTPReply node. |
|
Back to top |
|
 |
timber |
Posted: Wed Jun 07, 2017 1:54 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|