弹性+ 伙计+ WebServiceInvoker :根据 FlashVars 更改 WSDL
我有一个 Mate 项目,在 EventMap 中有一个 WebService 标记实例(我在各种事件处理程序中使用它)。 我非常希望能够通过 flashvars 设置 WebService 的 wsdl 属性,但我不完全确定在哪里或如何做到这一点。
我知道我可以通过 Application.application.parameters 集合访问 flashvars,但在 WebService 的加载事件期间我似乎无法访问 Application 实例...
我怀疑有一些微妙的东西或明显明显的东西我我设法忽略:(
I have a Mate project with a WebService tag instance in the EventMap (which I'm using within various event handlers). I'd quite like to be able to set the wsdl property of the WebService via flashvars, but I'm not entirely sure where or how I could do that.
I know I can access flashvars via the Application.application.parameters collection, but I don't seem to have access to the Application instance during the load event of the WebService...
I suspect there's either something subtle or something blatantly obvious that I'm managing to overlook :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
部分原因是我没有将参数放入index.template.html的正确部分(如果一切正常,则调用的是第二部分,而不是第一部分),部分原因是我误解了应用程序的行为和WebService 类(为什么哦,为什么它不缓存 wsdl?)
我最终在事件映射实例上添加了一个可绑定的公共变量,然后在主应用程序的creationComplete 处理程序中设置该变量。 我可能可以完全在事件地图内完成此操作,但会更加复杂一些。
Partly this was due to me not putting the parameter in the correct section of index.template.html (if everything's fine, it's the SECOND section that gets called, not the first), and partly it was my misunderstanding the behaviour of the Application and WebService classes (why oh why does it not cache the wsdl?)
I ended up adding a bindable public variable on the event map instance, then setting that variable in the creationComplete handler of the main application. I could probably have done this entirely within the event map, but it would have been a little more convoluted.