<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Sarah<br>
<br>
ok You are right. I found Namespace URI by definition of workspace in
geoserver GUI. I changed it from <a class="moz-txt-link-freetext" href="http://localhost:8080/komunikacja">http://localhost:8080/komunikacja</a> to
<a class="moz-txt-link-freetext" href="http://mapakrakow.pl">http://mapakrakow.pl</a>.<br>
Now my Protocol.WFS definition is:<br>
<br>
protocol: new OpenLayers.Protocol.WFS({<br>
version: "1.0.0",<br>
srsName: "EPSG:2180",<br>
url:
<a class="moz-txt-link-rfc2396E" href="http://mapakrakow.pl:8080/geoserver/wfs">"http://mapakrakow.pl:8080/geoserver/wfs"</a>,<br>
featureNS: <a class="moz-txt-link-rfc2396E" href="http://mapakrakow.pl">"http://mapakrakow.pl"</a>,<br>
featureType: "przystanki_mk",
//"komunikacja:przystanki_mk"<br>
featurePrefix:"komunikacja"<br>
//schema:<a class="moz-txt-link-rfc2396E" href="http://mapakrakow.pl:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=komunikacja:przystanki_mk">"http://mapakrakow.pl:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=komunikacja:przystanki_mk"</a><br>
})<br>
<br>
<br>
I changed the version parameter to 1.1.0, turned on schema parameter
but it not helped.<br>
Do You have more idea?<br>
Thanks for the Answer<br>
<br>
Bartek<br>
<br>
<blockquote cite="mid:753701.34648.qm@web26507.mail.ukl.yahoo.com"
type="cite">
<style type="text/css"><!-- DIV {margin:0px;} --></style>
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div>Hi,<br>
<br>
<span>for example at geoserver giu you have Namespace topp then you
have to declare <a moz-do-not-send="true" target="_blank"
href="http://www.openplans.org/topp">http://www.openplans.org/topp</a>
as featureNS. If you have further problems I think best way is to use
the geoserver mailinglist.</span><br>
</div>
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Have
you used pro4j for your epsg:2180 because OL doesn`t support this? <br>
<br>
HTH<br>
best regards<br>
Sarah<br>
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font
face="Tahoma" size="2">
<hr size="1"><b><span style="font-weight: bold;"></span></b><br>
</font><br>
<title></title>
Hi,<br>
<br>
<blockquote type="cite">
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div
style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font
face="Tahoma" size="2">
<hr size="1"><b><span style="font-weight: bold;">Von:</span></b>
Bartłomiej Burkot <a moz-do-not-send="true" rel="nofollow"
class="moz-txt-link-rfc2396E"
ymailto="mailto:pomiarowiec10@poczta.onet.pl" target="_blank"
href="mailto:pomiarowiec10@poczta.onet.pl"><pomiarowiec10@poczta.onet.pl></a><br>
<b><span style="font-weight: bold;">An:</span></b>
<a moz-do-not-send="true" rel="nofollow"
class="moz-txt-link-abbreviated" ymailto="mailto:users@openlayers.org"
target="_blank" href="mailto:users@openlayers.org">users@openlayers.org</a><br>
<b><span style="font-weight: bold;">Gesendet:</span></b> Freitag,
den
11. Juni 2010, 11:12:53 Uhr<br>
<b><span style="font-weight: bold;">Betreff:</span></b>
[OpenLayers-Users] Problem with OpenLayers.Protocol.WFS from Geoserver<br>
</font><br>
Dear users<br>
<br>
Can somebody tell me why is the vectorlayer: "WFS stops from protocol <br>
WFS" in this examle not displaying?<br>
<a moz-do-not-send="true" rel="nofollow" target="_blank"
href="http://mapakrakow.pl/%7Ebbarni/mk4/index2.php">http://mapakrakow.pl/~bbarni/mk4/index2.php</a><br>
<br>
I defined 2 Vector layers both from geoserver:<br>
First as "OpenLayers.Layer.WFS" the sercond as
"OpenLayers.Layer.Vector" <br>
with "OpenLayers.Protocol.WFS".<br>
As I can see in firebug the respond from geoserver is the same GML-file
<br>
at both Layers but at "protocol.WFS" the stops are not displaying in
the <br>
map.<br>
I tryed change the version of protocol, strategy, stylemap, add the <br>
geoserver url to proxy.cgi and nothing helped.<br>
<br>
Under is my code.<br>
Can somebody explain me what I'm doing wrong? How to change <br>
OpenLayers.Protocol.WFS to request the goeserver with GET method
instead <br>
of POST?<br>
Thanks<br>
Bartek<br>
<br>
<br>
wfs = new OpenLayers.Layer.WFS( "WFS from Layer.WFS", <br>
"<a moz-do-not-send="true" rel="nofollow" target="_blank"
href="http://mapakrakow.pl:8080/geoserver/wfs">http://mapakrakow.pl:8080/geoserver/wfs</a>",<br>
{typename: 'komunikacja:przystanki_mk'},<br>
{<br>
typename: "komunikacja:przystanki_mk"<br>
}<br>
);<br>
var przystanki_wfs = new OpenLayers.Layer.Vector("WFS stops from <br>
protocol WFS", {<br>
strategies: [new OpenLayers.Strategy.BBOX()],<br>
//strategies: [new OpenLayers.Strategy.Fixed()],<br>
projection: new <br>
OpenLayers.Projection("EPSG:2180"),<br>
styleMap: styleMap1,<br>
protocol: new OpenLayers.Protocol.WFS({<br>
<br>
version: "1.0.0",<br>
srsName: "EPSG:2180",<br>
url: <br>
"<a moz-do-not-send="true" rel="nofollow" target="_blank"
href="http://mapakrakow.pl:8080/geoserver/wfs">http://mapakrakow.pl:8080/geoserver/wfs</a>",<br>
featureNS: "komunikacja", //featureNS: <br>
"komunikacja",<br>
//featureNS: <br>
"<a moz-do-not-send="true" rel="nofollow" target="_blank"
href="http://localhost:8080/komunikacja">http://localhost:8080/komunikacja</a>",
//featureNS:
"komunikacja", <br>
"<a moz-do-not-send="true" rel="nofollow" target="_blank"
href="http://mapakrakow.pl:8080/komunikacja">http://mapakrakow.pl:8080/komunikacja</a>"<br>
featureType: "przystanki_mk",<br>
geometryName: "the_geom",<br>
featurePrefix:"komunikacja",<br>
<br>
extractAttributes: false<br>
<br>
//schema:"<a moz-do-not-send="true" rel="nofollow" target="_blank"
href="http://mapakrakow.pl:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=komunikacja:przystanki_mk">http://mapakrakow.pl:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=komunikacja:przystanki_mk</a>"<br>
})<br>
});<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a moz-do-not-send="true" rel="nofollow"
ymailto="mailto:Users@openlayers.org" target="_blank"
href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a moz-do-not-send="true" rel="nofollow" target="_blank"
href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br>
</div>
</div>
</div>
<br>
</blockquote>
<br>
<br>
<blockquote type="cite">
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div>Hi,<br>
<br>
AFAIK
you have to use featureNS with original namespace and not the short one
and WFS can´t do GET (but I´m not sure of this one). <br>
<br>
HTH<br>
best regards<br>
Sarah<br>
</div>
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br>
</div>
</div>
</blockquote>
<br>
When I change featureNS to<br>
featureNS: <a moz-do-not-send="true" rel="nofollow"
class="moz-txt-link-rfc2396E" target="_blank"
href="http://mapakrakow.pl:8080/komunikacja">"http://mapakrakow.pl:8080/komunikacja"</a><br>
I get the error from firebug: <br>
<pre><code class="wrappedText focusRow">Could not locate {<a
moz-do-not-send="true" rel="nofollow" class="moz-txt-link-freetext"
target="_blank" href="http://mapakrakow.pl:8080/komunikacja">http://mapakrakow.pl:8080/komunikacja</a>}przystanki_mk in catalog.</code></pre>
I cannt find the featureNS parameter in my Geoserver configuration. My
layer is defined in geoserver in workspace "komunikacja", layername is
przystanki_mk, EPSG is 2180. Geoserver has correctly <span>computed
Bounding Boxes</span> from data. Geometry columns name is the_geom,
type: Point.<br>
Geoserver has generated layer preview:<br>
<a moz-do-not-send="true" rel="nofollow" class="moz-txt-link-freetext"
target="_blank"
href="http://mapakrakow.pl:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=komunikacja:przystanki_mk&styles=&bbox=545448.688,226900.375,586247.75,261943.359&width=512&height=439&srs=EPSG:2180&format=application/openlayers">http://mapakrakow.pl:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=komunikacja:przystanki_mk&styles=&bbox=545448.688,226900.375,586247.75,261943.359&width=512&height=439&srs=EPSG:2180&format=application/openlayers</a>
<br>
<br>
>From where should I read the featureNS?<br>
<br>
My GML file (respond from geoserver WFS) generated as
OpenLayers.Layer.WFS works correctly and looks like:<br>
<div class="netInfoResponseText
netInfoText ">
<pre><code class="wrappedText focusRow"><?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns=<a moz-do-not-send="true" rel="nofollow"
class="moz-txt-link-rfc2396E" target="_blank"
href="http://www.opengis.net/wfs">"http://www.opengis.net/wfs"</a>
xmlns</code><code class="wrappedText focusRow">:wfs=<a
moz-do-not-send="true" rel="nofollow" class="moz-txt-link-rfc2396E"
target="_blank" href="http://www.opengis.net/wfs">"http://www.opengis.net/wfs"</a>
xmlns:komunikacja=<a moz-do-not-send="true" rel="nofollow"
class="moz-txt-link-rfc2396E" target="_blank"
href="http://localhost:8080/komunikacja">"http://localhost:8080/komunikacja"</a>
xmlns:gml="http</code><code class="wrappedText focusRow">://www.opengis.net/gml"
xmlns:xsi=<a moz-do-not-send="true" rel="nofollow"
class="moz-txt-link-rfc2396E" target="_blank"
href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xsi:schemaLocation="http</code><code class="wrappedText focusRow">://localhost:8080/komunikacja <a
moz-do-not-send="true" rel="nofollow" class="moz-txt-link-freetext"
target="_blank"
href="http://mapakrakow.pl:8080/geoserver/wfs?service=WFS&amp;version=1.0.0&amp">http://mapakrakow.pl:8080/geoserver/wfs?service=WFS&amp;version=1.0.0&amp</a></code><code
class="wrappedText focusRow">;request=DescribeFeatureType&amp;typeName=komunikacja%3Aprzystanki_mk <a
moz-do-not-send="true" rel="nofollow" class="moz-txt-link-freetext"
target="_blank" href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a> http</code><code
class="wrappedText focusRow">://mapakrakow.pl:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd">
<gml:boundedBy><gml:null>unknown</gml</code><code
class="wrappedText focusRow">:null></gml:boundedBy>
<gml:featureMember><komunikacja:przystanki_mk fid="przystanki_mk.1195">
        <komunikacja</code><code class="wrappedText focusRow">:name>N.M.P.</komunikacja:name>
        <komunikacja:idkomunika>180</komunikacja:idkomunika>
        <komunikacja:a_t>a</code><code class="wrappedText focusRow"></komunikacja:a_t>
        <komunikacja:the_geom><gml:Point srsName=<a
moz-do-not-send="true" rel="nofollow" class="moz-txt-link-rfc2396E"
target="_blank" href="http://www.opengis.net/gml/srs/epsg.xml#2180">"http://www.opengis.net/gml/srs/epsg.xml#2180"</a></code><code
class="wrappedText focusRow">>
                <gml:coordinates xmlns:gml=<a moz-do-not-send="true" rel="nofollow"
class="moz-txt-link-rfc2396E" target="_blank"
href="http://www.opengis.net/gml">"http://www.opengis.net/gml"</a> decimal="." cs="," ts=" ">573280.14256993,244164</code><code
class="wrappedText focusRow">.45815782</gml:coordinates>
                </gml:Point></komunikacja:the_geom>
        <komunikacja:klucz>n.m.p.</komunikacja</code><code
class="wrappedText
focusRow">:klucz></komunikacja:przystanki_mk>
</gml:featureMember><gml:featureMember><komunikacja:przystanki_mk</code><code
class="wrappedText focusRow"> fid="przystanki_mk.1257">
        <komunikacja:name>M1 Nowohucka</komunikacja:name>
        <komunikacja:idkomunika>114</code><code
class="wrappedText focusRow"></komunikacja:idkomunika>
        <komunikacja:a_t>a</komunikacja:a_t>
        <komunikacja:the_geom><gml:Point srsName</code><code
class="wrappedText focusRow">=<a moz-do-not-send="true" rel="nofollow"
class="moz-txt-link-rfc2396E" target="_blank"
href="http://www.opengis.net/gml/srs/epsg.xml#2180">"http://www.opengis.net/gml/srs/epsg.xml#2180"</a>>
                <gml:coordinates xmlns:gml=<a moz-do-not-send="true" rel="nofollow"
class="moz-txt-link-rfc2396E" target="_blank"
href="http://www.opengis.net/gml">"http://www.opengis.net/gml"</a></code><code
class="wrappedText focusRow"> decimal="." cs="," ts="
">571810.60532311,244521.74814857</gml:coordinates>
                </gml:Point></komunikacja</code><code
class="wrappedText focusRow">:the_geom>
        <komunikacja:klucz>m1 nowohucka</komunikacja:klucz></komunikacja:przystanki_mk>
        ...
</code><code class="wrappedText focusRow">
</wfs:FeatureCollection</code><code class="wrappedText focusRow">>
</code></pre>
</div>
<br>
Thanks for Your suggestions<br>
Bartek<br>
<br>
</div>
</div>
</div>
<br>
</blockquote>
<br>
</body>
</html>