I have web and WMS/WFS servers hosted on the same machine, although on different ports. I'm currently using OpenLayers to consume the WMS feeds which works well, but now I need to allow the user to extract info about objects so am trying to incorporate WFS into the OpenLayers setup. Being on different ports, I've set up proxy.asp to do the WFS requests:
<%
set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
strURL = Request("url")
objHttp.open "GET", strURL, False
objHttp.Send
If objHttp.status = 200 Then
Response.Expires = 90
Response.ContentType = "application/xml;charset=UTF-8"
Response.BinaryWrite objHttp.responseBody
set objHttp = Nothing
End If
%>
I've tested the proxy using this URL: http:///maps/proxy.asp?url=http%3A//:4326/OgcService/WFS.impl?service=wfs?request=getCapabilities
This returns the GetCapabilities which is identical to that returned if I access it directly, but without the proxy.
However, when using this WFS, via proxy, I can't get OpenLayers to display any content. At this stage it could well be my OpenLayers code, which I can post if necessary, but the same WFS URL via proxy doesn't work in MapInfo or Cadcorp MapModeller (it does with just the base URL). I suspect the proxy is the issue. Any ideas what the issue is likely to be?
Cheers!
POST http://myserver/maps/proxy.asp?url=http%3A//myserver:4326/OgcService/WFS.impl– BStone Mar 15 at 15:23<?xml version='1.0' encoding="UTF-8" standalone="no" ?> <ogc:ServiceExceptionReport xmlns:ogc="http://www.opengis.net/ogc" version="1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://myserver:4326/OgcService/WFS.impl?GetSchema&name=OGC/wfs/1.0.0/OGC-exception.xsd"><ogc:ServiceException>Invalid or missing version parameter.</ogc:ServiceException></ogc:ServiceExceptionReport>– BStone Mar 15 at 15:26