Highlighted
mdirkse Absent Member.
Absent Member.
2676 views

Shady characters (XML Parse error)

Hi,
We've got a Java SOAP client running against a GW 8.03 server that's getting the following error:


Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,7342]
Message: An invalid XML character (Unicode: 0x1) was found in the element content of the document.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:594)
at com.sun.xml.internal.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter.java:81)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:181)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:349)
... 19 more


Apparently, the GW server is producing an illegal XML character. Are there any known causes of this? And is it a best practice to filter the SOAP response when it is returned from the server to weed out these kinds of characters?

Regards,
Maarten
Labels (1)
0 Likes
5 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Shady characters (XML Parse error)

Sorry, there can be various reasons for the corruptions.
I would need to see the soap trace.
Preston

>>> On Friday, August 03, 2012 at 6:26 AM,

mdirkse<mdirkse@no-mx.forums.novell.com> wrote:

> Hi,
> We've got a Java SOAP client running against a GW 8.03 server that's
> getting the following error:
>
>
> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
> Caused by: javax.xml.stream.XMLStreamException: ParseError at
> [row,col]:[1,7342]
> Message: An invalid XML character (Unicode: 0x1) was found in the
> element content of the document.
> at
> com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStrea
> mReaderImpl.java:594)
> at
> com.sun.xml.internal.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamRead
> erFilter.java:81)
> at
> com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bri
> dge(StAXStreamConnector.java:181)
> at
> com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmars
> hal0(UnmarshallerImpl.java:349)
> ... 19 more
>
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
>
> Apparently, the GW server is producing an illegal XML character. Are
> there any known causes of this? And is it a best practice to filter the
> SOAP response when it is returned from the server to weed out these
> kinds of characters?
>
> Regards,
> Maarten

0 Likes
mdirkse Absent Member.
Absent Member.

Re: Shady characters (XML Parse error)

Ok. here's the soap trace, although I can't really find anything wrong with it. I couln't get the trace from my java logging, as SAX balks before getting to the SessionHandler that does the logging, but soapUI did manage to complete the request and show me the results. But, like I said, I don't see anything weird:


