Copy link to clipboard
Copied
Hi,
Is it possible to call WCF service with flash CS5.
Regards------Amit
Copy link to clipboard
Copied
I am trying this with the following code
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.remoting.RemoteObject;
import mx.rpc.soap.*;
import mx.rpc.soap.*;
import flash.events.Event;
import mx.messaging.channels.StreamingAMFChannel;
var wcfProxy:RemoteObject= new RemoteObject( "GenericDestination" );
wcfProxy.source = "http://Domain.org/Service.svc?wsdl";
wcfProxy.addEventListener( ResultEvent.RESULT, gotResult );
wcfProxy.addEventListener( FaultEvent.FAULT, gotError );
var arg1:Number=5;
var arg2:Number=7;
var user:String="test";
var opList:String= "a";
function calculate(e:Event)
{
wcfProxy.logOn(user,user);
}
function gotResult( event:ResultEvent ):void
{
trace("The Vlue is = "+event.result.toString());
}
function gotError(event:FaultEvent):void
{
trace("Error is = "+event)
}
sndBtn.addEventListener(MouseEvent.CLICK,calculate);
but it always give the following error
Error is = [FaultEvent fault=[RPC Fault faultString="[MessagingError]" faultCode="InvokeFailed" faultDetail="null"] messageId="0102BC47-CED4-B019-F8FE-338684D3DBEB" type="fault" bubbles=false cancelable=true eventPhase=2]
Please help me out
Thanks
Copy link to clipboard
Copied
Hi,
Another solution I have found at http://help.adobe.com/en_US/as3/dev/WSb2ba3b1aad8a27b061afd5d7127074bbf44-8000.html
This return all html code if id donot put the method name in first example.
When i put the menthod name the it shows an io error as following
Error opening URL 'http://domain.org/Service.svc?wsdl'
An error occured: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://Domain.org/Service.svc?wsdl"]