[Mapserver-users] ArcExplorer/ WMS questions

Brent Fraser bfraser at geoanalytic.com
Sun Jan 18 15:44:38 EST 2004


This is a multi-part message in MIME format.

------=_NextPart_000_082D_01C3DDC9.3748AAA0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Matthew,

You've got two problems:

1. TerraServer does not return valid XML when asked for
"request=capabilities"

2. ESRI's ArcExplorer does not send valid WMS URLs when asking for maps.
    (e.g. it sends the image size as real numbers instead of integers).

So much for following standards...

In general, the URL you enter in ArcExplorer must be the GetCapabilities URL
(http://terraservice.net/OgcCapabilities.ashx?), NOT the GetMap URL
(http://terraservice.net/OgcMap.ashx?).  For some WMS sites these are the
same, for others they are different.

I wrote a little ASP to filter ArcExplorer's requests to Terraserver (see
attached file.  If you want the getcapabilities XML, let me know).  It
simply changes the image size to integers.  It also serves up an XML doc
when getCapabilities is requested, but I don't think this is necesary
anymore (TerraServer must have fixed their XML).

Make sure you read the Mapserver doc
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?WMSMapServer, especially
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?WMSMapserverArcExplorer

============================
Here are a couple of other useful tips:

1.  In ArcExplorer, display debugging messages by clicking on the Help ->
ArcExplorer Message Console, then in the dialog, View -> Message Level ->
All

2.  Do a GetCapabilities from your browser.  The browser (at least IE6 does)
will parse the xml and report if there are any problems.

3. Don't use non-ASCII characters in your GetCapabilities doc.  Apparently
ArcExplorer (and MS IE) will not allow non-ASCII characters anywhere in
the XML document.

Brent Fraser
bfraser at geoanalytic.com
www.geoanalytic.com

----- Original Message -----
From: "Matthew Perry" <mtperry78 at sbcglobal.net>
To: "Mapserver List" <mapserver-users at lists.gis.umn.edu>
Sent: Sunday, January 18, 2004 12:32 PM
Subject: [Mapserver-users] ArcExplorer/ WMS questions


> Hello,
>
>  I have been playing with ESRI's new OGC
> interoperability extension for ArcExplorer. I have
> been unable to connect to any WMS server (haven't
> tried WFS) but it looks like it should be doable. Has
> anyone had any success with this?? Are there any good
> resources/tutorials for this extension??
>
> --I have successfully tried the following layer as a
> mapserver WMS client:
>
> LAYER
>  NAME "wms_map"
>  TYPE RASTER
>  STATUS OFF
>  CONNECTION "http://terraservice.net/OgcMap.ashx?"
>  CONNECTIONTYPE WMS
>  METADATA
>         "wms_srs"             "EPSG:26910"
>         "wms_name"            "DRG"
>         "wms_server_version"  "1.1.1"
>         "wms_format"          "image/jpeg"
>         "wms_layers"          "drg"
>  END
>  PROJECTION
>         "init=epsg:26910"
>  END
> END
>
> -- I have successfully tried the following URL:
>
>
http://terraservice.net/OgcMap.ashx?service=wms&request=GetMap&version=1.1.1
&layers=DRG&bbox=573000,4530000,579000,4536000&styles=blank&width=500&height
=500&format=image/jpeg&srs=epsg:26910
>
> -- Yet when I enter this url in the
> Interoperability->Connect to WMS dialog box, it
> doesn't find the capabilities and fails. I have tried
> to stip all the arguments, left some arguments, put
> everything in quotes etc... Nothing seems to work for
> me. Does anyone have any experience with ArcExplorer's
> interoperability that could help me debug this
> problem??
>
> Personally, it seems like a pretty lame attempt by
> ESRI at standards compliance but at least its a start!
>
> Matt Perry
> Humboldt State University
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users

------=_NextPart_000_082D_01C3DDC9.3748AAA0
Content-Type: text/asp;
	name="Terraserver2.asp"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="Terraserver2.asp"

<%
' http://shark/wms/terraserver.asp
strURL =3D "http://terraservice.net/ogcmap.ashx?"
'=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

Server.ScriptTimeout =3D 360
Const ForReading   =3D 1

strRequest =3D Request.ServerVariables("QUERY_STRING")

strRequest =3D ucase(strRequest)
pos =3D instr(strRequest,"REQUEST=3DGETCAPABILITIES")
if pos =3D 0 then pos =3D instr(strRequest,"REQUEST=3DCAPABILITIES")

if pos > 0 then
'-----------------------------------------------------
' Log Requests:
'-----------------------------------------------------
'    Dim fso, tf
    Set fso =3D CreateObject("Scripting.FileSystemObject")
    sFilname =3D "C:\Inetpub\wwwroot\wms\terraserver.xml"
    Set tf =3D fso.OpenTextFile(sFilname, ForReading)
    Do While Not tf.AtEndOfStream
	Response.Write tf.Readline & vbCrLf
    Loop
    set tf  =3D Nothing
    set fso =3D Nothing

else
    strRequest =3D replace(strRequest,".0","")
    strURL =3D strURL & strRequest
    Dim objHTTP 'As MSXML2.XMLHTTP
    Set objHTTP =3D Server.CreateObject("MSXML2.ServerXMLHTTP")
    objHTTP.open "GET", strURL, false
    objHTTP.send ""
    Response.BinaryWrite objHTTP.responseBody
    Set objHTTP =3D Nothing
end if

%>
------=_NextPart_000_082D_01C3DDC9.3748AAA0--




More information about the mapserver-users mailing list