开发者

Flash Builder 4 Web Service Introspection for dynamic wsdl location

开发者 https://www.devze.com 2023-01-21 20:38 出处:网络
In Flex 3, introspecting a web service re开发者_StackOverflowsulted in a constructor that allowed the location of the web service to change at runtime.It appears that the Web Service introspection too

In Flex 3, introspecting a web service re开发者_StackOverflowsulted 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?


I found a solution to this question on the Adobe Forums.

The solution is to set the wsdl property once your service is created:

var service:MyWebService = new MyWebService();
service.wsdl = "location to the wsdl";

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消