<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns3:createCursorRequest xmlns="http://schemas.novell.com/2005/01/GroupWise/types" xmlns:ns2="http://schemas.novell.com/2005/01/GroupWise/events" xmlns:ns3="http://schemas.novell.com/2005/01/GroupWise/methods">
<ns3:container>folders</ns3:container>
<ns3:view>peek message/RTF delivered subject priority hasAttachments priority size attachments custom email from default recipients sendoptions threading</ns3:view>
<ns3:filter>
<element xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="FilterGroup">
<op>and</op>
<element xsi:type="FilterEntry">
<op>gt</op>
<field>delivered</field>
<value>2012-07-31T12:03:56Z</value>
</element>
<element xsi:type="FilterEntry">
<op>ne</op>
<custom type="Binary">
<field>Archived</field>
</custom>
<value>1</value>
</element>
<element xsi:type="FilterEntry">
<op>isOf</op>
<field>source</field>
<value>sent received</value>
</element>
</element>
</ns3:filter>
</ns3:createCursorRequest>
</S:Body>
</S:Envelope>

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header/>
<S:Body>
<gwm:createCursorResponse xmlns:gwe="http://schemas.novell.com/2005/01/GroupWise/events" xmlns:gwm="http://schemas.novell.com/2005/01/GroupWise/methods" xmlns:gwt="http://schemas.novell.com/2005/01/GroupWise/types">
<gwm:cursor>-1578251998</gwm:cursor>
<gwm:status>
<gwt:code>0</gwt:code>
</gwm:status>
</gwm:createCursorResponse>
</S:Body>
</S:Envelope>

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns3:readCursorRequest xmlns="http://schemas.novell.com/2005/01/GroupWise/types" xmlns:ns2="http://schemas.novell.com/2005/01/GroupWise/events" xmlns:ns3="http://schemas.novell.com/2005/01/GroupWise/methods">
<ns3:container>folders</ns3:container>
<ns3:cursor>-1578251998</ns3:cursor>
<ns3:forward>true</ns3:forward>
<ns3:count>3</ns3:count>
</ns3:readCursorRequest>
</S:Body>
</S:Envelope>

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header/>
<S:Body>
<gwm:readCursorResponse xmlns:gwm="http://schemas.novell.com/2005/01/GroupWise/methods" xmlns:gwt="http://schemas.novell.com/2005/01/GroupWise/types" xmlns:gwe="http://schemas.novell.com/2005/01/GroupWise/events">
<gwm:items>
<gwt:item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="gwt:DocumentRef">
<gwt:id>4DDE4EED.do_bla.po_bla.100.1707439.1.213D0.1@11:19.do_bla.po_bla.100.0.1.0.1@30</gwt:id>
<gwt:version>1</gwt:version>
<gwt:modified>2011-05-26T11:00:29Z</gwt:modified>
<gwt:container>19.do_bla.po_bla.100.0.1.0.1@30</gwt:container>
<gwt:created>2011-05-26T11:00:29Z</gwt:created>
<gwt:status>
<gwt:accepted>1</gwt:accepted>
<gwt:opened>1</gwt:opened>
<gwt:read>1</gwt:read>
</gwt:status>
<gwt:messageId><4DDE4EED01707439000213D0@bla.nl></gwt:messageId>
<gwt:source>personal</gwt:source>
<gwt:delivered>2011-05-26T11:00:29Z</gwt:delivered>
<gwt:subject>Lijst</gwt:subject>
<gwt:distribution>
<gwt:from>
<gwt:displayName>conversie</gwt:displayName>
</gwt:from>
</gwt:distribution>
<gwt:size>3584</gwt:size>
<gwt:library>
<gwt:displayName>po_bla Library</gwt:displayName>
<gwt:email>do_bla.po_bla.po_bla Library</gwt:email>
</gwt:library>
<gwt:documentNumber>1257</gwt:documentNumber>
<gwt:filename>GWI</gwt:filename>
<gwt:documentTypeName>Document</gwt:documentTypeName>
<gwt:author>
<gwt:displayName>conversie</gwt:displayName>
<gwt:email>do_bla.po_bla.filterworks</gwt:email>
<gwt:uuid>1E41F920-079D-0000-B38E-20123A558035</gwt:uuid>
</gwt:author>
<gwt:creator>
<gwt:displayName>conversie</gwt:displayName>
<gwt:email>do_bla.po_bla.filterworks</gwt:email>
<gwt:uuid>1E41F920-079D-0000-B38E-20123A558035</gwt:uuid>
</gwt:creator>
<gwt:officialVersion>1</gwt:officialVersion>
<gwt:currentVersion>1</gwt:currentVersion>
<gwt:versionNumber>1</gwt:versionNumber>
<gwt:versionDescription>Oorspronkelijke versie</gwt:versionDescription>
<gwt:fileSize>3584</gwt:fileSize>
<gwt:acl>
<gwt:entry>
<gwt:displayName>Author</gwt:displayName>
<gwt:uuid>1E41F920-079D-0000-B38E-20123A558035</gwt:uuid>
<gwt:rights>
<gwt:read>1</gwt:read>
<gwt:edit>1</gwt:edit>
<gwt:delete>1</gwt:delete>
<gwt:share>1</gwt:share>
<gwt:manage>1</gwt:manage>
</gwt:rights>
</gwt:entry>
<gwt:entry>
<gwt:displayName><Creator Access></gwt:displayName>
<gwt:email>C</gwt:email>
<gwt:rights>
<gwt:read>1</gwt:read>
<gwt:edit>1</gwt:edit>
<gwt:delete>1</gwt:delete>
<gwt:share>1</gwt:share>
<gwt:manage>1</gwt:manage>
</gwt:rights>
</gwt:entry>
<gwt:entry>
<gwt:uuid>1E41F920-079D-0000-B38E-20123A558035</gwt:uuid>
<gwt:rights>
<gwt:read>1</gwt:read>
<gwt:edit>1</gwt:edit>
<gwt:delete>1</gwt:delete>
<gwt:share>1</gwt:share>
<gwt:manage>1</gwt:manage>
</gwt:rights>
</gwt:entry>
</gwt:acl>
</gwt:item>
</gwm:items>
<gwm:status>
<gwt:code>0</gwt:code>
</gwm:status>
</gwm:readCursorResponse>
</S:Body>
</S:Envelope>


Thanks in advance,
Maarten
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Shady characters (XML Parse error)

I didn't see anything wrong with the XML.
Sometimes the trace utility will fix up the XML.
You could try tcptrace:
http://www.pocketsoap.com/tcpTrace/
or Microsoft soap trace utility on Windows.
google MsSoapT3.exe
You might even need to do a wire trace using wireshark or tcpdump.

Preston

>>> On Wednesday, August 08, 2012 at 10:06 AM,

mdirkse<mdirkse@no-mx.forums.novell.com> wrote:

