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

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

问题描述

所以我遇到了一个我正在努力解决的问题.也许某些 Flex 专家可以提供帮助?

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

我有一个 WebService 实例,它尝试从我们的 JBoss 应用程序服务器加载 WSDL 文件.如果我这样做:

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();

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

everything works fine. The WSDL is loaded successfully and the application can invoke methods against the web service.

问题是当我需要添加一些 HTTP 身份验证时:

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

webService.setCredentials(userName, password);

此行最终抛出一个错误,指出凭据仅在 HTTPS 上受支持.好吧,反正我想使用安全的 HTTPS!

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();

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

and now the WebService instance cannot load the WSDL. The error received is:

[FaultEvent fault=[RPC Fault faultString="HTTP 请求错误" faultCode="Server.Error.Request" faultDetail="无法加载 WSDL.如果当前在线,请验证 WSDL 的 URI 和/或格式 (https://<removed>/services/ApiService?wsdl)"] messageId="6905CC5B-5317-C4B3-2D12-84647EE648A7" type="fault" bubbles=false cancelable=true eventPhase=2]

[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]

我可以在浏览器中正常访问此 URI,并且它按预期返回 WSDL.

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

我不是 Flex 人(学习),而是一名 Java 开发人员.我正在尝试将 Flex 作为我们系统的潜在客户,但今天这给我带来了各种各样的悲伤.谷歌似乎没有给我任何快速答案,我有点难住了.

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.

关于 StackOverflow 的第一个问题,所以希望这能在某个地方得到启发,并帮助其他一些可怜的 Java 开发人员在周五晚上在办公室呆到很晚:-)

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 :-)

推荐答案

似乎与您的问题有关.我们计划在未来使用 https,所以我很想知道您的问题的解决方案.

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天全站免登陆