Secure WMS over HTTPS

3991
5
03-07-2012 04:49 PM
WillHughes1
Occasional Contributor II
Not sure how to format a secure wms in the Flex Viewer v. 2.5.

The layer tag in the config looks like this:

<layer label="POIS" type="wms" visible="true" alpha="1.0" visibleLayers="Hospitals" version="1.3.0" skipGetCapabilities="true"    
   url="https://giswebservername/services/maps/WMS?SERVICE=WMS&request=GetCapabilities&version=1.3.0" /> 

This error message pops up below.

Map Manager Message
layer failed to load: Fault code: Channel.Security.Error
Fault info: Security error accessing url
Fault details: Destination: DefaultHTTPS

I can connect to this wms in ArcCatalog.

What am I doing wrong?

Thanks.

-Will
Tags (2)
0 Kudos
5 Replies
NeilMartinko
New Contributor II
I just recently started with Flex, so I'm not too experienced, but I'll give it a shot.

First off, your URL looks incorrect...
url="https://giswebservername/services/maps/WMS?SERVICE=WMS&request=GetCapabilities&version=1.3.0"

You have too much stuff in it.  Delete everything past the question mark.  Especially the "request=GetCapabilities"...  That requests an XML file of what the WMS can supply, not an image.  I think the Flex app adds the service= and version= and other stuff to request the image it needs.  That's why you have...
type="wms" visibleLayers="Hospitals" version="1.3.0"

...in the layer definition.

Second, I have no idea if it can do WMS over HTTPS.  I'd try making it work with standard HTTP first, then try HTTPS if I really wanted it.
0 Kudos
WillHughes1
Occasional Contributor II
I forgot to mention in the original post that PKI is enabled as well as SSL. Thanks. It looks like the default behavior of the flex viewer doesn't recognize when a wms is PKI enabled because it doesn't ask for my certificate when I load the viewer.

-Will
0 Kudos
DasaPaddock
Esri Regular Contributor
0 Kudos
WillHughes1
Occasional Contributor II
Has anyone out there figured out how to insert secured wms (AFW-WEBS) into the flexviewer? I can see the wms services from within ArcCatalog, however, the services don't display in the flexviewer. I am pretty sure this is due the wms security since a certificate is required in order to view the services. Initially on load of my flexviewer (on my server)  there is a prompt for certificate, however, the flexviewer doesn't prompt for a certificate on loading the secure wms. Is there a way to force trigger prompt for certificate when reading in the secure wms?
0 Kudos
DasaPaddock
Esri Regular Contributor
Does it prompt for the client certificate in browsers other than IE?

At the bottom of this page is a workaround for IE that you could try adapting for your WMS server:
http://resources.arcgis.com/en/help/flex-api/concepts/index.html#/Secured_services/017p0000000900000...
0 Kudos