使用 blazeds 在 java 和 Flex 之间连接返回错误 #2048

发布于 2024-11-05 09:58:43 字数 386 浏览 1 评论 0原文

我一直在开发一个应用程序(更准确地说是一个网站),它由一个灵活的前端组成,该前端不断地从用java编程的后端发送和接收数据。两个组件之间的连接是通过闪耀完成的。当我在本地运行它时,这工作得很好,但是当我将应用程序的两侧上传到 tomcat 服务器(在线)时,当组件之间发生连接时,会返回以下错误:

Channel.Security.Error error Error #2048 
url:'http://localhost:8080/blazeds/messagebroker/amf'

我已经阅读了有关此错误的信息,并且许多在不同服务器之间建立连接时似乎会出现此错误,与此处不同,连接发生在同一服务器内。

谁能告诉我我能做些什么来解决这个问题。

提前致谢

I have been developing an application(a website to be more precise) which consists of a flex front end which is constantly sending and receiving data from the back end which is programmed in java. The connection between the two components is being done through blazeds. This worked fine while I was running it locally, however when I uploaded both sides of the application to a tomcat server(online) the following error is being returned when a connection between the components should occur:

Channel.Security.Error error Error #2048 
url:'http://localhost:8080/blazeds/messagebroker/amf'

I have read around about this error and many seem to getting this error when making connections between different servers, unlike here, where the connection is occurring within the same server.

Could any one enlighten me as to what I can do in order to solve this issue.

Thanks In advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

木格 2024-11-12 09:58:43

我假设您不再在 localhost 上运行。该错误确实表明您的 Flex 应用程序正在尝试从与加载它的域不同的域联系您的服务。如何在 services-config.xml 文件中进行配置?端点 url 应该类似于...

http://{server.name}:{server.port}/{context.root}/messagebroker/amf

...带有括号。然后它将替换您正在运行的值,而不是硬编码的值。

I'm assuming that you are no longer running on localhost. That error is indeed saying that your flex app is trying to contact your services from a different domain than the one it was loaded from. How do you have things configured in your services-config.xml file? The endpoint url should be something like...

http://{server.name}:{server.port}/{context.root}/messagebroker/amf

...with the brackets. It will then substitute the values that you are running from, rather than something hard coded.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文