[OpenLayers-Users] Format ajax.request

Eric Lemoine eric.c2c at gmail.com
Wed Dec 3 12:06:15 EST 2008


Hi

Try:

params: {
    REQUEST: "GetFeature",
    ...
}

in place of

parameters: paramString

Hope this helps,

Eric

2008/12/3, Dan Koch <Daniel.Koch at state.ma.us>:
>
> Greetings,
> I'm having trouble formatting my openlayers.ajax.request. I have the
> following:
>
> var queryStr =
> '?request=GetFeature&version=1.0.0&service=wfs&typeName=massgis:GISDATA.TOWNS_POLY';
>
> sendTestRequest(queryStr);
> 	
> function sendTestRequest(queryStr) {
> 	var uri = "http://giswebservices.massgis.state.ma.us/geoserver/wfs";	
> 	var request = new OpenLayers.Ajax.Request(uri,
> 		{method: 'get',
> 		parameters:queryStr,
> 		contentType:'text/xml',
> 		onComplete: function(){},
> 		onFailure: function(){alert("an error occured")}
> 		}
> 	);
> }
>
> I get the following response via firebug:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ows:ExceptionReport version="1.0.0"
>   xsi:schemaLocation="http://www.opengis.net/ows
> http://giswebservices.massgis.state.ma.us:80/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ows="http://www.opengis.net/ows">
>   <ows:Exception exceptionCode="MissingParameterValue" locator="request">
>     <ows:ExceptionText>Could not determine geoserver request
>       from http request
> org.apache.catalina.connector.RequestFacade at d39fe</ows:ExceptionText>
>   </ows:Exception>
> </ows:ExceptionReport>
>
>
> Any help would be greatly appreciated,
> Dan
>
> -----
> Dan Koch
> Massachusetts Dept. of Fish & Game
> --
> View this message in context:
> http://www.nabble.com/Format-ajax.request-tp20686966p20686966.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



More information about the Users mailing list