用于动态 wsdl 位置的 Flash Builder 4 Web 服务自省
在 Flex 3 中,内省 Web 服务产生了一个构造函数,该构造函数允许 Web 服务的位置在运行时更改。 Web 服务自省工具现在似乎只允许在 WS 向导中指定的单个 WSDL URI。是这样还是我只是错过了什么?
Flex 3 内省服务将创建一个具有以下构造函数签名的服务类:
private var service:MyWebService;
service= new MyWebService(null, wsdlLocation); // With parameters
或者您可以使用:
service = new MyWebService(); //with no parameters
在 Flex 4 中,您似乎只能使用:
service = new MyWebService();
因此,如果您直到运行时才知道 Web 服务器位置,我是否会需要手动重写内省/生成的 _super_MyWebService.as 类,以便恢复在运行时指向不同服务器的能力?
有人知道为什么这种情况发生了变化,或者 Flash Builder 4 Web 服务自省工具用于动态服务器的“新”方式是什么?
In Flex 3, introspecting a web service resulted in a constructor that allowed the location of the web service to change at runtime. It appears that the Web Service introspection tool now only allows the single WSDL URI that was specified in the WS Wizard. It this the case or am I just missing something?
Flex 3 introspected services would create a service class with the following constructor signatures:
private var service:MyWebService;
service= new MyWebService(null, wsdlLocation); // With parameters
or you could use:
service = new MyWebService(); //with no parameters
In Flex 4, it appears that you can only use:
service = new MyWebService();
So if you don't know the web server location until runtime, am I going to need to manually override the instrospected/generated _super_MyWebService.as class in order to get back the ability to point to different servers at runtime?
Anyone know why this has changed, or what the "new" way the Flash Builder 4 web service introspection tool uses for dynamic servers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 Adobe 论坛上找到了这个问题的解决方案。
解决方案是在创建服务后设置 wsdl 属性:
应该注意的是,使用 Flash Builder 4 Web 服务自省工具将自动填充超类中的 wsdl 位置。根据 Adobe 论坛上的帖子,有必要删除超类中的 wsdl 位置,否则该值将不会重置。
I found a solution to this question on the Adobe Forums.
The solution is to set the wsdl property once your service is created:
It should be noted that using the Flash Builder 4 web service introspection tool will automatically populate the wsdl location in the superclass. According to the post on Adobe Forums, it is necessary to remove the wsdl location in the superclass or the value will not get reset.