<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.2900.5921" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Arial">
<DIV>Hi All</DIV>
<DIV> </DIV>
<DIV>Sorry for newby question but we are experiencing strange problems when we put a IP address in the URL of WFS request:</DIV>
<DIV> </DIV>
<DIV>Code is</DIV>
<DIV> </DIV>
<DIV>var blockFilter = new OpenLayers.Filter.Comparison({<BR> type: OpenLayers.Filter.Comparison.EQUAL_TO,<BR> property: "BLOCK_ID",<BR> value: 4777<BR> });<BR> var wfslayer = new OpenLayers.Layer.Vector("Testing", {<BR> //styleMap: styles,<BR> strategies: [new OpenLayers.Strategy.BBOX()],<BR> reportError: true,<BR> visibility: false,<BR> filter: blockFilter,<BR> protocol: new OpenLayers.Protocol.WFS({<BR> url: "<A href="http://localhost:8080/geoserver/wfs">http://localhost:8080/geoserver/wfs</A>",<BR> featureType: "MV_BLOCK_SUMMARY",<BR> propertyNames: ["BLOCK_ID", "BLOCK_LOCATION"],<BR> featureNS: "<A href="http://justice.govt.nz/gis">http://justice.govt.nz/gis</A>",<BR> featurePrefix: "gisdev",<BR> version: "1.1.0" ,<BR> srsName: "EPSG:900913",<BR> //maxFeatures: "20", // -- NOTE: useful as limit feature size to client browser.<BR> geometryName: "BLOCK_LOCATION"<BR> })<BR> });<BR> map.addLayer(wfslayer);</DIV>
<DIV> </DIV>
<DIV>When we change local host to an actual server ip address the request is generated incorrectly and the server is never contacted and their are no post parameters in firebug.</DIV>
<DIV> </DIV>
<DIV>Any ideas what the deal is here?</DIV>
<DIV> </DIV>
<DIV>Headers come out with an IP address as</DIV>
<DIV><PRE class="source ">OPTIONS /geoserver/wfs HTTP/1.1
Host: gisdev.justice.govt.nz:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Origin: http://localhost:8080
Access-Control-Request-Method: POST
</PRE><PRE class="source ">With localhost we get:</PRE><PRE class="source "><PRE class="source ">HTTP/1.1 404 Not Found
Server: Apache-Coyote/1.1
X-TraceId: 4c64d675-35
X-TraceUrl: /insight/services/traces/4c64d675-35?type=json
Content-Type: text/html;charset=utf-8
Content-Length: 1032
Date: Fri, 13 Aug 2010 05:22:35 GMT
</PRE><PRE class="source ">But all the post data is their etc which indicates the request is correct.</PRE></PRE></DIV>
<DIV> </DIV>
<DIV>Regards Wendy</DIV>
<P>========================================================<BR><BR>This e-mail
message and attachments do not necessarily reflect the views of <BR>the New
Zealand Ministry of Justice and may contain <BR>information that is confidential
and may be subject to legal privilege. If you <BR>are not the intended
recipient, you are hereby notified that you must not use, <BR>disseminate,
distribute or copy this e-mail message or its attachments. If you <BR>received
this message in error, please notify the Ministry of Justice <BR>by telephone
(call collect: 00-64-4-918-8800) or return the <BR>original message to us by
e-mail, and destroy any copies.<BR>Thank
you.<BR><BR>================================================</P>
</BODY></HTML>