There is some strange behaviour when trying to send an execute request with a string payload as ComplexData. The input is defined in an annotated algorithm:
@ComplexDataInput(identifier = "script", title = "a script", abstrakt = "...", binding = PlainStringBinding.class)
public void setScript(String script) {
this.script = script;
}
NOTE: I already had to make a small change to PlainStringBinding by adjusting the return type of the getPayload() method to String.
When I send the following element, then the WPS fails to determine the input format:
<wps:ComplexData encoding="UTF-8" mimeType="text/plain">
myUTF string
with new lines
</wps:ComplexData>
In InputHanlder the following input reference description is created, and I have not Idea wy the wcpsAll schema is used here! Setting a schema does not make sense for this input as far as I can see.
Anyway, in following the code is not able to determine a suitable parser (see also #138).
When I provide no information at all, then the org.n52.wps.io.datahandler.parser.WCPSQueryParser is used and the string is correctly parsed an inserted into my algorithm:
There is some strange behaviour when trying to send an execute request with a string payload as ComplexData. The input is defined in an annotated algorithm:
NOTE: I already had to make a small change to
PlainStringBinding
by adjusting the return type of thegetPayload()
method toString
.When I send the following element, then the WPS fails to determine the input format:
In
InputHanlder
the following input reference description is created, and I have not Idea wy the wcpsAll schema is used here! Setting a schema does not make sense for this input as far as I can see.Anyway, in following the code is not able to determine a suitable parser (see also #138).
When I provide no information at all, then the
org.n52.wps.io.datahandler.parser.WCPSQueryParser
is used and the string is correctly parsed an inserted into my algorithm:Setting a different mimeType, e.g.
<wps:ComplexData encoding="UTF-8" mimeType="text/x-R">>
, does not make a difference.Should ComplexData not work for plain text strings as well? Ist there an XML schema for this that I don't know about?