> Ok. here's the soap trace, although I can't really find anything wrong
> with it. I couln't get the trace from my java logging, as SAX balks
> before getting to the SessionHandler that does the logging, but soapUI
> did manage to complete the request and show me the results. But, like I
> said, I don't see anything weird:
>
>
> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
> <S:Body>
> <ns3:createCursorRequest
> xmlns="http://schemas.novell.com/2005/01/GroupWise/types"
> xmlns:ns2="http://schemas.novell.com/2005/01/GroupWise/events"
> xmlns:ns3="http://schemas.novell.com/2005/01/GroupWise/methods">
> <ns3:container>folders</ns3:container>
> <ns3:view>peek message/RTF delivered subject priority hasAttachments
> priority size attachments custom email from default recipients
> sendoptions threading</ns3:view>
> <ns3:filter>
> <element xmlns:xsi="http://www.w3.org/2001/XMLSchema‑instance"
> xsi:type="FilterGroup">
> <op>and</op>
> <element xsi:type="FilterEntry">
> <op>gt</op>
> <field>delivered</field>
> <value>2012‑07‑31T12:03:56Z</value>
> </element>
> <element xsi:type="FilterEntry">
> <op>ne</op>
> <custom type="Binary">
> <field>Archived</field>
> </custom>
> <value>1</value>
> </element>
> <element xsi:type="FilterEntry">
> <op>isOf</op>
> <field>source</field>
> <value>sent received</value>
> </element>
> </element>
> </ns3:filter>
> </ns3:createCursorRequest>
> </S:Body>
> </S:Envelope>
>
> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
> <S:Header/>
> <S:Body>
> <gwm:createCursorResponse
> xmlns:gwe="http://schemas.novell.com/2005/01/GroupWise/events"
> xmlns:gwm="http://schemas.novell.com/2005/01/GroupWise/methods"
> xmlns:gwt="http://schemas.novell.com/2005/01/GroupWise/types">
> <gwm:cursor>‑1578251998</gwm:cursor>
> <gwm:status>
> <gwt:code>0</gwt:code>
> </gwm:status>
> </gwm:createCursorResponse>
> </S:Body>
> </S:Envelope>
>
> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
> <S:Body>
> <ns3:readCursorRequest
> xmlns="http://schemas.novell.com/2005/01/GroupWise/types"
> xmlns:ns2="http://schemas.novell.com/2005/01/GroupWise/events"
> xmlns:ns3="http://schemas.novell.com/2005/01/GroupWise/methods">
> <ns3:container>folders</ns3:container>
> <ns3:cursor>‑1578251998</ns3:cursor>
> <ns3:forward>true</ns3:forward>
> <ns3:count>3</ns3:count>
> </ns3:readCursorRequest>
> </S:Body>
> </S:Envelope>
>
> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
> <S:Header/>
> <S:Body>
> <gwm:readCursorResponse
> xmlns:gwm="http://schemas.novell.com/2005/01/GroupWise/methods"
> xmlns:gwt="http://schemas.novell.com/2005/01/GroupWise/types"
> xmlns:gwe="http://schemas.novell.com/2005/01/GroupWise/events">
> <gwm:items>
> <gwt:item xmlns:xsi="http://www.w3.org/2001/XMLSchema‑instance"
> xsi:type="gwt:DocumentRef">
>
> <gwt:id>4DDE4EED.do_bla.po_bla.100.1707439.1.213D0.1@11:19.do_bla.po_bla.
> 100.0.1.0.1@30</gwt:id>
> <gwt:version>1</gwt:version>
> <gwt:modified>2011‑05‑26T11:00:29Z</gwt:modified>
> <gwt:container>19.do_bla.po_bla.100.0.1.0.1@30</gwt:container>
> <gwt:created>2011‑05‑26T11:00:29Z</gwt:created>
> <gwt:status>
> <gwt:accepted>1</gwt:accepted>
> <gwt:opened>1</gwt:opened>
> <gwt:read>1</gwt:read>
> </gwt:status>
> <gwt:messageId><4DDE4EED01707439000213D0@bla.nl></gwt:messageId>
> <gwt:source>personal</gwt:source>
> <gwt:delivered>2011‑05‑26T11:00:29Z</gwt:delivered>
> <gwt:subject>Lijst</gwt:subject>
> <gwt:distribution>
> <gwt:from>
> <gwt:displayName>conversie</gwt:displayName>
> </gwt:from>
> </gwt:distribution>
> <gwt:size>3584</gwt:size>
> <gwt:library>
> <gwt:displayName>po_bla Library</gwt:displayName>
> <gwt:email>do_bla.po_bla.po_bla Library</gwt:email>
> </gwt:library>
> <gwt:documentNumber>1257</gwt:documentNumber>
> <gwt:filename>GWI</gwt:filename>
> <gwt:documentTypeName>Document</gwt:documentTypeName>
> <gwt:author>
> <gwt:displayName>conversie</gwt:displayName>
> <gwt:email>do_bla.po_bla.filterworks</gwt:email>
> <gwt:uuid>1E41F920‑079D‑0000‑B38E‑20123A558035</gwt:uuid>
> </gwt:author>
> <gwt:creator>
> <gwt:displayName>conversie</gwt:displayName>
> <gwt:email>do_bla.po_bla.filterworks</gwt:email>
> <gwt:uuid>1E41F920‑079D‑0000‑B38E‑20123A558035</gwt:uuid>
> </gwt:creator>
> <gwt:officialVersion>1</gwt:officialVersion>
> <gwt:currentVersion>1</gwt:currentVersion>
> <gwt:versionNumber>1</gwt:versionNumber>
> <gwt:versionDescription>Oorspronkelijke versie</gwt:versionDescription>
> <gwt:fileSize>3584</gwt:fileSize>
> <gwt:acl>
> <gwt:entry>
> <gwt:displayName>Author</gwt:displayName>
> <gwt:uuid>1E41F920‑079D‑0000‑B38E‑20123A558035</gwt:uuid>
> <gwt:rights>
> <gwt:read>1</gwt:read>
> <gwt:edit>1</gwt:edit>
> <gwt:delete>1</gwt:delete>
> <gwt:share>1</gwt:share>
> <gwt:manage>1</gwt:manage>
> </gwt:rights>
> </gwt:entry>
> <gwt:entry>
> <gwt:displayName><Creator Access></gwt:displayName>
> <gwt:email>C</gwt:email>
> <gwt:rights>
> <gwt:read>1</gwt:read>
> <gwt:edit>1</gwt:edit>
> <gwt:delete>1</gwt:delete>
> <gwt:share>1</gwt:share>
> <gwt:manage>1</gwt:manage>
> </gwt:rights>
> </gwt:entry>
> <gwt:entry>
> <gwt:uuid>1E41F920‑079D‑0000‑B38E‑20123A558035</gwt:uuid>
> <gwt:rights>
> <gwt:read>1</gwt:read>
> <gwt:edit>1</gwt:edit>
> <gwt:delete>1</gwt:delete>
> <gwt:share>1</gwt:share>
> <gwt:manage>1</gwt:manage>
> </gwt:rights>
> </gwt:entry>
> </gwt:acl>
> </gwt:item>
> </gwm:items>
> <gwm:status>
> <gwt:code>0</gwt:code>
> </gwm:status>
> </gwm:readCursorResponse>
> </S:Body>
> </S:Envelope>
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
>
> Thanks in advance,
> Maarten

