Re: Dynamic wfs_onlineresource
Yves Jacolin <[email protected]> Thu, 17 Oct 2019 11:37:16 +0200
| Newsgroups | gmane.comp.gis.mapserver.user |
|---|---|
| Message-ID | <CAO8EQxYtJqUFfSdf1KWsLCGnOvVNHPeHJFzhpyrYbPcZCE+eWw@mail.gmail.com> |
--===============7389753653842286170== Content-Type: multipart/alternative; boundary="00000000000035a5fa059517f79a" --00000000000035a5fa059517f79a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Matthias, Just remove the parameter will imply that MapServer will find the correct online resource. Y. Le jeu. 17 oct. 2019 =C3=A0 11:35, Matthias M=C3=BCller < [email protected]> a =C3=A9crit : > Hi, > > we are running WFS services with similar mapfiles on different servers. > > Setting the "wfs_onlineresource" is straight forward, but requires a > hard coded host name: > > First server: > WEB > METADATA > "wfs_title" "myserver" > "wfs_onlineresource" "https://server1.org/mapserver?" > "wfs_srs" "EPSG:4326" > "wfs_enable_request" "*" # necessary > END > END > > > Second server: > WEB > METADATA > "wfs_title" "myserver" > "wfs_onlineresource" "https://server2.org/mapserver?" > "wfs_srs" "EPSG:4326" > "wfs_enable_request" "*" # necessary > END > END > > > I there way to let mapserver figure out the hostname from the request > and create the appropiate links in the WFS capabilities accordingly? > > Something like: > > WEB > METADATA > "wfs_title" "myserver" > "wfs_online > resource" "{request protocol and hostname}/mapserver?" > "wfs_srs" > "EPSG:4326" > "wfs_enable_request" "*" # necessary > END > END > > > -Matthias > > _______________________________________________ > mapserver-users mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/mapserver-users --=20 Yves Jacolin Training and support manager - Team Manager Camptocamp Tel (France) : +33 4 58 48 20 43 Tel (Switzerland) : +41 21 619 10 43 Mob. : +33 6 18 75 42 21 email : [email protected] http://www.camptocamp.com --00000000000035a5fa059517f79a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Matthias,</div><div><br></div><div>Just remove the pa= rameter will imply that MapServer will find the correct online resource.</d= iv><div><br></div><div>Y.<br></div></div><br><div class=3D"gmail_quote"><di= v dir=3D"ltr" class=3D"gmail_attr">Le=C2=A0jeu. 17 oct. 2019 =C3=A0=C2=A011= :35, Matthias M=C3=BCller <<a href=3D"mailto:matthias_mueller@tu-dresden= .de">[email protected]</a>> a =C3=A9crit=C2=A0:<br></div><b= lockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-le= ft:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br> <br> we are running WFS services with similar mapfiles on different servers.<br> <br> Setting the "wfs_onlineresource" is straight forward, but require= s a<br> hard coded host name:<br> <br> First server:<br> =C2=A0 WEB<br> =C2=A0 =C2=A0 METADATA<br> =C2=A0 =C2=A0 =C2=A0 "wfs_title"=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 "myserver"<br> =C2=A0 =C2=A0 =C2=A0 "wfs_onlineresource" "<a href=3D"https:= //server1.org/mapserver" rel=3D"noreferrer" target=3D"_blank">https://serve= r1.org/mapserver</a>?"<br> =C2=A0 =C2=A0 =C2=A0 "wfs_srs"=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 "EPSG:4326"<br> =C2=A0 =C2=A0 =C2=A0 "wfs_enable_request" "*"=C2=A0 # n= ecessary<br> =C2=A0 =C2=A0 END<br> =C2=A0 END<br> <br> <br> Second server:<br> =C2=A0 WEB<br> =C2=A0 =C2=A0 METADATA<br> =C2=A0 =C2=A0 =C2=A0 "wfs_title"=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 "myserver"<br> =C2=A0 =C2=A0 =C2=A0 "wfs_onlineresource" "<a href=3D"https:= //server2.org/mapserver" rel=3D"noreferrer" target=3D"_blank">https://serve= r2.org/mapserver</a>?"<br> =C2=A0 =C2=A0 =C2=A0 "wfs_srs"=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 "EPSG:4326"<br> =C2=A0 =C2=A0 =C2=A0 "wfs_enable_request" "*"=C2=A0 # n= ecessary<br> =C2=A0 =C2=A0 END<br> =C2=A0 END<br> <br> <br> I there way to let mapserver figure out the hostname from the request<br> and create the appropiate links in the WFS capabilities accordingly?<br> <br> Something like:<br> <br> =C2=A0 WEB<br> =C2=A0 =C2=A0 METADATA<br> =C2=A0 =C2=A0 =C2=A0 "wfs_title"=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 "myserver"<br> =C2=A0 =C2=A0 =C2=A0 "wfs_online<br> resource" "{request protocol and hostname}/mapserver?"<br> =C2=A0 =C2=A0 =C2=A0 "wfs_srs"=C2=A0 <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "EPSG:4326"<br> =C2=A0 =C2=A0 =C2=A0 "wfs_enable_request" "*"=C2=A0 # n= ecessary<br> =C2=A0 =C2=A0 END<br> =C2=A0 END<br> <br> <br> -Matthias<br> <br> _______________________________________________<br> mapserver-users mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">mapser= [email protected]</a><br> <a href=3D"https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel=3D= "noreferrer" target=3D"_blank">https://lists.osgeo.org/mailman/listinfo/map= server-users</a></blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D= "ltr" class=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div= ><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir= =3D"ltr"><div><div dir=3D"ltr"><div>Yves Jacolin</div><div>Training and sup= port manager - Team Manager<br>Camptocamp<br><br>Tel (France) : +33 4 58 48= 20 43<br>Tel (Switzerland) : +41 21 619 10 43<br>Mob. : +33 6 18 75 42 21<= br><br>email : <a href=3D"mailto:[email protected]" target=3D"_bl= ank">[email protected]</a><br><a href=3D"http://www.camptocamp.co= m" target=3D"_blank">http://www.camptocamp.com</a></div></div></div></div><= /div></div></div></div></div></div></div></div></div></div></div> --00000000000035a5fa059517f79a-- --===============7389753653842286170== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbWFwc2VydmVy LXVzZXJzIG1haWxpbmcgbGlzdAptYXBzZXJ2ZXItdXNlcnNAbGlzdHMub3NnZW8ub3JnCmh0dHBz Oi8vbGlzdHMub3NnZW8ub3JnL21haWxtYW4vbGlzdGluZm8vbWFwc2VydmVyLXVzZXJz --===============7389753653842286170==--