[Mapserver-users] Cascading WMS Problem

Bart van den Eijnden bartvde at xs4all.nl
Mon Nov 10 14:21:08 EST 2003


Hi Andreas,

you're absolutely right, your layer name was correct (reading too quickly).

When I try to simulate your problem (with your mapfile) I get an error in 
the mapserver error file which says:

[Mon Nov 10 20:16:52 2003] [error] [client 127.0.0.1] Mon Nov 10 20:16:52 
2003 - msHTTPExecuteRequests(): HTTP request error. HTTP GET request failed 
with status 500 () for 
http://www.geoserver.nrw.de:80/GeoOgcWms1.3/servlet/BK50?SERVICE=WMS&VERSION=1.1.0&LAYERS=BK50%3ABodenkarte&FORMAT=image%2Fpng&TRANSPARENT=TRUE&STYLES=&REQUEST=GetMap&WIDTH=600&HEIGHT=600&SRS=EPSG:31466&BBOX=2500004.166667,5600004.166667,2504995.833333,5604995.833333&EXCEPTIONS=application/vnd.ogc.se_inimage

The strange thing is that when I use the URL directly in a browser I get a 
map.

Does anybody have an idea why Mapserver thinks it is a HTTP 500 status and 
not a 200 status which I get by using a sniffer directly on the GetMap URL?

Best regards,
Bart

On Mon, 10 Nov 2003 19:39:32 +0100, <andreas.mueller at bfua.de> wrote:

