GeoServer WPS process fail with OpenLayers 2: “The request body should be contained in a CDATA section”

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

GeoServer WPS process fail with OpenLayers 2: “The request body should be contained in a CDATA section”


I am trying to create an application with WPS builder like this:
When input format = "text/xml; subtype=wfs-collection/1.0", it creates input field for name of the layer on my server:

function addWFSCollectionInput(input) {
    var name = input.identifier;
    var field = document.createElement("input");
    field.title = input["abstract"];
    field.value = name + " (layer on the server)";
    addValueHandlers(field, function() {
        input.reference = field.value ? {
            mimeType: "text/xml; subtype=wfs-collection/1.0",
            method: "POST",
            body: {
                wfs: {
                    version: "1.0.0",
                    outputFormat: "GML2",
                    featureType: field.value
        } : undefined;

This input is required for example by algorithms gs:Clip and gs:Aggregate. When I'm trying to run some of these algorithms, it returns this kind of result:

<?xml version="1.0" encoding="UTF-8"?><wps:ExecuteResponse xmlns:xs="" xmlns:wps="" xmlns:ows="" xmlns:xlink="" xml:lang="en" service="WPS" serviceInstance="" version="1.0.0"><wps:Process wps:processVersion="1.0.0"><ows:Identifier>gs:Clip</ows:Identifier><ows:Title>Clip</ows:Title><ows:Abstract>Clips (crops) features to a given geometry</ows:Abstract></wps:Process><wps:Status creationTime="2015-08-25T08:35:59.568Z"><wps:ProcessFailed><ows:ExceptionReport version="1.1.0"><ows:Exception exceptionCode="NoApplicableCode"><ows:ExceptionText>The request body should be contained in a CDATA section, otherwise it will get parsed as XML instead of being preserved as is</ows:ExceptionText></ows:Exception></ows:ExceptionReport></wps:ProcessFailed></wps:Status></wps:ExecuteResponse>

How can I fix it?


Users mailing list
[hidden email]