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
{{ message }}
This repository has been archived by the owner on May 23, 2024. It is now read-only.
When using the WPS Client API, I have a problem using the method addComplexData of class ExecuteRequestBuilder (the one using an IData object as value). In case the generator used returns a stream that is no XML, the method setComplexData will fail to read the stream.
The JTSGeometryBinding is used with WKTGenerator to generate a WKT description of the geometry (i.e. POINT(0 0)). This non XML String is not parsed by method setComplexData. So an empty input is generated.
Error is due to this code :
try {
data.set(XmlObject.Factory.parse(stream));
} catch (XmlExceptione) {
LOGGER.warn("error parsing data stream as xml node, trying to parse data as xs:string");
Stringtext = "";
inti = -1;
try {
while ((i = stream.read()) != -1) {
text = text + (char) i;
}
} catch (IOExceptione1) {
LOGGER.error("error parsing stream", e);
}
The stream is read twice but the position is not reseted so the second time, stream is empty. A solution would be to convert stream to a String before parsing.
If this is not clear, I can provide additional infos. Thanks for your work
The text was updated successfully, but these errors were encountered:
Hello,
When using the WPS Client API, I have a problem using the method addComplexData of class ExecuteRequestBuilder (the one using an IData object as value). In case the generator used returns a stream that is no XML, the method setComplexData will fail to read the stream.
Here is an example :
The JTSGeometryBinding is used with WKTGenerator to generate a WKT description of the geometry (i.e.
POINT(0 0)
). This non XML String is not parsed by method setComplexData. So an empty input is generated.Error is due to this code :
The stream is read twice but the position is not reseted so the second time, stream is empty. A solution would be to convert stream to a String before parsing.
If this is not clear, I can provide additional infos. Thanks for your work
The text was updated successfully, but these errors were encountered: