私のアプリケーションは、Wink と JDK (1.6) に組み込まれている JAXB プロバイダーを使用して REST API をサポートしています。制御文字を含む PUT リクエストを受け取ることがあります。
私のアプリケーションに関する限り、制御文字は有効で意味のある入力を構成します。ただし、アプリケーションは、これらの文字を消化できないという悪名高い例外をスローします。
Message: An invalid XML character (Unicode: 0x13) was found in the element content of the document.]
at org.apache.wink.common.internal.providers.entity.xml.JAXBXmlProvider.readFrom(JAXBXmlProvider.java:107)
at org.apache.wink.server.internal.registry.ServerInjectableFactory$EntityParam.getValue(ServerInjectableFactory.java:190)
at org.apache.wink.common.internal.registry.InjectableFactory.instantiate(InjectableFactory.java:67)
at org.apache.wink.server.internal.handlers.CreateInvocationParametersHandler.handleRequest
JAXB プロバイダーにこれらの文字を無視するように指示する方法はおそらくありません (ある時点で Xml を解析する必要があり、違法は違法であるため..)。どうすればこれを機能させることができますか?Rest クライアントにこれらの文字を送信する前にエスケープするように指示する方法はありますか?