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.
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;
}
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()"
Can someone tell me what I am doing wrong here, or if there is a better way to swap wsdl locations?