• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Use WCF with Flash CS5

Explorer ,
Apr 06, 2011 Apr 06, 2011

Copy link to clipboard

Copied

Hi,

Is it possible to call WCF service with flash CS5.

Regards------Amit

TOPICS
ActionScript

Views

1.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 07, 2011 Apr 07, 2011

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 08, 2011 Apr 08, 2011

Copy link to clipboard

Copied

LATEST

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"]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines