问题描述
我使用Flash Builder的4.5功能自动为给定的SOAP服务生成代理类.除了WSDL URL硬编码到自动生成的代理类中之外,其他所有东西都正常工作.
I used Flash Builder's 4.5 capability to auto generate a proxy class for a given SOAP service. Everything works fine and dandy, except for the fact that the WSDL url is hardcoded into the auto-generated proxy class.
现在,当我将Flex应用程序部署到生产服务器上时,我想更改SOAP服务的路径,该路径将从配置文件中获取.服务的内部原理将完全相同.在下面的代码片段中,我尝试在自动生成的代理的子类中手动交换wsdl url,这是Adobe推荐的方法...
Now, when I deploy the Flex app onto the production server, I want to change the path of the SOAP service, which will be obtained from a config file. The internals of the service will be exactly the same. In the code snippet below, I try to swap wsdl url manually in a subclass of the auto-generated proxy which is Adobe's recommended approach...
/**
* Override super.init() to provide any initialization customization if needed.
*/
protected override function preInitializeService():void
{
super.preInitializeService();
// Initialization customization goes here
super.wsdl = "http://s174667r2ycj0l1/mscviewer/MySecretService.asmx?wsdl";
super.useProxy = false;
}
但是,我总是收到以下错误:"[RPC Fault faultString =您必须使用useProxy设置为false的情况下指定WSDL位置." faultCode ="Client.WSDL" faultDetail ="null"]在mx.rpc.soap :: WebService/loadWSDL()"
However, I always get the following error: "[RPC Fault faultString="You must specify the WSDL location with useProxy set to false." faultCode="Client.WSDL" faultDetail="null"]at mx.rpc.soap::WebService/loadWSDL()"
有人可以告诉我我在这里做错了什么吗,或者是否有更好的方法来交换wsdl位置?
Can someone tell me what I am doing wrong here, or if there is a better way to swap wsdl locations?
推荐答案
- 转到.model文件夹放入您的flex项目包中,然后打开.fml文件
- 更改wsdl的uri
当我要部署fb项目时,我这样做了,因为adobe没有有关此的信息.
I do that when i want to deploy my fb projects because adobe does not have information about this.
.sorry for my english:)
.sorry for my english :)
这篇关于更改Flex 4.5自动生成的服务代理类的WSDL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!