> Hi Bart,
>
> thanks for your quick reply!
> I don't think the layer name should be "BK50:Bodenkarte", because of two 
> reasons:
> 1. I tried it and it didn't work
> 2. I thought that I have to adress the layer name in my mapfile not the 
> layer name of the cascaded layer. the original name is in fact 
> BK50:Bodenkarte, but "my" layer name is "BK50". It works this way with 
> the otherserver (which is MapServer 3.6): The original layer's name is 
> "reference" and I call it "test" in my map file. When I request 
> "....&layers=test", it works.
>
> You are right, the external WMS sends  java.lang.NullPointerException, 
> which I added to my previous mail at No. 4 (sse far down below, if you 
> like).
>
> the question is: Is it my fault (2 stupid to correctly configure the MAP- 
> file) or is it a problem caused by the external WMS, which doesn't 
> respond properly to my (proper) requests.
>
> If you have any more ideas, I'd be thankful. Otherwise I'm gonna call the 
> admin of the external WMS tomorrow.
>
>
> Thanks a lot anyway
>
> Andreas
>
>
> On 10 Nov 2003 at 19:01, Bart van den Eijnden wrote:
>
> Date sent:      	Mon, 10 Nov 2003 19:01:07 +0100
> To:             	andreas.mueller at bfua.de, mapserver- 
> users at lists.gis.umn.edu
> Subject:        	Re: [Mapserver-users] Cascading WMS Problem
> Send reply to:  	bartvde at xs4all.nl
> From:           	Bart van den Eijnden <bartvde at xs4all.nl>
>
> Hi Andreas,
>
> in your request which results in an error your layer name is incorrect. 
> It should be BK50:Bodenkarte and not BK50. Perhaps your external WMS does 
> not return a nice exception in this case and returns a null-pointer 
> exception instead.
>
> Is this request from the mapserver logs? I think Mapserver should handle 
> the namespace kind of notation for layer names (like BK50:Bodenkarte), as 
> it is also used in the CITE conformance testing. But this I do not know 
> for sure.
> http://localhost/cgi- 
> bin/mapserv?map=d:/apache/apache/htdocs/itasca/demonrw2.map&REQUEST=GetM
> ap&BBOX=2500000,5600000,2505000,5605000&LAYERS=BK50&WIDTH=600&HEIG
> HT=600&EXCEPTION=INIMAGE&VERSION=1.1.0&STYLES=&SRS=EPSG:31466&S
> ERVICE=WMS
>
> Best regards,
> Bart
>
> On Mon, 10 Nov 2003 17:28:50 +0100, <andreas.mueller at bfua.de> wrote:
>
>> Hi,
>>
>> I'm trying to cascade an OGC WMS with MapServer 4.0 and I'm having some 
>> problems. We set up a test WMS with MapServer and everything worked 
>> fine. But when we tried to access the "real one" all we get is an error 
>> message.
>>
>> Can anybody give me a clue on how to set up the map file?
>> Or is it a problem of the "to be cascaded" server?
>>
>>
>> What we have:
>>
>> 1. Cascading OGC WMS which works fine:
>>
>> ...
>> LAYER
>> NAME "test"
>> TYPE RASTER
>> STATUS OFF
>> CONNECTION "http://myserver/cgi-bin/fnvref_wms?"
>> CONNECTIONTYPE WMS
>> METADATA
>> "wms_srs"             "EPSG:31466"
>> "wms_name"            "reference"
>> "wms_server_version"  "1.1.0"
>> "wms_formatlist"      "image/png,image/jpeg,image/wbmp"
>> "wms_format"          "image/png"
>> "wms_title"           "TEST_TITLE"
>> END
>> END
>> ...
>>
>> 2. Cascading OGC WMS which doesn't work:
>> ...
>> LAYER
>> NAME "BK50"
>> TYPE RASTER
>> STATUS ON
>> CONNECTION "http://www.geoserver.nrw.de:80/GeoOgcWms1.3/servlet/BK50?"
>> CONNECTIONTYPE WMS
>> METADATA
>> "wms_name"            "BK50:Bodenkarte"
>> "wms_server_version"  "1.1.0"
>> "wms_formatlist"      "image/png,image/jpeg,image/bmp"
>> "wms_format"          "image/png"
>> "wms_title"           "Geoserver Bodenkarte"
>> "wms_srs" "EPSG:31466 EPSG:31462 EPSG:31492 EPSG:31467 EPSG:25831 
>> EPSG:25832 EPSG:25833"
>> "wms_boundingbox" "EPSG:31466 2490637 5574425 2738496 5821724"
>> "wms_latlonboundingbox" "5.8686 50.3018 9.5103 52.4726"		
>> 	
>> END
>> END
>> ...
>>
>> 3. Request, which results in an error:
>> http://localhost/cgi-
>> bin/mapserv?map=d:/apache/apache/htdocs/itasca/demonrw2.map&REQUEST=GetM
>> ap&BBOX=2500000,5600000,2505000,5605000&LAYERS=BK50&WIDTH=600&HEIG
>> HT=600&EXCEPTION=INIMAGE&VERSION=1.1.0&STYLES=&SRS=EPSG:31466&S
>> ERVICE=WMS
>>
>>
>> 4. Error message of the cascaded server
>>
>> <head><title>Error: 500</title></head>
>> <body>
>> <h1>Error: 500</h1>
>> <h2>Location: /GeoOgcWms1.3/servlet/BK50</h2><b>Internal Servlet 
>> Error:</b><br>
>> <pre>java.lang.NullPointerException
>> 	at 
>> de.aedgraphics.geoogcwms.ogcwmsservlet.ServiceDispatcher.dispatch(ServiceDispatc 
>>
>>
>>
>>
>>
>> her.java:225)
>> 	at 
>> de.aedgraphics.geoogcwms.ogcwmsservlet.OgcWmsServlet.serviceRequest(OgcWms 
>>
>>
>>
>>
>>
>> Servlet.java:590)
>> 	at 
>> de.aedgraphics.geoogcwms.ogcwmsservlet.OgcWmsServlet.doGet(OgcWmsServlet.ja 
>>
>>
>>
>>
>>
>> va:469)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>> 	at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
>> 	at org.apache.tomcat.core.Handler.invoke(Unknown Source)
>> 	at org.apache.tomcat.core.Handler.service(Unknown Source)
>> 	at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
>> 	at org.apache.tomcat.core.ContextManager.internalService(Unknown 
>> Source)
>> 	at org.apache.tomcat.core.ContextManager.service(Unknown Source)
>> 	at 
>> org.apache.tomcat.modules.server.Ajp12Interceptor.processConnection(Unknown 
>>
>>
>>
>>
>>
>>
>> Source)
>> 	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
>> 	at 
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown 
>> Source)
>> 	at java.lang.Thread.run(Unknown Source)
>> </pre>
>> </body>
>>
>>
>> 5. Manual request, which renders a valid picture
>> http://www.geoserver.nrw.de/GeoOgcWms1.3/servlet/BK50?REQUEST=GetMap&VER
>> SION=1.1.0&SERVICE=WMS&BBOX=2500000,5600000,2505000,5605000&LAYERS
>> =BK50:Bodenkarte&STYLES=&SRS=EPSG:31466&WIDTH=600&HEIGHT=600&FOR
>> MAT=image/png
>>
>>
>> 5. Capabilities-File of the OGC WMS
>>
>> <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?> <!-- The 
>> DTD (Document Type Definition) given here must correspond to the version 
>> number declared in the WMT_MS_Capabilities element below. -->
>> <!DOCTYPE WMT_MS_Capabilities SYSTEM 
>> "http://www.digitalearth.gov/wmt/xml/capabilities_1_1_0.dtd"
>> [
>> <!-- other vendor-specific elements defined here -->
>> <!ELEMENT VendorSpecificCapabilities EMPTY>  ]>  <!-- end of DOCTYPE 
>> declaration -->
>>
>> <!-- The version number listed in the WMT_MS_Capabilities element here 
>> must correspond to the DTD declared above.  See the WMT specification 
>> document for how to respond when a client requests a version number not 
>> implemented by the server. -->
>>
>> <WMT_MS_Capabilities version="1.1.0" updateSequence="0">
>> <!-- Service Metadata -->
>> <Service>
>> <!-- The WMT-defined name for this type of service -->
>> <Name>OGC:WMS</Name>
>> <!-- Human-readable title for pick lists -->
>> <Title>AED MapServer, Projekt 'BK50'</Title>
>> <!-- Narrative description providing additional information --
>>>
>> <Abstract>WMT Map Server maintained by AED Graphics AG. Contact: 
>> info at aed-graphics.de.  High-quality maps conform to ALK norm.</Abstract>
>> <!-- Top-level web address of service or service provider.  See also 
>> OnlineResource
>> elements under <DCPType>. -->
>> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
>> xlink:href="http://www.aed-graphics.de"
>> xlink:type="simple" />
>> <!-- Contact information -->
>> <ContactInformation>
>> <ContactPersonPrimary>
>> <ContactPerson></ContactPerson>
>> <ContactOrganization></ContactOrganization>
>> </ContactPersonPrimary>
>> <ContactPosition></ContactPosition>
>> <ContactAddress>
>> <AddressType></AddressType>
>> <Address></Address>
>> <City></City>
>> <StateOrProvince></StateOrProvince>
>> <PostCode></PostCode>
>> <Country></Country>
>> </ContactAddress>
>> <ContactVoiceTelephone></ContactVoiceTelephone>
>> <ContactFacsimileTelephone></ContactFacsimileTelephone>
>> <ContactElectronicMailAddress></ContactElectronicMailAddress>
>> </ContactInformation>
>> <Fees>none</Fees>
>> <AccessConstraints>none</AccessConstraints>
>> </Service>
>> <Capability>
>> <Request>
>> <GetCapabilities>
>> <Format>application/vnd.ogc.wms_xml</Format>
>> <DCPType>
>> <HTTP>
>> <Get>
>> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
>> xlink:href="http://www.geoserver.nrw.de:80/GeoOgcWms1.3/servlet/
>> BK50"
>> xlink:type="simple" />
>> </Get>
>> <Post>
>> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
>> xlink:href="http://www.geoserver.nrw.de:80/GeoOgcWms1.3/servlet/
>> BK50"
>> 	     xlink:type="simple" />
>> </Post>
>> </HTTP>
>> </DCPType>
>> </GetCapabilities>
>> <GetMap>
>> <Format>image/png</Format>
>> <Format>image/bmp</Format>
>> <Format>image/jpeg</Format>
>> <Format>image/tiff</Format>
>> <DCPType>
>> <HTTP>
>> <Get>
>> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
>> xlink:href="http://www.geoserver.nrw.de:80/GeoOgcWms1.3/servlet/
>> BK50"
>> xlink:type="simple" />
>> </Get>
>> </HTTP>
>> </DCPType>
>> </GetMap>
>> <GetFeatureInfo>
>> <Format>text/html</Format>
>> <Format>text/plain</Format>
>> <DCPType>
>> <HTTP>
>> <Get>
>> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
>> xlink:href="http://www.geoserver.nrw.de:80/GeoOgcWms1.3/servlet/
>> BK50"
>> xlink:type="simple" />
>> </Get>
>> <Post>
>> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
>> xlink:href="http://www.geoserver.nrw.de:80/GeoOgcWms1.3/servlet/
>> BK50"
>> xlink:type="simple" />
>> </Post>
>> </HTTP>
>> </DCPType>
>> </GetFeatureInfo>
>> </Request>
>> <Exception>
>> <Format>application/vnd.ogc.se_xml</Format>
>> </Exception>
>> <Layer queryable="0" opaque="1">
>> <Title>BK50</Title>
>> <SRS>EPSG:31466 EPSG:31462 EPSG:31492 EPSG:31467 EPSG:25831 EPSG:25832 
>> EPSG:25833</SRS>
>> <LatLonBoundingBox minx="5.8686" miny="50.3018" maxx="9.5103" 
>> maxy="52.4726"></LatLonBoundingBox>
>> <BoundingBox SRS="EPSG:31466" minx="2490637.0" miny="5574425.0" 
>> maxx="2738496.0" maxy="5821724.0"></BoundingBox>
>> <BoundingBox SRS="EPSG:31462" minx="2490637.0" miny="5574425.0" 
>> maxx="2738496.0" maxy="5821724.0"></BoundingBox>
>> <BoundingBox SRS="EPSG:31492" minx="2490637.0" miny="5574425.0" 
>> maxx="2738496.0" maxy="5821724.0"></BoundingBox>
>> <BoundingBox SRS="EPSG:31467" minx="3276968.65" miny="5579108.66" 
>> maxx="3534726.6" maxy="5816047.82"></BoundingBox>
>> <BoundingBox SRS="EPSG:25831" minx="704216.0300000012" miny="5576562.48" 
>> maxx="941910.0500000007" maxy="5833989.26"></BoundingBox>
>> <BoundingBox SRS="EPSG:25832" minx="276982.98000000045" 
>> miny="5577320.65" maxx="534641.129999999" 
>> maxy="5814162.95"></BoundingBox>
>> <BoundingBox SRS="EPSG:25833" minx="-149791.3299999982" 
>> miny="5612627.92" maxx="127273.4299999997" 
>> maxy="5828222.05"></BoundingBox>
>> <ScaleHint min="0.138" max="69.053"></ScaleHint>
>> <Layer queryable="1" opaque="1">
>> <Name>BK50:Bodenkarte</Name>
>> <Title>Bodenkarte</Title>
>> </Layer>
>> </Layer></Capability>
>> </WMT_MS_Capabilities>
>>
>>
>>
>>
>>
>> Thanks in advance
>>
>> Andreas
>>
>>
>
>
>



-- 
 



More information about the mapserver-users mailing list