PDA

View Full Version : How to point to a backup server from flex


saha ch
03-02-2010, 05:45 PM
I have two servers one primary and other backup and using webservices to communicate with the servers from Flex. So i have two wsdl's one for each of them. Initially i need to point to the primary and if there is any problem with this server i need to point to the backup. How do i achieve this from Flex. I am using proxy service and defined a destination and have the wsdl in proxy-config.xml. My code is as below.

primary wsdl
http://serverqa1.aap.com:81/SoapService.svc?wsdl

backup wsdl
http://serverqa2.aap.com:81/SoapService.svc?wsdl
<mx:WebService
id="webServiceQSList"
service = "SoapService"
port = "BasicHttpBinding_SOAPService"
destination="genesysWS" showBusyCursor="false"
useProxy="true" >
<mx:operation name="GetUnitsStatistics" resultFormat="object"
fault="mx.controls.Alert.show(event.fault.faultString)"
result="showQAListResult(event)">
<mx:request>
<unitNames>{arrCollection}</unitNames>
</mx:request>
</mx:operation>
</mx:WebService>

My proxy-config has

<destination id="genesysWS">
<properties>
<wsdl>http://serverqa1.aap.com:81/SoapService.svc?wsdl</wsdl>
<soap>*</soap>
</properties>
<adapter ref="soap-proxy"/>
</destination>