[mapserver-users] Mapserfer Wfs and Mapinfo

Iacovlev Pavel iacovlev.pavel at gmail.com
Fri Jul 4 05:41:14 PDT 2008


Ok I know where the bug is, first of all as written In the begging of the post 
I run the wfs server as phpmapscript, so that means no CGI, to load the 
parameters passed to the script I use : 

$request = ms_newowsrequestobj();
foreach ($_REQUEST as $key =>$value) {
	$request->setParameter($key, $value);
}

not because I love this way, just because $request->loadParams(); just does 
not work in non CGI environment at all. 

Ok now in GetCapabilities response we tell the WFS client "<Post 
onlineResource="http://dev1.dmsolutions.ca/cgi-bin/mswfs_gmap?"/>" hey we can 
accept RAW XML DATA as POST, that data comes to PHP but it's not in the 
$_REQUEST object, but in "php://input", that means that $request does not get 
populated and we get an "empty" request.

2 ways of fixing this :
1) Easy & Dirty :
$buffer = str_replace("<Post 
onlineResource=\"$yourWfsServerAddressHere\" />", '', $buffer);

this will just won't allow the client to send HTTP POST REQUEST with XML RAW 
DATA

2) Pupulate the request object withRAW  XML DATA, need help from the community 
here : "How do you populate the $request = ms_newowsrequestobj(); with RAW 
XML DATA" ?

On Friday 04 July 2008 01:35:59 Milo van der Linden wrote:
> So the problem is in the GetCapabilities.
>
> I copied yours in a xml file.
> Then downloaded
> <http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap?VERSION=1.0.0&SERVICE=WFS&RE
>QUEST=GetCapabilities> and saved it as an xml-file too.
>
> Then I installed meld on my ubuntu desktop. There is a compareable
> product for windows called winmerge <http://winmerge.org/>
>
> to visualy compare both documents. This is what I found:
>
> dmsolutions has
>
> <XMLSCHEMA/>
>     <SFE_XMLSCHEMA/>
>
> where you have
>
>   <XMLSCHEMA/>
>
> and
> <GML2/>
> <GML3/>
>
> where you have
> <GML2/>
>
> Your latlong bounding box says: <LatLongBoundingBox minx="-9.2958e+13"
> miny="-1.28383e+30"
> maxx="2.27243e+12" maxy="1.28383e+30" />
>
> I am not sure mapinfo is able to handle the "e+12" in the coordinates,
> perhaps you should try testing a coordinate with all decimals written out?
>
> Is your EPSG code (28405) one that can be recognized by MapInfo and
> transformed into their internal coordinate systems?
>
> These are some hints, I wish you good luck with rest!
>
> Kind regards,
>
> Milo van der Linden
>
>
>
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users





More information about the MapServer-users mailing list