Я пытаюсь вызвать веб-сервис с использованием прокси.Мои настройки прокси-конфигурации на стороне Blazeds приведены ниже:
<destination id="ws-catalog">
<properties>
<wsdl>http://feeds.adobe.com/webservices/mxna2.cfc?wsdl</wsdl>
<soap>*</soap>
</properties>
<adapter ref="soap-proxy"/>
</destination>
На стороне Adobe AIR мой код:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationComplete="loadConfiguration()">
<s:layout>
<s:VerticalLayout/>
</s:layout>
<fx:Script>
<![CDATA[
import mx.messaging.ChannelSet;
import mx.messaging.channels.AMFChannel;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
[Bindable]
private var cs:ChannelSet;
private function loadConfiguration():void
{
var amfChannel:AMFChannel = new AMFChannel("my-amf", 'http://localhost:8400/messagebroker/amf');
cs = new ChannelSet();
cs.addChannel(amfChannel);
}
protected function ws_resultHandler(event:ResultEvent):void
{
var obj:Object = event.result;
}
protected function ws_faultHandler(event:FaultEvent):void
{
var faultObj:Object = event.fault;
}
protected function button1_clickHandler(event:MouseEvent):void
{
ws.getOperation('getFeeds').send();
}
]]>
</fx:Script>
<fx:Declarations>
<s:WebService id="ws"
channelSet="{cs}"
useProxy="true"
destination="ws-catalog"
showBusyCursor="true"
result="ws_resultHandler(event)"
fault="ws_faultHandler(event)"
/>
</fx:Declarations>
<s:Button label="CallWebService" click="button1_clickHandler(event)"/>
</s:WindowedApplication>
Но теперь, когда я запускаю свое приложение AIR,получаю следующее сообщение об ошибке:
faultCode: InvokeFailed
faultDetail: Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (null)
faultString: [MessagingError message='Destination 'ws-catalog' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']
Может ли кто-нибудь мне помочь ИЛИ указать на подобное решение?Благодаря.