[Mapserver-users] Cascading WMS Problem

Doug Cates doug at moximedia.com
Mon Nov 10 10:05:15 PST 2003


Hi,

Try it with just a single wms_srs, and set the layer's projection if
different from the map.

Doyug

On Mon, 2003-11-10 at 08:28, 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