Bind HTTPService result

Hi,
I am using HTTPService(say id="sampleHTTP") for loading xml.
My xml looks like this.
<node>
<wsdl_endpoint>
http://localhost/sample.asmx?WSDL</wsdl_endpoint>
</node>
In the result event I am giving an alert for the data from
the xml(sampleHTTP.lastResult.node.wsdl_endpoint), itz showing the
correct path. When I tried to bind this path for a Web Service,
<mx:WebService
wsdl="{sampleHTTP.lastResult.node.wsdl_endpoint}"........./>
the result for web service is not triggered.
Please help....

Since you are binding to a WebService, I believe you need to
make a call to the loadWSDL() method in order to download the Web
Service data. One thing you could do is to put this call in the
result event function for your HTTPService. That way as soon as the
xml is loaded with the path, it will call your WebService to get
the document.
Vygo

Similar Messages

  • How to set XML.ignoreWhitespace = false; in HttpService /Result?

    Please ask these kind of questions on flexcoders or the Adobe Flex Forums.  This is for development of the SDK itself.<br /><br />Matt<br /><br /><br />On 11/17/08 12:56 AM, "venubwal" <[email protected]> wrote:<br /><br />A new discussion was started by venubwal in<br /><br />Developers --<br />  How to set XML.ignoreWhitespace = false;  in HttpService /Result?<br /><br />I want to carry/preserve Leading & trailing spaces<white spaces> in event's result....<br />I am using service as :<br />_webService = new HTTPService();<br />_webService.url = serviceUrl;<br />_webService.method = "POST";<br />_webService.resultFormat = "e4x";<br />......<br />...Again i am checking it as -in<br />private function serviceResultHandler(event:ResultEvent):void<br />        {<br />        stopExecution();<br />        var doc:XMLDocument = new XMLDocument();<br /> doc.ignoreWhite = false;<br />        XML.ignoreWhitespace = false;<br />doc.parseXML(event.result as XML);<br />       Alert.show(event.result.toString(),"....serviceResultHandler...");<br /><br />But, i am not able see L&T spacesin alert() where I can see L&T spaces in Servlet/Java side which assigned as metaResponse<br />as....<br />      OutputStream writer = response.getOutputStream();<br />      OutputStreamWriter outputStreamWriter = new OutputStreamWriter(writer,"UTF-8");<br />JaxbSerializationUtil.serializeObjectToWriter(outputStreamWriter, metaResponse);<br /><br />________________________________<br />View/reply at How to set XML.ignoreWhitespace = false;  in HttpService /Result? <a href=http://www.adobeforums.com/webx?13@@.59b70bd4><br />Replies by email are OK.<br />Use the unsubscribe <a href=http://www.adobeforums.com/webx?280@@.59b70bd4!folder=.3c060fa3>  form to cancel your email subscription.

    By Using XML.ignoreWhitespace = false; <br />I am able to Store/Carry/Save L&T white spaces in XML and i can retrive values with whitespaces...<br /><br />It is in case of loading from Java<DB> to Flex.<br /><br />But the actual problem is with xmlObject.toString()/toXMLString()<br />is not able to carry whitespace, while it should carry as parameter to Java Servlet..so that it can be get using request.getParameter() [..then it is serializing/deserializing]<br /><br />So, how i can preserve the L&T whiteSpaces on XML.toString()/toXMLString() method.<br /><br />OR else<br />How we can set Http request attribute in Flex, so that we can use ( AnY_Object)request.getAttribute()...

  • Httpservice result strange

    When my HTTPService result comes back the 'event.result'
    variable always has an '\r\n\r\n' sequence at the beginning.
    How do I get rid of this ?
    I am simply feeding the httpService with an echo from a php
    script eg. echo "messageHere";
    Thanks for any advice.

    \r\n means, "carriage return followed by a new line". You've
    probably got some extra line breaks in your PHP script. You can get
    rid of them in flex using StringUtil.trim(event.result), but if you
    have whitespace characters you care about at the beginning or end
    of your event.result, you will lose them.

  • Using HTTPService results for WebService

    Here's the deal.  I am using an HTTP request to get the Session Variables that I need to use in a Web Service.  How do I time it so that the resutls from the HTTP request are used in the Web Service request?  Do/Can I bind them?  Do I need to set a trigger to wait for the HTTPService to return and then run the Web Service?
    Thanks in advance.

    Note: The only solution I've found so far is to put the web service call in the results function after the HTTPRequest returns with a positive result.

  • Can't set public Object in HTTPService result listener

    Hello.
    I am using a data object class.  The class is based on a class that contains the HTTPService calls.  I want to return the event.results to the local instance of the class by setting a public Object = the results Object. However, the public object is null after the HTTPService event result listener function is finished.
    It is easier to see than to describe:
    In the main application. i make an instace of my activity class:
    myactivity:activity = new activity() ;
    now, I invoke the getdata method:
    myactivity.getdata() ;
    The getdata() method fails at runtime, because it tries to reference the results object.
    See the base class and the activity class below.
    BASECLASS: (just the main parts are listed here):
    public class transferObject
            public var baseurl:String ;
            public var dbresult:Object =new Object();
            public var service:HTTPService ;
            public function transferObject()
            geturl("ghost") ;
            public function geturl(db:String) : void
                    baseurl = "https://xyzzy/" ;
            public function getHttpService(methodname:String):void {
                    service = new HTTPService();
                    service.url = this.baseurl + methodname;
                    service.channelSet ;
                    service.method = "POST";
                    service.addEventListener("result", httpResult );
                    service.addEventListener("fault", httpFault);
                    service.send();
               public function httpResult(event:ResultEvent):void {
                    dbresult = event.result ;
    //DBRESULT IS THE OBJECT I WANT TO REFERENCE IN THE DERIVED CLASS
                 //Do something with the result.
                public function httpFault(event:FaultEvent):void {
                    var faultstring:String = event.fault.faultString;
                    Alert.show('Error sending data: '+faultstring+' '+event.fault);
    HERE IS THE DERIVED CLASS:
    package dataObjects
        public class activity extends transferObject
        import mx.controls.Alert ;   
    [Bindable]
    public var event_id:String ;
    [Bindable]
    public var description:String ;
           public function activity()
                super();
            public function getdata():void
                getHttpService("eventually.sendtest") ;
              this.event_id = dbresult.result.activities.activity.getItemAt(0).event_id ;
    ----> THE LINE ABOVE FAILS AT RUN TIME BECAUSE THE DBRESULT OBJECT IS NULL
    THANK YOU FOR ANYHELP YOU CAN PROVIDE

    Sorry, but parameters of a ServeletRequest can not be modified. Look at the javadocs on ServeletRequest and you will see that "getParameterMap" returns an immutable Map. JSF is simply wrapping that method call with their own "getRequestMap" method. Setting an attribute, request.setAttribute(name, object), is how you pass things using the request to servlets, jsps, etc. on down the line. Just get the attribute instead of the parameter where you need it. Set your "parameter" in the attributes, down the line, check the attribute first, if it exists, use it, otherwise look for the parameter.

  • Assigning httpservice result in an array

    Hi all,
    I have been trying to call a httpservice and trying to assign
    the result in an array as shown below
    quote:
    Code:
    var grade:Array=userRequestReload.lastResult.servicelo
    cations as Array;
    // this is not working
    For the corresponding code the httpservice tag used is:
    quote:
    Code:
    <mx:HTTPService id="userRequestReload" useProxy="false"
    method="POST" fault="defaultFault(event)"
    result="reloadComboData()" />
    I an not able to get the desired outcome. I tried setting the
    resultFormat to array also but couldnt succeed.
    Hope to get help soon.
    Thanks

    That question is generalizable to all of the resultFormats
    that take XML and convert it to something, like the default
    "object'. That conversion is a gray box, and you have little or no
    control over it. Reading the doc on the "array" format is not
    enlightening.
    If you are getting xml from a data source, I advise using
    e4x, so that you can control what the heck happens to your data.
    Tracy

  • HTTPService results cached in IE

    Hi,
    I am embedding flex in a web application. I am using
    HttpService to send request and get data to be displayed. I don't
    want flex to cache my results as when I send the same request
    again, it returns data from the cache and not the new set which
    might have changed.
    Thanks!

    If you use "POST" instead of "GET", the result should not get
    cached. Try that first.
    If that does not work for you, append a unique string to the
    HTTPService url before invoking send. The will always prevent
    caching

  • (HTTPService - result="" - to ArrayCollection) -  a question for super expert ;)

    Firstly look at my example then you will read the question:
    Look at example below - I'm using HTTPService component to retrieve data from SQL database
    (read_record.php is generating nice and tidy xml file with my data)
    <!-- (A) read  -->
    <!-- =================== HTTP SERVICE (read_record) ============================ -->
        <mx:HTTPService id="readTimed"
            url="http://www.pudelek.pl/SCRIPT/A/read_record.php"
            result="patient(event)">
        </mx:HTTPService>
    Then 'result' is calling a function patient() which task is to assign 'event.result'
    to ArrayCollection called 'A_patient_dp'  (this ArrayCollection is a data provider
    for a specific data grid)
    private function patient(event:ResultEvent):void {
        trace("A - PATIENT - loaded...")
        trace(event.result.patient.patient)
        A_patient_dp = event.result.patient.patient
    Everything looks great here, data grid shows all the data from xml file generated
    by read_record.php
    and now is my problem :
    I don't want to display all the data, I want HTTPService to retrieve only particular data
    which are described by variable {parametr} - this var is generated by my application
    I've dond it this way:
    <!-- (A) MAP POSITIONING -->
    <!-- =================== HTTP SERVICE (read_record) ============================ -->
        <mx:HTTPService id="readRequestA"
            url="http://www.pudelek.pl/SCRIPT/A/A_send_read_record.php"
                useProxy="false"
                method="POST">
            <mx:request xmlns="">
                <idstaff>{parametr}</idstaff>
            </mx:request>
        </mx:HTTPService>
    I'm looking into source of 'A_send_read_record.php' in the internet browser and I see
    exact data tree (filtered) which I need.
    The problem here is : how to call function patient(event:ResultEvent) and give it
    data from the event to be assigned to ArrayCollection - like in first example.
    Thanks for all the ideas !!

    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex / AIR Development, Training, and Support Services
    <mx:HTTPService id="readRequestA"
    url="http://www.pudelek.pl/SCRIPT/A/A_send_read_record.php"
    useProxy="false" result="patient(event)" method="POST">
      <mx:request xmlns="">
        <idstaff>{parametr}</idstaff>
      </mx:request>
    </mx:HTTPService>

  • Had a Search Criteria and the result as table in header.Wanted to bind the result table to bean for the key value access

      Had Search Criteria and the result is displayed in the table in a panel header .  I want to get the selected  row value and parse the value to next Vo in next page for a bind variable . So i need to handle the  tbale value by biniding to the bean , but there was no option to bind the table for a bean.So how can i get the value selected .
    Regards,
    K M Krishna.

    First of all tell us your jdev version, please.
    to get to the selected row you don't need to bind the table to a managed bean. You can e.g. drag the needed attributes from the VO onto the page and drop them as inputText components. the Framework then generated the attribute bindings and sets the values of the current row to them. As you don't really need the inputText components switch to source mode (!this is essential!) and remove them. This will remove the visual component but the attribute bindings are kept.
    Know you can access the values via their EL or like you get the value from an attribute via it's binding.
    Timo

  • Binding a result to an ArrayCollection

    Hi,
    I am novice in Flex/blazeDS so I guess it's stupid question. But I didn't find answer to my question.
    I found an example how to bind result from RemoteObject to DataGrid control in blazeds_devguide.pdf but I am still facing one trouble.
    Here is my code:
    >
    >
    >
    >
    >
    After clicking on "Get Employee List" button myDG1 shows right data whereas myDG1 shows something like this: [object Object],[object Object]
    Why?
    Thanks,
    //pyso

    What are you expecting to receive back in employeeAC?
    You will need to have ActionScript classes in your client that these objects map to. I'll assume that you're using Java Remoting with BlazeDS (you don't say exactly what your server is). You can do this one of two ways:
    [RemoteClass(alias="my.java.package.Employee")]
    public class EmployeeAC
    or define MyActionScriptClass but somewhere in your application initialisation, call
    flash.net.registerClassAlias("my.java.package.Employee", EmployeeAC)
    These tell the client side how to decode the contents of a remote object. In the absence of any mapping from a remote object to a local class you will get either an Object or an ObjectProxy, which probably isn't what you want.
    HTH.

  • CAML query for more than two items in a list and bind those result to gridview?

    Hi Team,
    I am binding sharepoint 2013 list to gridview programatically.
    Now i need to search the results. If i gave some key word in text box and click on search.
    Then it should display only those values in gridview using caml query.
    Below is my form.

    Hi,
    Here is a blog about the CAML Query with Multiple Conditions for your reference:
    http://aasai-sharepoint.blogspot.com/2013/02/caml-query-with-multiple-conditions.html
    If you want to filter the list item, here is a web part from codeplex with the source code for your reference:
    SharePoint ListView Filter
    https://splistviewfilter.codeplex.com/
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • HTTPService.result?

    I've got a HTTPService object.  In mxml I can write it like:
             <mx:HTTPService id="gateway" url="someURL" method="POST" resultFormat="e4x" result="gatewayHandler(event)" />
    If I try to create this in ActionScript, how do I add the result attibute?  The other ones are easy:
         var gateway:HTTPService = new HTTPService();
         gateway.url = "someURL";
    etc., but:
         gateway.result = gatewayHandler(event);
    gives an error message.  How do I add this handler in ActionScript?

    try
         var gateway:HTTPService = new HTTPService();
         gateway.url = "someURL";
    gateway.addEventListener(ResultEvent.RESULT, gatewayHandler);
      gateway.addEventListener(FaultEvent.FAULT, faultHandler);

  • How to bind ASP Result to Combobox

    I am new in Flex builder. I have one page in Flex (One Combo
    box and submit button).
    I have one asp page.In that page i open the database
    connection and form the XML Result and return to the Flex.
    In Flex, how do i bind the ASP result to Combo box?
    give me example?

    Hi Sethumail2000,
    I have a similar example - an ASP.NET page generates some
    fairly complex XML with (among other things) structure
    <Result>
    <Deposits>
    <Deposit>
    <various other bits>...</bits>
    <ReleaseTitle>something</ReleaseTitle>
    </Deposit>
    <Deposit>
    <various other bits>...</bits>
    <ReleaseTitle>something else</ReleaseTitle>
    </Deposit>
    etc
    </Deposits>
    </Result>
    Then I have an XML object and a combo
    deposit_list_xml: XML
    <mx:ComboBox id='deposit_list' />
    and in the receive handler from the call to the ASP.NET page
    I have
    deposit_list_xml = XML(result from the call);
    deposit_list.dataProvider =
    deposit_list_xml.Deposits.Deposit.ReleaseTitle;
    Hope that helps
    Richard

  • Frameset in HTTPService result?!

    Flex appears to be wrapping my XML in a frameset when I
    invoke my HTTPService's "send()" method, and this is screwing up
    the parsing of the response. (I'm getting the dreaded "Error 1090:
    XML Parser Error..." runtime error.) It's not being done by my
    server, because if I just surf that URL in a browser, I get what I
    expect: pure XML.
    Anyone know what's going on?
    Thanks,
    -db

    This turned out to be a cross-domain security issue. I was
    using an alias in my "url" property. When I used the real domain
    name, it started working.

  • Combobox populate from HTTPService query

    I got this working with static XML files, but now its not
    working with HTTPService! I'm having problems getting a ComboBox to
    fill up with dynamic data from an SQL query which spits back XML
    data. I am basically filling one ComboBox based on the selection
    from another ComboBox. On startup, I call this method:
    public function loadSystems(serv:HTTPService, s:String) :
    void {
    var params:Object = {};
    params[s] = s;
    serv.send(params);
    To fill in the first ComboBox, which is defined as:
    <mx:ComboBox minWidth="130" maxWidth="130" id="mainSys"
    dataProvider="{sysOps.lastResult.system.data}"
    change="fillComboBox(mainSys, subSys, 'subsystem', subOps,
    sysIDs)" rowCount="10" />
    It fills up fine, but the fillComboBox method (below) comes
    up with a null result and fails
    // fill destination combobox based on selection from src
    combobox
    public function fillComboBox(src:ComboBox, dest:ComboBox,
    arg:String,
    serv:HTTPService, idArray:ArrayCollection) : void {
    var ind:int = src.selectedIndex;
    // choose ID from the ID array with the selecetedIndex
    var select:String = idArray.getItemAt(ind) as String;
    var params:Object = {};
    params[select] = select;
    params[arg] = arg;
    serv.send(params);
    dest.dataProvider = serv.lastResult.system.data; //
    serv.lastResult is null
    I know the server side is getting valid arguments in params
    and is spitting out valid XML so the problem is on the Flex side.
    Any ideas or help would be greatly appreciated. Thanks!

    Although caching is a common problem, that is not the cause
    of your problem. In Flex, all HTTPService calls are asynchronous,
    which means you cannot call the service and set the result in the
    same function like you are doing in your fillComboBox method. You
    need to add an event listener and get the result in a different
    method. However, in your function you are also passing the
    destination which complicates things. Instead of passing the
    destination, you could try passing a function that will assign the
    result to the component you want dynamically:
    change="fillComboBox(mainSys, setSubSys, 'subsystem', subOps,
    sysIDs)"
    public function fillComboBox(src:ComboBox,
    resultFunction:Function, arg:String, serv:HTTPService,
    idArray:ArrayCollection) : void
    serv.addEventListener(ResultEvent.RESULT,resultFunction);
    private function setSubSys(evt:ResultEvent):void {
    subSys.dataProvider = evt.result.system.data;
    In general, it makes debugging much easier if you avoid
    binding HTTPService results directly to components and instead use
    a listener function where you can examine the result data for any
    problems.
    Vygo

Maybe you are looking for