ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Handling URLs in JSON message format

Post new topic  Reply to topic
 Handling URLs in JSON message format « View previous topic :: View next topic » 
Author Message
Pats21
PostPosted: Mon Jun 05, 2017 9:32 pm    Post subject: Handling URLs in JSON message format Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Jun 05, 2017 9:53 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
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
View user's profile Send private message Send e-mail
Pats21
PostPosted: Mon Jun 05, 2017 10:33 pm    Post subject: Reply with quote

Disciple

Joined: 08 Sep 2006
Posts: 154

I am passing URL String.
Back to top
View user's profile Send private message
Pats21
PostPosted: Mon Jun 05, 2017 10:46 pm    Post subject: Reply with quote

Disciple

Joined: 08 Sep 2006
Posts: 154

One additional information.

Response is sent using HTTPReply node.
Back to top
View user's profile Send private message
timber
PostPosted: Wed Jun 07, 2017 1:54 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Does this help: http://www.json.org/ ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Handling URLs in JSON message format
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.