So, I have a problem I'm trying to work with. Perhaps some flexible guru can help?
I have an instance of WebService that is trying to download a WSDL file from our JBoss application server. If I do something like this:
webService = new WebService();
webService.destination = WebService.DEFAULT_DESTINATION_HTTP;
webService.wsdl = "http://<removed>/services/ApiService?wsdl";
webService.loadWSDL();
everything is working fine. WSDL loads successfully, and the application may call methods against the web service.
The problem is when I need to add HTTP authentication to the mix:
webService.setCredentials(userName, password);
this line ends up with an error indicating that credentials are only supported on HTTPS. Ok, right, I want to use secure HTTPS anyway!
So, I tried changing it to this ...
webService = new WebService();
webService.destination = WebService.DEFAULT_DESTINATION_HTTPS;
webService.wsdl = "https://<removed>/services/ApiService?wsdl";
webService.setCredentials(userName, password);
webService.loadWSDL();
and now the WebService instance cannot load the WSDL. Received error:
[FaultEvent fault = [RPC faultString = " HTTP-" faultCode = "Server.Error.Request" faultDetail = " WSDL. , , URI / WSDL ( https://<removed> /services/ApiService?wsdl)" ] messageId = "6905CC5B-5317-C4B3-2D12-84647EE648A7" type = "fault" bubbles = false cancelable = true EventPhase = 2]
URI , WSDL, .
Flex (), Java. Flex , . Google , .
StackOverflow, , - Java- : -)