[OpenLayers-Users] WPSExecute Format Problem

Okello Nelson cn.okello at gmail.com
Fri Jul 27 02:20:32 PDT 2012


Hi Guys,

I have the following code:

function createWPSExecuteRequest(namespace, layerName, popFilter) {
	var request = OpenLayers.Format.XML.prototype.write(new
OpenLayers.Format.WPSExecute().writeNode('wps:Execute', {
		identifier: 'gs:Aggregate',
		dataInputs: [{
			identifier: 'features',
			reference: {
				mimeType: 'text/xml',
				href: WFS_HOST,
				method: 'POST',
				body: {
					wfs: {
						featureType: layerName,
						version: '1.1.0',
				        featureNS: namespace,
				        srsName: 'EPSG:4326',
						defaultFilter: popFilter
					}
				}
			},
			input: {
				identifier: 'aggregationAttribute',
				data: {
					literalData: 'grid_code'
				}
			},
			input: {
				identifier: 'function',
				data: {
					literalData: 'Sum'
				}
			},
			input: {
				identifier: 'singlePass',
				data: {
					literalData: 'Yes'
				}
			}
			
		}],
		responseForm: {
			rawDataOutput: {
				identifier: 'result'
			}
		}
	}));
	
	return request;
}

However, the GML generated by this code does not contain the filter
and the inputs section, except 'features'. Any idea on what I may be
doing wrong?
I'm new to WPS, and probably I have a syntax error in the code above.

Kind Regards,
Okello Nelson.


More information about the Users mailing list