The Ultrashock Ultra Bundle
  • Home
  • Community
  • Forum
  • Flash
  • Flex
  • Thread
  •  
  • Previous topic
  • Next topic
Sign up to post

Flash
 Flex

  • akhtar Author 
    • 1696 
    • 0 
    • 2 
    Flex AbstractService
    akhtar

    Last reply Jan 22 2008, 02:52 AM

    by akhtar

    Posted: Jan 18 2008, 06:30 AM

    by akhtar

     

Good day, People.
I am facing a slight problem, i have a flex MXML Application which contains two binded Components (forms) consuming one single
webservice class:

package BControl
{
    import mx
.rpc.AbstractService;
    
import mx.rpc.soap.mxml.WebService;
    
import mx.rpc.events.ResultEvent;
    
import mx.rpc.events.FaultEvent;
    
import mx.controls.Alert;
    
    public class 
Connections
    {
        
private static var serviceRES:AbstractService;
        
        public static function 
getRESService():AbstractService {
            
if(serviceRES == null) {
                
var ws:WebService = new WebService();
                
ws.wsdl = "http://imran12/ourservices/service.asmx?wsdl";
                
ws.useProxy = false;
                
ws.showBusyCursor = true;
                
ws.loadWSDL();
                
serviceRES = ws;
            
}
            
return serviceRES;
        
}    
    }
} 

One of the function of webservice recieves two arguments, i am unable to send the Arguments (Request) through AbstractService.
My Component code is:

<mx:Script>
    <!
[CDATA[
        import mx
.rpc.AsyncRequest;
        
import BControl.TokenResponder;
        
import mx.rpc.AsyncToken;
        
import mx.collections.ArrayCollection;
        
import mx.rpc.AbstractService;
        
import mx.rpc.events.ResultEvent;
        
import BControl.Connections;
        
import mx.rpc.IResponder;
        
import BControl.Fetch;
        
import mx.controls.Alert;
        private var 
service:AbstractService;
        
        
        
[Bindable]
        
public var getBAmt:Number;    
        
        
[Bindable]
        
public var vc:String;
        
        
[Bindable]
        
public var getUAmt:Number;    
        
        private function 
initApp():void {
             service 
= Connections.getRESService();
             var 
token:AsyncToken = AsyncToken(service.getBAmount());
            
token.addResponder(new TokenResponder(myFunc));
        
}
        
        
private function myFunc(event:ResultEvent):void {
            getBAmt 
= Number(event.result.bAm);
            
getUAmt = Number(event.result.utlAm);
        
}
        
        
            
    ]]
>
</
mx:Script> 

i will appreciate help and little explanation, thanks. bad

  2 REPLIES
 
akhtar Author 
1  
akhtar

Anyone! Nutrox, i need help man.

  • 20 January 2008 02:39 PM
  •  
akhtar Author 
2  
akhtar

i am sorry guys, it was easy, i figured it out, thanks anyways.

var token:AsyncToken = AsyncToken(service.getBAmount());

need to be changed as
var token:AsyncToken = AsyncToken(service.getBAmount(arg1, arg2, arg3));

  • 22 January 2008 02:52 AM
  •  
  •   Log in or join for free to make a comment.
 
Topic actions
  •  Share on Facebook
  •  Share on Twitter
Topic Categories
  •  Show All Topics
  •  Development
    •  Server Side
    •  Client Side
  •  Creative Software
    •  Web
    •  Video
    •  3D
    •  Illustrator
    •  Photoshop Battles
    •  Photoshop
  •  Design
    •  Typography
    •  Resources & Insight
    •  Checkpoint
  •  Career
    •  Copyright Matters
    •  Advice & issues
    •  Job Seekers
    •  Job Offers
  •  Flash
    •  UltraMath
    •  OOP
    •  Third Party Tools
    •  Open Source alternatives
    •  Data Communication
    •  Components
    •  Flex
    •  AIR
    •  Flash Lite
    •  Flash Professional
    •  Flash Newbie
    •  ActionScript
    •  XML
  •  Lounge
    •  Polls
    •  Random Chat
    •  Showcase And Critique
    •  BombShock Award Nominations
  •  Community Essentials
    •  BombShock Award Winners
    •  Tutorials
    •  Interviews
    •  News
    •  Bitmap tutorials
Popular Topics
  • Sort by: 
  • Activity
  • Views
  • Comments
  • Likes
Advertise with us
  • Your advertisement here!
  • loading
Ultrashock
  • Creative Assets
  • Community
  • Blog
  1. Home
  2. Forum
+/-
Creative Assets
  • Categories
  • Contributors
  • How to buy
Make Money
  • Commission Rates
  • Referral Program
  • Contributor Program
Community
  • Activity Feed
  • Forum
  • Profiles
About
  • Quick Tour
  • Our History
  • Banners & Logos
Support
  • Contact Ultrashock
  • Advertise with us
  • Legal Information
  •  Keep up to date
  • Flash 779  Flash
  • Audio 6,481  Audio
  • Vector 2,130  Vectors
  • Image 12,338  Images
  • Creative Assets 21,728  Assets
  • Profiles 282,751  Members
  • Topics 93,776  Topics
  • Blog 4  Blog
  • Facebook 1,679  Facebook
  • Twitter 1,163  Twitter
  • Join our FREE monthly newsletter!
  • Archive
  • Invalid email address. Please try again.
Subscribe
  • ©2012 Ultrashock LLC - All rights reserved
  • Terms of Use
  • Privacy Policy
  • Switch to dark theme
  • RSS Feeds
  • Top

©2012 Ultrashock LLC - All rights reserved

Printed on Sat, February 11, 2012 - 19:13:50