You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears this gem, or at least NetSuite itself, uses an XML 1.0 parser, so when a string field includes an invalid unicode character as defined by the XML 1.0 spec, the response will cause a 500 error.
Expected behavior:
Either strip or escape invalid characters.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 300; An invalid XML character (Unicode: 0x3) was found in the element content of the document.</faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
The text was updated successfully, but these errors were encountered:
On Fri, Dec 2, 2022 at 11:01 AM Steven Berlan ***@***.***> wrote:
It appears this gem, or at least, NetSuite itself, uses an XML 1.0 parser,
so when a string field includes an invalid unicode character as defined
by the XML 1.0 spec <https://www.w3.org/TR/xml/#charsets>, the response
will cause a 500 error.
Expected behavior:
Either strip or escape invalid unicode characters.
Reproduction:
item = NetSuite::Records::InventoryItem.new
item.item_id = "Ooops \u0003 Invalid Character"
item.add
Result:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 300; An invalid XML character (Unicode: 0x3) was found in the element content of the document.</faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
—
Reply to this email directly, view it on GitHub
<#570>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABE2R6QEFX4PUJBAKJPWSLWLIMPNANCNFSM6AAAAAASSB5TWM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
Version: 0.8.11
It appears this gem, or at least NetSuite itself, uses an XML 1.0 parser, so when a string field includes an invalid unicode character as defined by the XML 1.0 spec, the response will cause a 500 error.
Expected behavior:
Either strip or escape invalid characters.
Reproduction:
Result:
The text was updated successfully, but these errors were encountered: