How to use HTTPSERVICE in Actionscript project.

Hello all,
I am doing an actionscript project, I want to use httpservice to send a data to server . Is any one knows how to use httpservice in actionscript project?
thanx

following code may help:
import mx.rpc.http.HTTPService;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
private function callHTTPSERVIDE():void
var hs:HTTPService = new HTTPService();
hs.url = 'Server.php';
hs.addEventListener( ResultEvent.RESULT, resultHandler );
hs.addEventListener( FaultEvent.FAULT, faultHandler )
hs.send();
private function resultHandler( event:ResultEvent ):void
//handle your result here
private function faultHandler( event:FaultEvent ):void
// code for fault handling.

Similar Messages

  • Using components in actionscript project

    Sorry if my question sounds dumb, but I just started learning
    AS3.
    I'm trying to use UI components in an ActionScript project.
    I can't import the definition of mx.controls classes such as
    Button or CheckBox.
    Here's the code I'm using:
    package {
    import mx.controls.Button;
    public class Learning {
    public function Learning() {
    var button:Button = new Button();
    When I compile, this is what I get: "Definition
    mx.controls:Button could not be found."
    How to import these definitions?
    -S

    Tried compiling it using the FlexBuilder IDE? There's nothing
    wrong with your code, so it sounds like your compiler doesn't know
    where to find the libraries, or is looking in the wrong place. Are
    you giving an explicit library-path argument?
    http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=L iveDocs_Parts&file=00001500.html

  • How to use Maven Java EE projects in NB?

    Hi,
    I probably just missing something than it is an error. Our company uses Maven, and JBoss. Most programmers unfortunatelly uses Eclipse so I do not have anyone to ask. I've checkouted project from SVN, it was correctly recognised by NB as Maven project, I can build it (with some warning, but build is successful). But I cannot run or debug it. Maybe it's because those actions aren't defined by someone who created this project I don't know. Actually I do not know nothing about maven, yet. Question is, how to run or debug this project on my local JBoss server. I did not find way how to do it ...
    thanks in advance
    martin.

    Ok, I say it in this way. I do not know anything about maven, and never used it before. What I DO know, that Eclipse IS NOT Netbeans. In this situation it means that on our project, which I do not know whether it is proper EE maven project or not, I can in Netbeans set ONLY VM options AND some maven action which, as I already said, do not know anything at all, so I cannot even tell whether or not they can be used to solve my problem.
    As I already said what I get from svn IS NOT EE project BUT maven project, this is where netbeans and eclipse differs, since there are no maven projects in eclipse(or at least nobody here heard about them). I do know how to work with EE projects in NB, but I'm talking about maven projects here.
    How others do it. Start JBoss from their eclipse in debug mode, COMPILE EVERYTHING LIKE NORMAL - MAVEN_FREE PROJECT (which I cannot do in NB) deploy all .jars manually in their OS to appropriate JBoss directory, then set breakpoints, do some action in browser and then miracously somehow they get into debug mode in eclipse. I cannot build maven project like simple EE project in NB, when I try to work with what I find in private repository like it's result of normal build, then it does not work since dependencies aren't set correctly so I have to fix them manually and do not know how to do it.
    Look, I know that you can stop pain of person suffering from cancer by shooting his head off, but that's not the cure we're looking for. I've heard that maven was originally intended for simplifying development process and I cannot afford 90minutes procedure in my RunBuilds&TestAsOftenAsPossible work style.
    Actually, there is JUST ONE person in whole firm(not in our city), who know something about maven, others are just lost. That's the reason why I'm asking here to find out what's wrong. I'm looking FOR PROPER WAY how to do it.No for screwing screws with hammer.

  • How to use Classification Characteristics for project definition and WBS

    dear all:
    my step is below:
    1,  CT04, create "Characteristic"
    2,  CL02, create "Class". and class type is "14".
    3,  now how to customize to use the class in project definiton and WBS.
    Please explain me all the steps to be required.
    Thanks in advance!

    Hi
    Classification is only assigned for the network profile or in the activity.
    CJ20N  -
    > Extra ---> Classification --- > Classification
    Hope this will help you.
    Regds,
    Uddhab

  • How to use settingsfilegenerator in c# project which is part of biztalk solution

    As part of expression shape in the orchestration, I am calling a c# method by providing input parameters.
    MyCompanyName.Integration.MyProjectName.Project.ListsProxy.SubmitFilesToDropOffLibrary
    (XmlInputMessage,
    MyCompanyName.Services.ConfigStore.SSOClientHelper.Read("ProjectName", "InboundTransportLocationAddress"),
    InputMessage.SelectRecord.DOC_IDENTIFIER + "*");
    One of the parameters "MyCompany.Services.ConfigStore.SSOClientHelper.Read("MyProjectName", "InboundTransportLocationAddress")"
    is looking into the settingsfilegenerator and taking in the right values.
    However,it's not picking when used as part of c# project.
    As part of the method in the c# project, I have a string hardcoded with url.
    string x = "http://.....";
    the url need to change for every environment of deployement. So I want to change the hardcoded url to picked up from the
    settingsfilegenerator.
    So in the settingsfilegenerator, I  have added
    <Row>
            <Cell ss:StyleID="s77">
              <DataSubmitFileEndpoint ss:Type="String">GetTaxonomy</DataSubmitFileEndpoint>
            </Cell>
            <Cell ss:StyleID="s78">
              <Data ss:Type="String">http://.......asmxx</Data>
            </Cell>
            <Cell ss:StyleID="s78">
              <Data ss:Type="String">http://........</Data>
            </Cell>
            <Cell ss:StyleID="s78">
              <Data ss:Type="String">http://........</Data>
            </Cell>
            <Cell ss:StyleID="s78">
              <Data ss:Type="String">http://........</Data>
            </Cell>
            <Cell ss:StyleID="s78">
              <Data ss:Type="String">http://........</Data>
            </Cell>
          </Row>
    string x = MyCompanyName.Services.ConfigStore.SSOClientHelper.Read("MyProjectName", "GetTaxonomy");
    But it's not picking up from the settingsfilegenerator. It's working when used as part of orchestration but not when used in the c# project. I have added
    the reference for config store in both. But not working in c# project.Could anyone help please

    It's working when used as part of orchestration but not when used in the c# project. This is very confused. :(
    you could check whether give a reference properly first.

  • How to use URL in actionscript  Instead of services-config.xml?

    Hi Alls,
    I would like to set my service's url in actionScript (I don't
    want to use compiler option -services witch need to recompile swf
    if you change service's url).
    I search for a long time on google but I found nothing, and
    adobe documentation isn't very clear.
    Thank for help!!!

    If you are relying on a services-config.xml file, then this
    must be provided
    at compile time because the compiler uses it to generate
    code.
    If you're not using <mx:DataService>, you can actually
    avoid compiling against
    a services-config.xml file. This is because for the other
    services, such
    as <mx:RemoteObject> or <mx:WebService
    useProxy="true"> or <mx:HTTPService
    useProxy="true">, the main thing the compiler does from
    services-config.xml
    is to generate the code to instantiate the set of channels
    that should be
    used to contact a destination in LCDS.
    Well... you can do that programmatically in ActionScript...
    something like
    this:
    import mx.messaging.ChannelSet;
    import mx.messaging.channels.AMFChannel;
    private function channelInit():void
    var channelSet:ChannelSet = new ChannelSet();
    var channel:AMFChannel = new AMFChannel(null, "
    http://{server.name}:{server.port}/mycontext/messagebroker/amf");
    channelSet.addChannel(channel);
    myRemoteObject.channelSet = channelSet;
    Just make sure you call this initialization code before you
    make any service
    requests. If you're proxied WebServices, be sure that you use
    the ActionScript
    API instead of the MXML tag so that you can delay when
    loadWSDL() is called
    because you'll want to setup the channelSet first.
    Regards,
    Pete
    Hello FredFlex,
    > Hi Alls,
    >
    > I would like to set my service's url in actionScript (I
    don't want to
    > use compiler option -services witch need to recompile
    swf if you
    > change service's url).
    >
    > I search for a long time on google but I found nothing,
    and adobe
    > documentation isn't very clear.
    >
    > Thank for help!!!
    >

  • How to use the same UI Project for differents HumanTask's in BPM 11gR1

    When I define a User interaction activity in my Oracle BPM 11gR1 Process and associate a Human Task to it. It generates a new project to hold all my forms. Anyone knows if it's possible to use this same project for different Human Task's ?

    After you generate the UI project for your first human task, you can right click on the project in JDeveloper and select "New", click on the "All Technologies Tab", then "JSF" -> "ADF Task Flow Based on Human Task". Then browse to the .task file from your BPMN/composite project.

  • How to use log4j in struts project

    Hi, all
    I want to use log4j and pooling in my running project based on struts-tomcat.
    Can any one tell me all the process in details step by step,to apply in my project
    i m wait for any rply

    Another day, another jargon-dump

  • How to use NSTabView?

    Hello,
    Could someone point me to a quick tutorial on how to use NSTabView in a project? I don't really need to do anything fancy - I just want to switch between two different views using a tab control.
    I'm a new Cocoa programmer and I'm not too familiar with views. How do I associate controls to views? How do I get NSTabView to switch between them? I hear it is possible to do this entirely in IB. Advice? Instructions?

    There is a good example in the Examples > Interface Builder folder called MultipleNibTabView that probably will help you the most.
    A good quicky way to find code in the examples is to do a Spotlight search for the term NSTabView and restrict the search to Examples folder and you'll get a list of the example code that uses that function.
    Good Luck,
    =Tod

  • How to send results to actionscript using java via HttpService

    Hi,
    I do RPC using HttpService.
    In my situation, I need to send results from Java code to
    Flex Action script. I have defined a Java Servlet receiving data
    from Flex application, then it processes with the data, finally the
    Servlet is supposed to send some feedbacks to the client(Flex).
    My question is that how can I define codes in doPost() method
    that the following function will get "result" from the Java side.
    public static function httpResult(event:ResultEvent):void
    var result:Object = event.result;
    //Do something with the result.
    if (result.toString() == "success")
    resultMessage.text = "Login Success";
    resultMessage.text = "Invalid User";
    }

    I advise having your servlet build an xml string, maybe put a
    status attribute in the root tag, like this:
    <myroot status="success">
    <mytext>Some text</mytext>
    </myroot>
    and return that to the calling Flex client. XML is easier to
    work with than Object. On the HTTPService tag, set
    resultFormat="e4x", and it will return plain XML.
    then in the handler, do:
    var xmlResult:XML = XML(event.result); //this will already be
    the myroot node
    //Do something with the result.
    if (xmlResult.@status== "success") //reads the status
    attribute
    resultMessage.text = xmlResult.mytext.text(); //get the
    value of themytext text() node
    resultMessage.text = "Error";
    Tracy

  • Create new ActionScript project... how can I set a null SDK to something useful?

    Hi,
    I'm trying to create a new ActionScript project in Flash Builder... Simple, you say, "File - New ActionScript Project".
    Right.
    But when I do that, I get:
    And that then gives this:
    So...
    Obviously, I have something that is badly misconfigured somewhere. Hopefully something _REALLY_SIMPLE_ but I don't know what it is!
    Anybody?
    Please?
    G

    This may have something to do with it, but does anyone know how to set that value?
    G

  • How can I use LCCS with ActionScript 3 and Flash CS4?

    Hi,
    Using Stratus I was able to create an an application using Action Script 3 and Flash CS4.  The sample code on the Adobe site was quite straight forward and easy to understand.  I now want to switch over to  LCCS but can't find anything any where on how to use Action Script 3 and Flash CS4 with LCCS.  Do I need to know Flex to be able to use LCCS?  Everything was quite simple and easy to understand with Stratus and makes complete sense.  But LCCS is really confusing.  Is there any sample code on how to establish a connection in Action Script 3 and then stream from a webcam to a client.  There is nothing in the  LCCS SDK that covers Flash and Action Script 3.  Please help!  I found the link below on some forum but it takes me nowhere.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=75 9&threadid=1407833&enterthread=y

    Thanks Arun!
    Date: Thu, 29 Apr 2010 11:44:10 -0600
    From: [email protected]
    To: [email protected]
    Subject: How can I use LCCS with ActionScript 3 and Flash CS4?
    Hi,
    Welcome to the LCCS world.
    Please refer to the SDK's sampleApps folder. There would be an app called FlashUserList. The app demonstrates how LCCS can be used with Flash CS4. Its a  pretty basic app, but should help you moving.
    We are trying to improve our efforts to help developers in understanding our samples. Please do let us know if we can add something that would help others.
    Thanks
    Arun
    >

  • How to use oracle fusion middleware for integration project ?

    hi all,
    in my projects, customer (a bank) already has many applications (bankend & frontend) that are complicatedly connected. I intend to use oracle fusion middleware to integrate all applications and make adding new applications in the future easier. I have worked through documents in the oracle website but I still have no idea how to use oracle fusion middleware to address the requirement, besides oracle fusion middleware includes a bundle of applications I don't know which one I would need.
    could anyone give me some instructions ? appreciate your help.
    thank very much,

    Hi,
    For this short description of environment, could be ODI is a incredible tool to help you...
    Take a look into my blog that has a lot of concepts and "how to do" instructions.... http://odiexperts.com
    However to try help you, what are the used technologies?
    Where are you from?
    Cezar Santos
    http://odiexperts.com

  • How to use a jar from a external library DC Project?

    I followed the steps of how to create DC, External Library Project, which contains the jar I want.
    I understood that this type of project can't be deployed so I build and deployed other DC Project from the type J2EE server component Library and added it to it's public part. What do I do next, to actually use the jar and it's imports?
    Thank you,
    Meytal.

    Hi,
    Check this:
    Making a JAR file publicly available
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/2ade3fc6c6ec06e10000000a1550b0/frameset.htm
    Greetings,
    Praveen Gudapati
    [Points are welcome for helpful answers]

  • How to use external library(in .jar format) in netbeans project?

    How to use external library(in .jar format) in netbeans project?
    Thanks!

    How to use external library(in .jar format) in netbeans project?
    Thanks!

Maybe you are looking for