WMS: Blank image returned, Feature Count: 0

2767
1
05-26-2011 01:39 PM
by Anonymous User
Not applicable
Original User: yohanb

I'm trying out the ArcGIS API for Flex sample called WMS Layers on/off

I already have a MapService with the WMS capability running in my ArcGIS Server 10 SP2 and tried replacing the URL in the sample with my own, as a test. My URL looks like this:

http://AZIVMYOHAN01:8399/arcgis/services/POC_BROMONT_THREE_LAYERS/MapServer/WMSServer?EXCEPTIONS=INIMAGE

My service is started and I also see it in my rest/services page

So when I run the sample with only this modification, the only thing the server sends back are blank images of the width and height specified by the WMS GetMap request.

I spent hours trying to figure out what's wrong, I've inspected the log files in verbose mode (using Eclipse's LogViewer plugin for highlighting) and there's isn't any error . The server says it's successful in serving the binary request but always ends up with a result of 5673 bytes, which is a black png of size 1380x730.

On the rest services page is says the EPSG is 3395, so I also tried forcing the CRS to 3395 in the WMS request sent from the sample code to match since otherwise it was sending 4326. It didn't help.

When I add my service in ArcGIS Explorer, as a test, the layers are displayed properly. Although they are displayed as one (I can't turn on/off specific layers).

I'm hoping someone could give me a clue or tip on how I could figure out why the server is returning blank images. I'm out of ideas. One thing I have noticed in the logs, is that the Feature Count is 0. If that is the reason why the images are blank, then the question is: why is it 0?

I have included a log excerpt, the XML returned for the GetCapabilities request, a screenshot of my rest services page and a screenshot of the GetMap query sent.

Thanks
0 Kudos
1 Reply
by Anonymous User
Not applicable
Original User: yohanb

Ok I've finally been able to see something, it appears the problem is with the extent. Even when I tried to force EPSG:3395 the WMS request was still using a BBOX value for another EPSG. I had not noticed. I tried forcing an extent as well and the layers finally displayed, feature count is now ok too. I added this in <esri:Map>:

<esri:extent>
<esri:Extent xmin="-8100949.5328330025" ymin="5634733.364931424" xmax="-8083915.623765184" ymax="5642782.006028707">
         <esri:SpatialReference wkid="3395" />
</esri:Extent>
</esri:extent>

I'm confused as to why the WMS GetCapabilities request says that CRS:84 and EPSG:4326 are also available, when it appears they are not.
0 Kudos