|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| HTTP Query String convertions | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | $ureshWMB | 
			  
				|  Posted: Mon Sep 22, 2014 9:15 am    Post subject: HTTP Query String convertions |   |  |  
		  | Apprentice
 
 
 Joined: 06 Apr 2014Posts: 36
 
 
 | 
			  
				| Hi Everyone, 
 I have a scenario that getting HTTPRequest in utf-8 encoding format
 http://IP:port/uri?name=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22utf-8%22+s
 
 I am using Parse Query String option on HTTPInput(Advanced) Tab.
 
 and accessing this in ESQL using below code InputLocalEnvironment.HTTP.Input.QueryString.name
 
 Now I wanted to parse this query string to XMLNSC for this
 
 CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNSC') PARSE(InputLocalEnvironment.HTTP.Input.QueryString.name, inEncoding, inCCSID)
 
 here I am getting below exception.
 An invalid XML character (Unicode: 0x25) was found in the prolog of the document.
 
 Thanks,
 |  |  
		  | Back to top |  |  
		  |  |  
		  | $ureshWMB | 
			  
				|  Posted: Wed Sep 24, 2014 3:40 am    Post subject: Re: HTTP Query String convertions |   |  |  
		  | Apprentice
 
 
 Joined: 06 Apr 2014Posts: 36
 
 
 | 
			  
				| 
   
	| $ureshWMB wrote: |  
	| Hi Everyone, 
 I have a scenario that getting HTTPRequest in utf-8 encoding format
 http://IP:port/uri?name=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22utf-8%22+s
 
 I am using Parse Query String option on HTTPInput(Advanced) Tab.
 
 and accessing this in ESQL using below code InputLocalEnvironment.HTTP.Input.QueryString.name
 
 Now I wanted to parse this query string to XMLNSC for this
 
 CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNSC') PARSE(InputLocalEnvironment.HTTP.Input.QueryString.name, inEncoding, inCCSID)
 
 here I am getting below exception.
 An invalid XML character (Unicode: 0x25) was found in the prolog of the document.
 
 Thanks,
 |  
 
 Used JCN node and its worked.
 URLDecoder.decode(msgStr,"utf-8");
 |  |  
		  | 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
 
 |  |  |  |