Consecutive webservice .send()

Hello forum,
I'm new at Flex and ActionScript and I am in trouble with Web
Service Consumption. In my application, I need to call several
times to the same Web Service but with one different request
parameter.
The thing is, that once performed all the .send(), the
resultHandler is called, but always with the last value I gave to
that request parameter, so the result is always the same.
I paste some of the code:
employeeID = "00005001";
wsGetEmployeeData.EmployeeGetdata.send();
employeeID = "00005002";
wsGetEmployeeData.EmployeeGetdata.send();
private function
resultGetEmployeeData(event:ResultEvent):void{
xmlEmpData= wsGetEmployeeData.EmployeeGetdata.lastResult;
<mx:WebService id="wsGetEmployeeData" wsdl="url">
<mx:operation name="EmployeeGetdata"
resultFormat="e4x"
result="resultGetEmployeeData(event);"
fault="faultGetEmployeeData(event);">
<mx:request>
<EmployeeId>{employeeID}</EmployeeId>
</mx:request>
</mx:operation>
</mx:WebService>
Does anyone have an idea of how to call the Same Webservice?
Thank you,
toni

It is my understanding that each WebService.send() will
result in your
result handler being called. It is being called twice, but
you are
probably only seeing the results of the second call as you
are
overwriting the xmlEmpData variable.
I think that you can use AsyncTokens to track the different
requests.
Hope this is some help
Martyn
tonnimontana wrote:
> Hello forum,
>
> I'm new at Flex and ActionScript and I am in trouble
with Web Service
> Consumption. In my application, I need to call several
times to the same Web
> Service but with one different request parameter.
>
> The thing is, that once performed all the .send(), the
resultHandler is
> called, but always with the last value I gave to that
request parameter, so the
> result is always the same.
>
> I paste some of the code:
>
> [..]
> employeeID = "00005001";
> wsGetEmployeeData.EmployeeGetdata.send();
> employeeID = "00005002";
> wsGetEmployeeData.EmployeeGetdata.send();
> [..]
> private function
resultGetEmployeeData(event:ResultEvent):void{
> xmlEmpData=
wsGetEmployeeData.EmployeeGetdata.lastResult;
> [..]
> <mx:WebService id="wsGetEmployeeData" wsdl="url">
> <mx:operation name="EmployeeGetdata"
> resultFormat="e4x"
> result="resultGetEmployeeData(event);"
> fault="faultGetEmployeeData(event);">
> <mx:request>
> <EmployeeId>{employeeID}</EmployeeId>
> </mx:request>
> </mx:operation>
> </mx:WebService>
> [..]
>
> Does anyone have an idea of how to call the Same
Webservice?
>
> Thank you,
> toni
>
>

Similar Messages

  • Consecutive calls to: webservice .send()

    Hello forum,
    I'm new at Flex and ActionScript and I am in trouble with Web
    Service Consumption. In my application, I need to call several
    times to the same Web Service but with one different request
    parameter.
    The thing is, that once performed all the .send(), the
    resultHandler is called, but always with the last value I gave to
    that request parameter, so the result is always the same.
    I paste some of the code:
    employeeID = "00005001";
    wsGetEmployeeData.EmployeeGetdata.send();
    employeeID = "00005002";
    wsGetEmployeeData.EmployeeGetdata.send();
    private function
    resultGetEmployeeData(event:ResultEvent):void{
    xmlEmpData= wsGetEmployeeData.EmployeeGetdata.lastResult;
    <mx:WebService id="wsGetEmployeeData" wsdl="url">
    <mx:operation name="EmployeeGetdata"
    resultFormat="e4x"
    result="resultGetEmployeeData(event);"
    fault="faultGetEmployeeData(event);">
    <mx:request>
    <EmployeeId>{employeeID}</EmployeeId>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    Does anyone have an idea of how to call the Same Webservice?
    Thank you,
    toni

    It is my understanding that each WebService.send() will
    result in your
    result handler being called. It is being called twice, but
    you are
    probably only seeing the results of the second call as you
    are
    overwriting the xmlEmpData variable.
    I think that you can use AsyncTokens to track the different
    requests.
    Hope this is some help
    Martyn
    tonnimontana wrote:
    > Hello forum,
    >
    > I'm new at Flex and ActionScript and I am in trouble
    with Web Service
    > Consumption. In my application, I need to call several
    times to the same Web
    > Service but with one different request parameter.
    >
    > The thing is, that once performed all the .send(), the
    resultHandler is
    > called, but always with the last value I gave to that
    request parameter, so the
    > result is always the same.
    >
    > I paste some of the code:
    >
    > [..]
    > employeeID = "00005001";
    > wsGetEmployeeData.EmployeeGetdata.send();
    > employeeID = "00005002";
    > wsGetEmployeeData.EmployeeGetdata.send();
    > [..]
    > private function
    resultGetEmployeeData(event:ResultEvent):void{
    > xmlEmpData=
    wsGetEmployeeData.EmployeeGetdata.lastResult;
    > [..]
    > <mx:WebService id="wsGetEmployeeData" wsdl="url">
    > <mx:operation name="EmployeeGetdata"
    > resultFormat="e4x"
    > result="resultGetEmployeeData(event);"
    > fault="faultGetEmployeeData(event);">
    > <mx:request>
    > <EmployeeId>{employeeID}</EmployeeId>
    > </mx:request>
    > </mx:operation>
    > </mx:WebService>
    > [..]
    >
    > Does anyone have an idea of how to call the Same
    Webservice?
    >
    > Thank you,
    > toni
    >
    >

  • Webservice sender . Pls advice urgent

    Hi Piyush/All,
    My scenario is
    System A (Webservice) -- XI -- File
    System A is providing WebService(wsdl) to XI
    So It is a webservice(wsdl) of System A.
    XI will import that wsdl as External Defination and map to File Interface.
    System A will send soap request to XI.
    Can this scenario be made
    1. Soap Sender Adapter --- XI --- File Receiver Adapter?
    2. WebServer needs to be installed at System A?
    Regards

    1 Soap Sender Adapter --- XI --- File Receiver Adapter?
    ans:yes
    2. WebServer needs to be installed at System A?
    ans:yes
    Check links on soap.
    For SOAP see below links
    /people/shabarish.vijayakumar/blog/2006/03/23/rfc--xi--webservice--a-complete-walkthrough-part-1
    /people/shabarish.vijayakumar/blog/2006/03/28/rfc--xi--webservice--a-complete-walkthrough-part-2
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/befdeb90-0201-0010-059b-f222711d10c0
    /people/padmankumar.sahoo/blog/2005/02/15/an-overview-of-soap
    How to use SOAP adapter:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40611dd6-e66e-2910-f383-e80fb44f9cd4
    SAP AII - How to consume and expose webservices  ?

  • Webservice sender and Receiver. Pls advice urgent

    Hi All,
    My Scenario
    System A (WebService) -- XI -- System B (WebService)
    Pls let me know
    1. What does it mean by WebService needs WebServer?
    2. For System A (WebService) -- XI
        Do I require WebServer to be installed at System A or XI?
    3. For XI -- System B (WebService)
    Do I require WebServer to be installed at System B or XI?
    Pls advice urgent.
    Regards

    Hi Piyush,
    Hi Piyush,
    System A (WebService) -- XI --- System B (WebService)
    I know the flow -- like both webservices will be impoted as External Definations and will me mapped.
    I was asking about Webserver.
    a. XI --- System B (WebService)
    System B is providing wsdl.
    WebServer is required at System B -- fine.
    b. System A (WebService) -- XI
    System A is providing WebService(wsdl) to XI
    XI is NOT providing WebService to System A.
    So It is a webservice(wsdl) of System A. It will be given to XI and XI will import it as wsdl.
    So do we or not require require Webserver in
    System A or XI?
    Pls tell System A (WebService) -- XI
    Webserver part.
    Regards

  • I need call webservice send three parameter!!!

    Hi I've a webserver and need pass two paramters to him, sample:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <addUsuario xmlns="http://tempuri.org/">
          <Chave>string</Chave>
          <AtivaGPS>int</AtivaGPS>
          <Foto>base64Binary</Foto>
        </addUsuario>
      </soap:Body>
    </soap:Envelope>
    PS.: The last parameter is a picture and I will send BLOB value.
    But I never working with WS and Iphone, if someone can pass me an example I thank.

    http://www.icodeblog.com/2008/11/03/iphone-programming-tutorial-intro-to-soap-we b-services/
    Just create a http request and write the XML text to the request and post to the server.  This is exactly the same as doing a HTTP POST operation.

  • Can SOA validate invoice data before the webservice sends a response?

    I'm working with another branch of the company, and they're having trouble getting SOA to validate invoice data before it goes into Oracle financials.  They claim that SOA can't validate the invoices according to our business rules, and can only validate the input data based on the schema defined in the webservice.  Even the validation from the schema is useless because it produces schema violation rules that I can't return to a user. 
    After the webservice lets go of the data, there's a multi-step scheduled process where the data is handed off from scheduled process to scheduled process, so SOA can't guarantee in any way to the client end that invoices will get into the database. and worse, the data could get "stuck" at any one of these stages far after a user has submitted it.
    Is any of this true?  Is there no programming language within SOA that can perform validation of the business rules, and insert the data into Oracle all on it's own?  I've little or no familiarity with Oracle, but it's kind of incredible to believe that this is how Oracle designed the major interface to interact with 3rd party applications.

    People insist on using HTTP because it is the easiest to get through forward proxies, reverse proxies, and firewalls.
    If you don't have to deal with those devices, then there are other protocol options.
    As far as the amount of data, that is what my customers want to upload...
    I suppose I could break it down into multiple requests, use compression etc.
    I could also have the server reset the connection on a fatal error like this. (one which occurs within the POST body)
    That would eliminate the keep-alive also since I do not want to waste another 10 minutes to resync the messages.
    Regards,
    Tim

  • Same MessageID  from sender(Webservice) --  PI --  ECC and vice versa

    Folks,
    We have a sender and receiver  webserver which has its own monitoring system in it and it tracks messages by means of Message ID which it creates .
    Now this web service when hits PI it sends the message ID in a field in payload.
    The message ID which the webservice sends is now different then which is created in PI as the  message propagates
    The same message ID is created in ECC as we all know .
    Now Our problem is we are  finding it difficult to track messages from webservice Outbound as well as inbound
    If there are 100 messages we have to search on the basis of time only , we cant search on message ID
    My question is can we have a unique message ID throughout the scenario.
    ( i.e webservice -- PI-- ECC and ECC -- PI --Webservice)
    Please  help
    thanks
    Ninad

    Thanks Gouri ,
    In case of webservice sender the webservice sends a message ID in a payload ( they have there own monitoring using there own message ID )
    Being in Support , I get a call that message belonging to  xxxxx message ID has failed. Now when I look in SXMB_MONI
    I see 1000 messages between same sender and receiver.
    I have to check payload and check the said message ID and then find the message , this is Cumbersome
    hope we find some better approach
    Thanks
    Ninad

  • I' d like to send files through webservice not using XI

    i am trying p2p connection with Webservice.
    sending message success but files not.
    is any way to send files? someone tell that SOAP attach maybe help me.
    but i don't know how to do.
    please let me know how to use SOAP attach in SAP.
    all your comments make me solve my problem.
    thanks.

    InDesign CS4 can open .indd, .indt  and .inx files from earlier versions, but not from later. It should, however, be able to open .idml files saved or exported from newer versions, with the understanding that unsupported features will be lost, text will probably reflow due to differences in texts engines between versions, and that the greater the gap between versions the more likely there are to be noticeable differences from the original. You will need to be sure CS4 is at version 7.0.6 to read the .idml.

  • How to call webservice application using Browser

    Hi Everybody,
    Synchronous Scenario:  Calling XI Server using WebServices( Sending the Customer no through Soap and from there the receiver adapter RFC is picking that no and it will send it to R/3 using BAPI and getting the Customer Details from R/3.
    I followed the below two blogs and I created the complete scenario. And I deployed the ear file in WebAs in xi server.
    Now the question is how to run this program using the browser. That is how to call.
    Message Interface Name: CDWS_MI
    Service Name                : Soap_Service
    Namespace                   : urn:xiwebservicesusingwebdynpro.com
    Can you tell me how to call through the browser?
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3592---- [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    >1
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3593---- [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    >2
    Advance thanks,
    Abdullah Shaik.

    Hi,
    It's not clear to me what you did. Have you exposed an XI Message Interface through a Web Service? Or have you developed a Web Service in the other way? What is the "ear" that you said? Is an webdynpro app? If it is, I think your question would be properly answered at WebDynpro forum
    cheers!
    roberti

  • Call to ABAP webservice failed following upgrade to ECC6

    Hi all,
    I have the following interface : LDAP (webservice) ->XI 3.0sp17 -> ECC5 (webservice) sending employees id. it works fine.
    But, these days, SAP ECC has been upgraded from ECC5 to ECC6 (was 7.0). And now the call to the ECC webservice does not work anymore. I have the following error message in XI monitoring :
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="PARSING">ADAPTER.SOAP_EXCEPTION</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>soap fault: SOAP processing failure, error id = 1001</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    The webservice is based on a function module that works fine when I test it. The webservice is active.
    The issue is that I do not know if the problem comes fromm ECC or from XI...
    Could it be a compatibility issue?
    If anyone could help me, it would be great!
    Thanks,
    Philippe

    The point has been solved by this way :
    On ECC6, we have activated the webservice again, in spite of his "activated" status.
    To do this, I used the SE80 transaction :
    Package Z*** -> Enterprise Services --> Enterprise Services --> Description service --> Z*** (name of the webservice)
    Then activation of the webservice, double-click on Reference object and activation of the Function module.
    P. Rose.

  • Webservice response in BPM scenario

    I am doing a BPM scenario where I take data from ERP asynchronously using proxy and send it as a request to a third party synchronous webservice. The webservice gives a response and I am using the response to send it further along to other systems.
    Everything works fine if correct messages are sent and received. The problem starts when PI/BPM receives an un-expected response from the webservice. If the webservice sends an unknown error message in the response, the mapping fails and goes into the error queue. (smq2)
    And the real problem is every successful message or response after that also goes into the same queue and getting stuck. Why is this happenning? Do we need to monitor and clear the error queues all the time so that subsequent successful messages go through BPM corrrectly?
    Do you guys think it is a cache problem or something else?
    Thank you.

    this is because there is no proper error handling in your BPM.
    you need to handle the exceptions in case of mapping or communication failures.
    refer : http://help.sap.com/saphelp_nw04/helpdata/en/33/4a773f12f14a18e10000000a114084/frameset.htm

  • Async WebService processed as synchronous

    Hi,
    I have the following scenario on a SAP XI 7.0
    webService -> R/3 Idoc
    As I don't want to use the sync/async bridge I defined the webService sender channel with QoS = Exactly Once to make it asynchronous.
    The calling client (correctly) gets back an http 200 response. However, in the SAP XI monitoring I see QoS = Best Effort, processing mode = synchronous and the error message:
    "The process does not support the given synchronous interface or does not support synchronous messages
    Exception CX_WAPI_DEF_PROPERTY_NOT_FOUND occurred"
    All interfaces are defined asynchronous.
    Has anybody an idea?
    Thanks, Petra

    Petra,
    Have you defined an Asynch outbound interface and followed the wizard in ID to create your WSDL? Also, in Sender SOAP channel, make the setting as EO.
    Regards
    Jai

  • Error in calling webservice in XI

    Hi All,
    We are facing the folllowing error in calling a Webservice in XI from XML Spy.
    QOS = BestEffort
    We are getting the following response
    <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
    <context>XIAdapter</context>
    <code>DeliveryException</code>
    <text><![CDATA[
    com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapter:SYSTEM_FAILURE_INTERNAL:
         at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:451)
         at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:125)
         at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:831)
         at com.sap.engine.frame.core.thread.Task.run(Task.java(Compiled Code))
         at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java(Compiled Code))
         at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:150)
              ]]></text>
    </s:SystemError>
    In SXMB_MONI the error is
    <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="BPE_ADAPTER">SYSTEM_FAILURE_INTERNAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>An internal error has occurred</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>
    In adapter monitoring SOAP adapters are having GREEN status.
    The scenarios are of the form Weservice <=> XI(BPM) <==> (Multiple External Systems)
    In SXI_CACHE the Integraton Process RETURN CODE is 99 for all. 
    (We have RETURN CODE is 99 for many of the Integraton Processes which are used in Plain-Adapter based scenarios and all of them are working fine)
    We are facing this problem for all WebService(Sender) based interfaces.
    We are on XI QAS and all these are working sucessfully on XIDEV.
    XI Level is - 3.0 SP15
    Any help is appreciated.
    Thanks in Advance,
    Regards,
    Chemmanz

    Hi,
    Looks like there is some kind of error when the message was received by the bpm or when the message was being sent out of the bpm.
    In the monitor, corresponding to your message, click on PE. You could find any error in the bpm there.
    Regards,
    Smitha.

  • Webservice through an exception -- SAP XI  namespace is missing in XML

    Hello Experts,
    we have a HTTP(synchron) --> XI --> SOAP (synchron) ---> XI --> HTTP Scenario.
    A webapplicaton sends a number to XI. XI sends the number (integrationprocess) to a  webservice an gets same information back. This information will be send back to the
    webapplication.
    In same cases the webservices through an exception (it's okay, depend on date).
    But XI can't read this XML because one namespace is missing.
    The webservice sends the XML correctly. We have tested it.
    It seems inside XI one namespace of the XML will lost.
    We can't see the reason for it.
    An Application Fault Exception is thrown in XI
    In the RWB we see this: SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault
    The soap communication channel has an error.
    We try to arise the severity of the tracelevel to see more information, but without success.
    So we don't find any information for this error.
    Do you know this problem?
    Thanks in advance!
    Jürgen

    Hi
    for namespaing mssing see the below blogs
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    http://www.troobloo.com/tech/xslt.toc.shtml
    http://www.w3schools.com/xsl/
    http://www.w3.org/TR/xslt
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/generic%20xslt%20mapping%20in%20sap%20xi%2c%20part%20i.pdf
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    Required XSLT Mapping tips!
    Thnaks
    sudhir sharma

  • Communicating with a 3rd party system using webservices

    Hi all,
    I have a scenario
         3rd party <-> XI<->CRM.
    here im using SOAP between 3rd party <->XI, xi<->CRM im using ABAP proxies.
    scenario 1. 3rd party would send messages(client request) to cRM to get some data. CRM has to respond for that.
    scenario 2. CRM would request the 3rd party to get some data, then 3rd party would respond.
    scenario 3. there is no request from 3rd party but crm has to send the data.
    So 3rd party would communicate using webservices sends the request to cRM. if there is any request from cRM then 3rd party have a webservice to serve.
      My question is
      1) for cRM side i should create a webservice? if i create this where shold i create? i mean i should put this webservice on WAS of CRM or on XI ? If i create this webservice and put on CRM WAS, could this communicate with XI by using ABAP proxies? when CRM sends a request to 3rd party, to send this i should create another webservice ?
    could you please anyone tell me about this?
    thanks a lot in Advance

    Hi,
    <i>for cRM side i should create a webservice? if i create this where shold i create? i mean i should put this webservice on WAS of CRM or on XI ? If i create this webservice and put on CRM WAS, could this communicate with XI by using ABAP proxies?</i>
    As to your first question, you dont have to create webservice on CRM side, all you have to do is to define an outbound interface in XI, and generate proxies for that outbound interface in CRM.
    <i>when CRM sends a request to 3rd party, to send this i should create another webservice ?</i>
    You havent specified who the 3rd party is DataBase/R3/etc. Let us assume the end system is truely external from your landscape. if the 3rd party provides you with a webservice, you can import taht webservice into XI and use it as an inbound interface.
    Hence, you would then map the outbound interface from CRM-> XI to your inbound interface XI->3rd party.
    3rd party provided webservice could be written in java/.net.
    Naveen

Maybe you are looking for

  • Error oxe800001 - cannot find iphone

    Have upgraded my ipod touch with new january apps - my windows vista pc thinks its a digital camra but does not install the right druivers itunes just comes up wit the cannot find iphoine message can anyone help?

  • Dead links in iWeb site - IE only

    I have just published my first iWeb site: www.envisioningchange.ca All seems to work great in Safari and Firefox (though plug-in for social media sharing "Add This" is down right now), however many of the links, some of them in the text (not just nav

  • Can u please give me inforamation on SRM flow ?

    Hi All, Can u please give me inforamation on SRM flow and shopping cart? and any usefull links or information to find tech information like tables BADI's transactions and where master tables. Thanks for ur time Kiran.

  • How to download a WebDynpro ABAP Application?

    Hi, I have created a Webdynpro ABAP application from SE80. now I want to move this same application to another SAP system. Is it possible via downloading to flat file and uploading from flat file to destination system or something like that? can anyo

  • How do i find out what year my imac was made?

    how do i found out what year my imac G5 was made?