<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi, I 'm currently deploying a WFS Server with C# mapscripts.&nbsp; The 
Request issued by openlayers is xml-encoded post request.<br>
When I 
tried to use "loadparam", it exited abnormally.&nbsp; So I had to parse 
parameter by myself.&nbsp; So my question is: do I have to parse the 
xml-encoded post request manually?<br>
is there a function I can use to 
parse the post request?<br>
<br>
WFS Service:<br>
<br>
<font style="" face="Courier New">public class MapWFS : IHttpHandler {</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp; </font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp; public void ProcessRequest 
(HttpContext context) {</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OWSRequest req = 
new OWSRequest();</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
System.Collections.Specialized.NameValueCollection queryStr = 
context.Request.Params;</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
//req.loadParams();&nbsp; can't call this function, it will exit immediately.</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
req.setParameter("service", "WFS");</font><font style="" face="Courier 
New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
req.setParameter("version", "1.0.0");</font><font style="" face="Courier
 New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
req.setParameter("request", "getFeature");</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i = 0; i 
&lt; queryStr.Count; ++i)</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
req.setParameter(queryStr.GetKey(i), queryStr.Get(i));</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string mapFileName =
 ConfigurationManager.AppSettings["MapFilePath"];</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mapObj map = new 
mapObj(context.Server.MapPath(mapFileName));</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp; ...</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
mapscript.msIO_installStdoutToBuffer();</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map.OWSDispatch(req);</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
context.Response.ContentType = 
mapscript.msIO_stripStdoutBufferContentType();</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
context.Response.BinaryWrite(mapscript.msIO_getStdoutBufferBytes());</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
mapscript.msIO_resetHandlers();</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">OpenLayers:</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var wfs = new 
OpenLayers.Layer.Vector("WFSCELL", {</font><font style="" face="Courier 
New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strategies:
 [new OpenLayers.Strategy.BBOX()],</font><font style="" face="Courier 
New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
isBaseLayer: true,</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; styleMap: 
styleMap,</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; service: 
wfs,</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Version: 
"1.0.0",</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
TypeName:"cell",</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protocol: 
new OpenLayers.Protocol.WFS({</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url: 
"MapWFS.ashx",</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
featureType: "cell",</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
featurePrefix: "cs" ,</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
featureNS: "http://www.openplans.org/topp",</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
geometryName: 'msGeometry'</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; })</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wfs.isBaseLayer = true;</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayer(wfs);</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New"><br>
</font><font style="" face="Courier New">content of the post-request:</font><font style="" face="Courier New"><br>
  <br>
</font><font style="" face="Courier New"><code role="listitem" class="focusRow subFocusRow "></code></font><font style="" face="Courier
 New">&lt;wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" 
service="WFS" version="1.0.0" 
xsi:schemaLocation="http://www.opengis.net/wfs 
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;wfs:Query typeName="cs:cell" 
xmlns:cosunet="http://www.openplans.org/topp"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ogc:BBOX&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;ogc:PropertyName&gt;msGeometry&lt;/ogc:PropertyName&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;gml:Box xmlns:gml="http://www.opengis.net/gml" 
srsName="EPSG:4326"&gt;&lt;gml:coordinates decimal="." cs="," ts=" 
"&gt;110.298828125,28.1875 
127.701171875,33.8125&lt;/gml:coordinates&gt;&lt;/gml:Box&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ogc:BBOX&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ogc:Filter&gt;<br>
&lt;/wfs:Query&gt;<br>
  <br>
  <br>
  <br>
&lt;/wfs:GetFeature&gt;<br>
</font><br><br><hr id="stopSpelling">From: wingicelee@hotmail.com<br>To: mapserver-users@lists.osgeo.org<br>Date: Thu, 9 Sep 2010 00:44:30 +0000<br>Subject: [mapserver-users] C# mapscripts and WFS Service , xml-encoded Post Request with openlayers<br><br>

<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</style>


Hi, I 'm currently deploying a WFS Server with C# mapscripts.&nbsp; The Request issued by openlayers is xml-encoded post request.<br>When I tried to use "loadparam", it exited abnormally.&nbsp; So I had to parse parameter by myself.&nbsp; So my question is: do I have to parse the xml-encoded post request manually?<br>is there a function I can use to parse the post request?<br><br><br>Thanks and Best Request,<br>William<br><br>                                               
<br>_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users                                               </body>
</html>