Does anyone in the MapServer Dev. community want to respond to this? I *think* the implication here is that a vanilla MapServer "GetCapabilities" request is not conforming to spec.<br><br>Roger<br>--<br><br><div class="gmail_quote">
---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Tom Gaskins</b> <span dir="ltr"><<a href="mailto:tom@tomgaskins.com">tom@tomgaskins.com</a>></span><br>Date: Sun, Nov 8, 2009 at 9:21 PM<br>
Subject: Re: World Wind and Map Server<br>To: Roger André <<a href="mailto:randre@gmail.com">randre@gmail.com</a>><br>Cc: David Collins <<a href="mailto:paul.collins@nasa.gov">paul.collins@nasa.gov</a>><br><br>
<br><div style=""><div>Roger, Thanks for clarifying, but I think I may still be confused. WMS defines two primary requests, GetCapabilities and GetMap. The first one requests the metadata associated with the server and each of the layers it serves. The second requests a map, always in the form of a raster. Reading your most recent mail, it seems you're expecting the GetCapabilities request to return a particular map. Is this correct? I'm also confused because the request you show that you'd like to specify to the demo's layer manager doesn't meet the definition of a valid WMS end point, which should be simply a host address and not contain a query string (elements after the question mark). The query string is exclusively for WMS parameters, which the WWJ demo fills in when sending the request. I've included the relevant text from the WMS spec below.</div>
<div><br></div><div>I can understand that mapserver may have its own request protocol, but the demo you're using is meant to work with only conforming WMS servers. It's certainly possible for WWJ to visualize data from servers using other protocols, and many applications do that. We'd be more than happy to help you determine the best way to interact with mapserver. The demo you're trying to use, though, isn't intended to to that.</div>
<div><br></div><div>Thanks,</div><div>Tom</div><div><br></div><div style="margin: 0px;"><b>6.3.3<span style="white-space: pre;"> </span>HTTP GET</b></div><div style="margin: 0px;">A Web Map Service shall support the "GET" method of the HTTP protocol (IETF RFC 2616).</div>
<div style="margin: 0px;">An Online Resource URL intended for HTTP GET requests is in fact only a URL prefix to which additional parameters are appended in order to construct a valid Operation request. A URL prefix is defined in accordance with IETF RFC 2396 as a string including, in order, the scheme ("http" or "https"), Internet Protocol hostname or numeric address, optional port number, path, mandatory question mark '?', and optional string comprising one or more server-specific parameters ending in an ampersand '&'. The prefix defines the network address to which request messages are to be sent for a particular operation on a particular server. Each operation may have a different prefix. Each prefix is entirely at the discretion of the service provider.</div>
<div style="margin: 0px;">This International Standard defines how to construct a query part that is appended to the URL prefix in order to form a complete request message. Every WMS operation has several mandatory or optional request parameters. Each parameter has a defined name. Each parameter may have one or more legal values, which are either defined by this International Standard or are selected by the client based on service metadata. To formulate the query part of the URL, a client shall append the mandatory request parameters, and any desired optional parameters, as name/value pairs in the form "name=value&" (parameter name, equals sign, parameter value, ampersand). The '&' is a separator between name/value pairs, and is therefore optional after the last pair in the request string.</div>
<div style="margin: 0px;">When the HTTP GET method is used, the client-constructed query part is appended to the URL prefix defined by the server, and the resulting complete URL is invoked as defined by HTTP (IETF RFC 2616).</div>
<div style="margin: 0px;">Table 2 summarizes the components of an operation request URL when HTTP GET is used.</div><div style="margin: 0px;"><b>Table 2 — Structure of WMS request using HTTP GET</b></div><div style="margin: 0px;">
<b>6.3.4<span style="white-space: pre;"> </span>HTTP POST</b></div><div style="margin: 0px;">A Web Map Service may support the "POST" method of the HTTP protocol (IETF RFC 2616).</div><div style="margin: 0px;">An Online Resource URL intended for HTTP POST requests is a complete URL (not merely a prefix as in the HTTP GET case) that is valid according to IETF RFC 2396 to which clients transmit request parameters in the body of the POST message. A WMS shall not require additional parameters to be appended to the URL in order to construct a valid target for the operation request. When POST is used, the request message is formulated as an XML document.</div>
<div style="margin: 0px;"><b>URL Component</b></div><div style="margin: 0px;"><b>Description</b></div><div style="margin: 0px;"><a href="http://host%5B%3Aport%5D/path%5B?%7Bname%5B=value%5D&%7D%5D" target="_blank">http://host[:port]/path[?{name[=value]&}]</a></div>
<div style="margin: 0px;">URL prefix of service operation. [ ] denotes 0 or 1 occurrence of an optional part; {} denotes 0 or more occurrences.</div><div style="margin: 0px;">name=value&</div><div style="margin: 0px;">
One or more standard request parameter name/value pairs as defined for each operation by this International Standard.</div><div><div></div><div class="h5"><div><div>On Nov 8, 2009, at 12:29 PM, Roger André wrote:</div><br>
<blockquote type="cite">Hi Tom,<br><br>Problem is pretty simple to describe actually. One of the executives at my company found this page, <a href="http://worldwind.arc.nasa.gov/java/demos/" rel="nofollow" target="_blank"><span>http://worldwind.arc.nasa.</span><span></span>gov/java/demos/</a>, and decided to try out the WMS Layer manager example, <a href="http://worldwind.arc.nasa.gov/java/demos/WMSLayerManager.jnlp" target="_blank">WMSLayerManager.jnlp</a>. He liked the various layers that were available, and asked me if it would be possible to view some of our MapServer WMS layers that I publish internally. We spent a couple hours trying to figure out what URL WWJ needed, and finally determined that it needed a full GetCapabilities URL. This URL for MapServer look like this:<br>
"<a href="http://10.10.10.143/cgi-bin/mapserv?map=/var/www/mapfiles/precip/precip.map&REQUEST=GetCapabilities&SERVICE=WMS&" target="_blank">http://10.10.10.143/cgi-bin/mapserv?map=/var/www/mapfiles/precip/precip.map&REQUEST=GetCapabilities&SERVICE=WMS&</a>".<br>
<br>However, this URL does not work in WWJ. When I checked the server logs to see whether WWJ was actually trying to connect to my WMS, I found that the request it sends is truncated, and looks like this:<br>10.10.10.143 - - [05/Nov/2009:09:51:37 -0800] "GET /cgi-bin/mapserv?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS& HTTP/1.1" 200 539 "-" "Java/1.6.0_07".<br>
<br>As you can see, the "map" parameter, which is crucial for MapServer, has been completely stripped out of the request. Without this, "map=/var/www/mapfiles/precip/precip.map" paremeter, there is no way for MapServer to determine which map to serve.<br>
<br>Hope that helps,<br><br>Roger<br>--<br>
<br><div class="gmail_quote">On Sat, Nov 7, 2009 at 10:17 AM, Tom Gaskins <span dir="ltr"><<a href="mailto:tom@tomgaskins.com" target="_blank">tom@tomgaskins.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Roger, I was sent a copy of your mapserver-list message describing a problem you're having connecting to map server from WWJ. But the message seems to be saying that you're entering a GetCapabilities URL and expecting that to generate a GetMap request to the server. Would you please tell me what the situation is and what you're trying to do. We almost never have problems connecting to conforming WMS servers.<br>
Thanks<br><font color="#888888">
Tom<br>
</font></blockquote></div><br>
</blockquote></div><br></div></div></div></div><br>