0 Likes
mdirkse Absent Member.
Absent Member.

Re: Shady characters (XML Parse error)

Hi Preston,
I did a tcp dump with wireshark, and this stood out in the saved capture:

<gwt:to>J [square 0001 glyph]ouglas</gwt:to><gwt:recipients><gwt:recipient><gwt:displayName>J [square 0001 glyph]ouglas</gwt:displayName><gwt:email>J.[square 0001 glyph]ouglas@nijkerk.eu</gwt:email><gwt:uuid>[square 0001 glyph]86A8810-0C4F-0000-8873-C70B40EC645F</gwt:uuid>

Where [square 0001 glyph] is a square with "00" and "01" stacked on top of each other inside (sorry, couldn't find a suitable image to illustrate, but I think you know what I mean). These are the only instances of this character I could find in the trace.

So it looks like the non-valid character (\u0001) is inserted into a couple of standard fields. Any thoughts on how that could happen?
Regards,
Maarten
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Shady characters (XML Parse error)

Sorry, I need the actual data so I can look at the hex value of the data.
Can you also export the contact and send that to me?
You can send the data to me directly (pstephenson@novell.com)

Thanks.
Preston

>>> On Thursday, August 09, 2012 at 7:06 AM,

mdirkse<mdirkse@no-mx.forums.novell.com> wrote:

> Hi Preston,
> I did a tcp dump with wireshark, and this stood out in the saved
> capture:
>
>
> Code:
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
> <gwt:to>J [square 0001
> glyph]ouglas</gwt:to><gwt:recipients><gwt:recipient><gwt:displayName>J
> [square 0001 glyph]ouglas</gwt:displayName><gwt:email>J.[square 0001
> glyph]ouglas@nijkerk.eu</gwt:email><gwt:uuid>[square 0001
> glyph]86A8810‑0C4F‑0000‑8873‑C70B40EC645F</gwt:uuid>
>
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
>
> Where [square 0001 glyph] is a square with "00" and "01" stacked
> on top of each other inside (sorry, couldn't find a suitable image to
> illustrate, but I think you know what I mean). These are the only
> instances of this character I could find in the trace.
>
> So it looks like the non‑valid character (\u0001) is inserted into a
> couple of standard fields. Any thoughts on how that could happen?
> Regards,
> Maarten

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.