I am trying to save some bandwidth and include wsdl file in my flex/air application. Which url format should I use in order to load that file instead of the remote one.
I am using loadWSDL() method.
EDIT: wsdl file needs to be part of the application. I know I can use file://some/path for local files, but don’t know how to load file which is inside application itself.
If the file is local, just use the file URI scheme:
file://host/path/file.wsdlIf this doesn’t work, check if the security sandbox features are blocking it.
In AIR apps, in order to access files in the application’s temporary storage directory or the application’s own directory, you need to use special
app:orapp-storage:URL schemes, though.Like dirkgently said, you can always embed the file into the application, but as far as I know, you then won’t be able to modify it afterwards in a persistent manner since it’s not just a file in the filesystem. Probably the best option for you is to embed this file and if you later need to update it, have the app save an updated version into the
File.applicationStorageDirectory(which you would then always check first before using the default embedded version.) Although I have no idea if using embedded XML files with the WebService classes is even possible.See this article for info on how to embed external XML files into your app. This is how I’ve done it: