|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
An invalid XML character |
« View previous topic :: View next topic » |
Author |
Message
|
wmqstankela |
Posted: Mon May 13, 2019 3:40 am Post subject: An invalid XML character |
|
|
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 |
|
 |
timber |
Posted: Mon May 13, 2019 4:52 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
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 |
|
 |
wmqstankela |
Posted: Mon May 13, 2019 4:54 am Post subject: |
|
|
Voyager
Joined: 29 Feb 2016 Posts: 94
|
Thanks timber for your answer! |
|
Back to top |
|
 |
gbaddeley |
Posted: Mon May 13, 2019 3:39 pm Post subject: Re: An invalid XML character |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 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 |
|
 |
|
|
 |
|
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
|
|
|
|