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 » An invalid XML character

Post new topic  Reply to topic
 An invalid XML character « View previous topic :: View next topic » 
Author Message
wmqstankela
PostPosted: Mon May 13, 2019 3:40 am    Post subject: An invalid XML character Reply with quote

Voyager

Joined: 29 Feb 2016
Posts: 94

Hi all,

I'm using IIB 10, and exposed soap service which is calling 3rd party soap web service. Sometimes I have this error An invalid XML character (Unicode: 0x1a) was found in the element content of the document. This character is in response of 3rd party service.

Is there any way to avoid that IIB throw this error? I can't change response from 3rd party service.

Back to top
View user's profile Send private message
timber
PostPosted: Mon May 13, 2019 4:52 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Quote:
Is there any way to avoid that IIB throw this error?
No. IIB is just like every other XML processor out there. They will all reject this document because it is not valid XML.

Sounds as if your only option is to parse the message as a BLOB, replace illegal characters with XML-legal characters and then use a ResetContentDescriptor node to switch to parse using XMLNSC.
Back to top
View user's profile Send private message
wmqstankela
PostPosted: Mon May 13, 2019 4:54 am    Post subject: Reply with quote

Voyager

Joined: 29 Feb 2016
Posts: 94

Thanks timber for your answer!
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Mon May 13, 2019 3:39 pm    Post subject: Re: An invalid XML character Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
Location: Melbourne, Australia

wmqstankela wrote:
Hi all,
I'm using IIB 10, and exposed soap service which is calling 3rd party soap web service. Sometimes I have this error An invalid XML character (Unicode: 0x1a) was found in the element content of the document. This character is in response of 3rd party service.
Is there any way to avoid that IIB throw this error? I can't change response from 3rd party service.

0x1a is ASCII control character SUB. Some software interfaces will change "invalid" characters to a SUB. This generally leads to invalid XML. Take a close look at the data stream, it will probably indicate why the error is occurring. A common scenarios is Windows special characters (hyphens, quotes, accented characters etc.) creeping into a UTF-8 stream and not being encoded properly.
_________________
Glenn
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 » An invalid XML character
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.