Webservice.wsdl和凭证 [英] Webservice.wsdl and credentials

查看:252
本文介绍了Webservice.wsdl和凭证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我正在努力解决一些问题。也许一些Flex的大师可以协助?我有一个WebService实例,试图从我们的JBoss应用服务器加载一个WSDL文件。如果我做这样的事情:

  webService = new WebService(); 
webService.destination = WebService.DEFAULT_DESTINATION_HTTP;
webService.wsdl =http://< removed> / services / ApiService?wsdl;
webService.loadWSDL();

一切正常。 WSDL被成功加载,应用程序可以调用针对Web服务的方法。



问题是当我需要为混合添加一些HTTP认证:

  webService.setCredentials(userName,password); 

这行最后引发了一个错误,指出凭据只在HTTPS上受支持。好吧,我想要使用安全的HTTPS!

然后,我试图改变它...

  webService = new WebService(); 
webService.destination = WebService.DEFAULT_DESTINATION_HTTPS;
webService.wsdl =https://< removed> / services / ApiService?wsdl;
webService.setCredentials(userName,password);
webService.loadWSDL();

现在WebService实例无法加载WSDL。收到的错误是:

lockquote
https://< remove> / services / ApiService?wsdl )] messageId =6905CC5B-5317-C4B3-2D12-84647EE648A7type =faultbubbles = false cancelable = true eventPhase = 2]


我可以在浏览器中找到这个URI,并且按照预期返回WSDL。



我不是一个Flex人(学习),而是一个Java开发人员。我正在尝试Flex作为我们系统的潜在客户,但是这导致了我今天的各种悲伤。谷歌似乎没有任何快速的答案对我来说,我有点难倒。

第一个问题在StackOverflow,所以希望这得到一个咬一口,并帮助一些其他穷人Java开发周末晚上在办公室呆了: - )

解决方案

这个似乎与你的问题有关。我们计划在将来使用https,所以我很想知道你的问题的解决方案。


So I've got a bit of an issue I'm trying to work through. Perhaps some Flex guru could assist?

I have a WebService instance that attempts to load 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 works fine. The WSDL is loaded successfully and the application can invoke methods against the web service.

The issue is when I need to add some HTTP authentication to the mix:

webService.setCredentials(userName, password);

this line ends up throwing an error stating that credentials are only supported on HTTPS. Ok fair enough, I want to use secure HTTPS anyway!

So then I tried to change it up 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. The error received is:

[FaultEvent fault=[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (https://<removed>/services/ApiService?wsdl)"] messageId="6905CC5B-5317-C4B3-2D12-84647EE648A7" type="fault" bubbles=false cancelable=true eventPhase=2]

I can reach this URI in the browser just fine and it returns the WSDL as expected.

I am not a Flex guy (learning) but instead a Java developer. I am trying out Flex as a potential client to our system but this has caused me all kinds of grief today. Google doesn't appear to have any quick answers for me and I am a bit stumped.

First question on StackOverflow so hopefully this gets a bite somewhere and helps some other poor Java dev staying late in the office on a Friday night :-)

解决方案

This seems to be related to your question. We are planning to use https in the future, so I'm curious to know the solution of your problem.

这篇关于Webservice.wsdl和凭证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