WMS Layer with User/Password not showing

2841
1
06-25-2014 03:35 AM
LukasKalt
New Contributor II
Hi

I wanna add a WMS Layer which has user/password Authentification. When the flag skipCapabilities is false I get this error message:
TypeError: Error #1080: Illegal value for namespace.
            at Function/com.esri.ags.layers:WMSLayer/private:loadCapabilities/com.esri.ags.layers:myResultFunction()
            at mx.rpc::AsyncResponder/result()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/rpc/src/mx/rpc/AsyncResponder.as:103]
            at mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyResult()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/rpc/src/mx/rpc/AsyncToken.as:247]
            at mx.rpc.events::ResultEvent/http://www.adobe.com/2006/flex/mx/internal::callTokenResponders()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/rpc/src/mx/rpc/events/ResultEvent.as:215]
            at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as:275]
            at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as:1006]
            at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as:326]
            at mx.rpc::Responder/result()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/rpc/src/mx/rpc/Responder.as:64]
            at mx.rpc::AsyncRequest/acknowledge()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/rpc/src/mx/rpc/AsyncRequest.as:92]
            at DirectHTTPMessageResponder/completeHandler()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/rpc/src/mx/messaging/channels/DirectHTTPChannel.as:459]
            at flash.events::EventDispatcher/dispatchEventFunction()
            at flash.events::EventDispatcher/dispatchEvent()
            at flash.net::URLLoader/onComplete()


When skipCapabilities is true, the map is blank. But I can see with Fiddler (tool where you can capture requests sent from your PC), that requests are sent to the WMS server. When I manually try these requests with the browser, I get an image of the map. Why isn't it shown in the Flex Application?

Thanks for your help
Tags (2)
0 Kudos
1 Reply
LukasKalt
New Contributor II

If someone has the same problem, i found a workaround.

The problem was, that with the authentification enabled, the flex API sends the request with POST. It seems that the WMS service can't handle that. So i implemented an HTTP Handler in .NET. In there i send the request with GET and not with POST. Set the proxyUrl property that it calls the HTTP handler and then it works.

0 Kudos