The same Java service in more than one Flex component

Hello, I'm using Java to do the services for one application, and I want to use the same service in more than one component. I know how can I use in one component but I don't know if I have to declarate again in the other or how can I do. Here a part of the code to show clearly.
var info:IServiceInfo;
                //Ask service ref
                info = Environment.getInstance().
                    serviceLocator.getterService("com.ent.prueba.Conexion");//the package and the class name
                info.addEventListener(ServiceInfoEvent.READY, onInfoResult);
                info.addEventListener(ServiceInfoEvent.ERROR, onInfoFault);
                info.lookup();
            //The service exist
            private function onInfoResult(event:Event):void{
                info.removeEventListener(ServiceInfoEvent.READY, onInfoResult);
                info.removeEventListener(ServiceInfoEvent.ERROR, onInfoFault);
                var ser:Service = info.getService();
                ser.addEventListener(ResultEvent.RESULT, onCtxInfo);
                ser.addEventListener(FaultEvent.FAULT, onInfoFault);
                ser.getStore(1);
            //The service doesn't exist
            private function onInfoFault(event:Event):void{
                info.removeEventListener(ServiceInfoEvent.READY, onInfoResult);
                info.removeEventListener(ServiceInfoEvent.ERROR, onInfoFault);
                Environment.getInstance().showInfoUser("Error with the service");
            private function onCtxInfo(event:ResultEvent):void{
                lbl.text = event.result as String;
            private function onCtxInfoError(event:FaultEvent):void{
                lbl.text = "Fallo : " + event.message;
This code works, but I want to use ser.xxxx in other component.
private function treeLoaded():void
           ser.getFolder(id);                                       
        private function treeLoadedResult(event:ResultEvent):void
            xmlTree = XML(ser.getFolder.lastResult.toString());
           var lista:XMLList= xmlTree.Cuenta;
           for(var i:Number=0;i<lista.length(); i++)
                   var tmpTree:XMLList = xmlTree.Cuenta[i].node;
                  newTree.dataProvider = tmpTree;
                 newTree.labelField = "@label";
                   treePanel.addChild(newTree);
I hope that someone knows how can I do that. how can I can to 'ser' in the second component.
Thanks!
PD: all the methods that i want to use in ser.xxxx are in the same class 'Conexion'

Nobody can guide me

Similar Messages

  • Can i use the same payment info on more than one iphone?

    Can i use the same payment info on more than one iphone?

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    Accepted forms of payment  >  http://support.apple.com/kb/HT5552

  • Can I use the same iCloud account on more than one PC?

    I'm new to iCloud. I use Apple devices but a PC both at home and work. I'd like to have the same iCloud account on both PCs, but not sure if I can do this. Can anybody clarify please?
    Thank you.

    Yes, you can use the same iCloud account on more than one device. Thats actually the basic idea of iCloud, syncing and exchanging data of different devices without a cable. E.g. your address book on the iPhone is modified and you computer gets the changes via iCloud…
    enjoy

  • How to use the same credit card for more than one customer master

    Hi,
    this is a question for consultants at least a little familiar with SAP business partner, Customer-vendor-intergration cvi, contract accounting:
    My customer wants to store the same credit card with more than one customer. Arguments are that family members or partners may mutually agree to use the same credit card for their distinct purchases.
    I never tried with amazon or the likes but I know that SAP validates the uniqueness of credit cards.
    I found 6 code line where the message (V/)005 "Payment card &1 &2 is already assigned to customer &3" prohibits duplicate assignment.
    Even if I create a couple of enhancements to suppress the error, I don't know how the system will work.
    The customer does not like the idea of using alternative payer.
    Did you ever face the same problem and how did you solve it?
    Much Thanks in advance
    Best regards
    Clemens

    thanks

  • Can I use the same email address in more than one community? How?

    Can I use the same email address in more than one community? How?

    Yes, you can be a member of multiple communities under the same email address. You will need to be invited to those communities. If you are trying to create new communities under the same address, you will not be able to do that through our website.

  • Assign the same credit card to more than one customer master

    Hi,
    this is a question for consultants at least a little familiar with SAP business partner, Customer-vendor-intergration cvi, contract accounting:
    My customer wants to store the same credit card with more than one customer. Arguments are that family members or partners may mutually agree to use the same credit card for their distinct purchases.
    I never tried with amazon or the likes but I know that SAP validates the uniqueness of credit cards.
    I found 6 code line where the message (V/)005 "Payment card &1 &2 is already assigned to customer &3" prohibits duplicate assignment.
    Even if I create a couple of enhancements to suppress the error, I don't know how the system will work.
    The customer does not like the idea of using alternative payer.
    Did you ever face the same problem and how did you solve it?
    Much Thanks in advance
    Best regards
    Clemens

    Thank you Rafael,
    as I said "The customer does not like the idea of using alternative payer."
    I know this would be the correct way but the customer rules - so I try to evaluate a solution.
    Regards
    Clemens

  • Using "Next style" with the same paragraph style for more than one paragraph

    Hi.
    I have been using paragraph styles with the "next style" option, it's a huge help. But I need a bit more. So I have the following paragraph structure: ABCCCABCCCAB...
    I defined paragraph styles for each kind of paragraph, then in paragraph style A, I added paragraph style B as the next style, and so on. However, when I get to paragraph style C I reach a dilemma. Should I define the next style as the same, or define three paragraph C styles (C1, C2 and C3), link them to each other with next style, and then loop the C3 style into the A style again?
    My hope is that there is a way, something like the nested style options, that allows me to define that style C should be used for 3 paragraphs and then the next style becomes style A again.
    Thanks.

    You just need two styles, almost identical, you can duplicate one.  The only
    difference is one has the next paragraph c and one has the next paragraph
    a.  After that I don't see the problem.

  • Can you use the same Apple ID on more than one MacBook Pro for updates and applications?

    We just got a few new MacBook Pro's and when I went to install updates it said I need to make an Apple ID.  Can you use the same Apple ID and email address for that Apple ID on multiple machines, or do I need them both to be unique per machine?  I'm not sure how that works when you have multiple machines.

    An Apple ID is a user name you use for everything you do with Apple. Creating an account for an Apple service, such as the iTunes Store or the App Store, creates an Apple ID. Apple ID allows you to access other Apple services.   So you can use the same Apple ID for up to 10 Macs associated with it.
    To create an Apple ID you need to enter  your full name and your primary email address as your Apple ID. This will be used as the contact email address for your account.

  • HT201250 can I use the same drive to backup more than one computer

    Can I use the same external hard drive to backup (using Time Machine) my Macbook pro and iMac computers?
    Can they be the same partition?

    etresoft wrote:
    SMS5572 wrote:
    It was never my intention to break protocol here.
    Pondini is not accurately reporting the context of a private conversation.
    I disagee (you called it threadjacking twice), but we can argue about that elsewhere.
    As far as I know, only Lion Server and Time Capsule provide networked Time Machine services
    It is supported. 
    From Lion (client) Help:
    So many folks asked how to set it up that I wrote instructions on my web site -- Time Machine - Frequently Asked Question #22 -- no "unsupported" command needed.
    Message was edited by: Pondini

  • HT1203 Using the same Apple ID for more than one ipod.

    I am soon going to be purchasing a new ipod, so i was wondering if i can use my previous apple ID for my new ipod or if i have to create new apple ID and make a new itunes on my computer? (using windows)

    Yes you can use the same AppleID for up to 10Devices.  You can share all the purchases among all your devices.

  • Can you use iMessage on the same Apple ID, on more than one device at the same time?

    I have an iPad and want an iPod Touch this year, and I was wondering if I could use my iMessage signed into both at the same time? Whilst on the same Apple ID. Thanks for any help.

    Thanks

  • Sharing the same outgoing server for more than one email in mail program

    A local computer company has web servers and he has assigned me a website with my own domain and I have two emails under that domain. I can't seem to setup these two emails to work correctly in apple mail. It's telling me that I can't have the same outgoing server setup for both email accounts. This is how the server is run. Both my emails which are assigned under my domain web url both use the same outgoing server. Is there anyway around this error or am I stuck?
    thanks

    This is important.

  • Can I use the same Mail configuration on more than one mac?

    I have many (15+) email accounts. I'd like to duplicate the accounts and signatures that I use on my desktop computer onto my laptop. Is this possible? What files do I copy?

    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Mail
    Right-click or control-click the line and select
    Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item selected. Copy the selected item to the other Mac.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar, paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return.

  • More than one business component (views) in the same JSP page

    Hi, I am trying to have more than one business component (views) in the same JSP page as Input Form.
    For example:
    There are two BC4J:
    Person:
    Code.
    Name.
    Address:
         Person_code
         Street.
         City.
    There is a master detail relationship between them and there is a link between both views in the application module.
    I want to create a JSP page with an Input form for both views. When the user decides to create a Person, I need to insert in both tables.
    Insert code and name into Person table.
    Insert Person_code, Street and City into Address table.
    It is possible to do in Forms but I am not sure if I can be able to do this in JDeveloper 10G.
    Thanks

    Sorry I lost the tabs
    Person has two attributes Code and Name.
    Address has three attributes Person_coden Street, City.

  • Any Benefit to having User Profile Service on more than one server

    I have an application that uses UPSA and UPSS, the User profile Service and Sync Service are started on the same server
    Is there any point in having the User Profile Service started on a second server for redundancy.
    I understand that a UP Sync Service can only be associalted with one User Profile Service Application
    Can I make my User profile Service Fault tolerant by starting the service  on more than one server?
    I am not looking to create  a second Use Profile Service Application to have seperate DB's and things
    Just to have User Profile still avaialble when the serevr hosting it has an issue
    thanks
    themush

    To get the round robin load balancing, just start the service in Services on Server on more than one server.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Maybe you are looking for