How to display response from webservice in second view?

Hello,
I would like to develop an application which should do a webservice request from one view and displays the result on another view. How can I do this? Is there an example how to do this?
Thanks in advance.
Kind regards,
Carsten

Hi Carsten,
let view VA be the requesting view, VB the view to display the response and RCC a custom controller which is used for actually performing the request and "owns" the Web Service model, then you need the following:
1. VA has a context node with attributes mapped to the request-attributes of the model. If necessary, some UI elements may be bound to these request attributes. For triggering a request, there's an additional button.
2. VB has a context node mapped to the response/result node of the WS model. There could be a table bound to the node in case of multiple possible results.
3. RCC imports the Web Service model and acts as the service controller (you can use Apply template->Service controller to achieve that) and provides a method "executeXXX" to call the Web Service.
If the button in VA is pressed, executeXXX is invoked, the service is called using the current contents of the request attributes of the model, results are stored in the response/result node. Invalidating the node will display the result(s) in VB.
Hope that helps.
Regards
Stefan

Similar Messages

  • How to read response from WebService call

    Hi,
    I am consuming webservices in ABAP. I got proxy classes created. Port is also created.
    I am calling classes generated by proxy in ABAP. Classes creates few structure by system. when i make a call to service, I am not getting importing values in veariables declared. Trace file (in SOAMANAGER ) shows call successful & XML file shows the correct response values, but are not appearing in program variables. I declared variables of same type generated by system.
    My question is, am I missing any step.configuration? or how to read the variables?
    Thanks in advance.
    Sunil

    You coud create a procedure like this:
    CREATE OR REPLACE PROCEDURE soap_env_pr (p_soap_env IN VARCHAR2)
    IS
       v_start     NUMBER;
       v_end       NUMBER;
       v_message   VARCHAR2 (400);
       v_length    NUMBER;
    BEGIN
       v_start := INSTR (p_soap_env, '<ns0:Ok>');
       v_length := LENGTH ('<ns0:Ok>');
       v_end := INSTR (p_soap_env, '</ns0:Ok>');
       v_message :=
              SUBSTR (p_soap_env, v_start + v_length, v_end - v_start - v_length);
       HTP.prn ('Ok: ' || v_message);
       v_start := INSTR (p_soap_env, '<ns0:SessionNumber>');
       v_length := LENGTH ('<ns0:SessionNumber>');
       v_end := INSTR (p_soap_env, '</ns0:SessionNumber>');
       v_message :=
              SUBSTR (p_soap_env, v_start + v_length, v_end - v_start - v_length);
       HTP.prn ('SessionNumber: ' || v_message);
       v_start := INSTR (p_soap_env, '<ns0:ErrorMessage>');
       v_length := LENGTH ('v_length');
       v_end := INSTR (p_soap_env, '</ns0:ErrorMessage/>');
       v_message :=
              SUBSTR (p_soap_env, v_start + v_length, v_end - v_start - v_length);
       HTP.prn ('ErrorMessage: ' || v_message);
    END;and call it like this:
    BEGIN
       soap_env_pr
          ('<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/>
    <env:Body>
    * <invokeScenarioResponse xmlns:ns0="xmlns.oracle.com/odi/OdiInvoke/" xmlns="xmlns.oracle.com/odi/OdiInvoke/">*
    * <ns0:Ok>true</ns0:Ok>*
    * <ns0:SessionNumber>2223201</ns0:SessionNumber>*
    * <ns0:ErrorMessage/>*
    * </invokeScenarioResponse>*
    </env:Body>
    </env:Envelope>'
    END;That would give you this output:
    Ok: true
    SessionNumber: 2223201
    ErrorMessage:Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Response from webservice needs to send as Mail content

    Hello,
    i have to configure a scenario as given below
               IDOC --> JDBC --> WebService and response from WebService to SMTPmail receiver.
    now i got strucked at Webservice response. after i got the response from WebService(SOAP), i need to send the both Request and response to Mail Receiver. So Please let me know how to capture request and response both to my SMTPmail adapter(as content or attachment).let me know the steps to proceed for SMTPmail Receiver
    Regards,SARAN

    Hi Raj,
    Thanks for teh reply.
    i have already configured teh above mentioned scenario.but i am not able to get Request and response.
    Could you pelase provide teh steps how to configure BPM in this scenario..(as ia m not handson with BPM)
    Reagrds,Saran

  • How to display data from a recordset based on data from another recordset

    How to display data from a recordset based on data from
    another recordset.
    What I would like to do is as follows:
    I have a fantasy hockey league website. For each team I have
    a team page (clubhouse) which is generated using PHP/MySQL. The one
    area I would like to clean up is the displaying of the divisional
    standings on the right side. As of right now, I use a URL variable
    (division = id2) to grab the needed data, which works ok. What I
    want to do is clean up the url abit.
    So far the url is
    clubhouse.php?team=Wings&id=DET&id2=Pacific, in the end all
    I want is clubhouse.php?team=Wings.
    I have a separate table, that has the teams entire
    information (full team name, short team, abbreviation, conference,
    division, etc. so I was thinking if I could somehow do this:
    Recordset Team Info is filtered using URL variable team
    (short team). Based on what team equals, it would then insert this
    variable into the Divisional Standings recordset.
    So example: If I type in clubhouse.php?team=Wings, the Team
    Info recordset would bring up the Pacific division. Then 'Pacific'
    would be inserted into the Divisional Standings recordset to
    display the Pacific Division Standings.
    Basically I want this
    SELECT *
    FROM standings
    WHERE division = <teaminfo.division>
    ORDER BY pts DESC
    Could someone help me, thank you.

    Assuming two tables- teamtable and standings:
    teamtable - which has entire info about the team and has a
    field called
    "div" which has the division name say "pacific" and you want
    to use this
    name to get corresponding details from the other table.
    standings - which has a field called "division" which you
    want to use to
    give the standings
    SELECT * FROM standings AS st, teamtable AS t
    WHERE st.division = t.div
    ORDER BY pts DESC
    Instead of * you could be specific on what fields you want to
    select ..
    something like
    SELECT st.id AS id, st.position AS position, st.teamname AS
    team
    You cannot lose until you give up !!!
    "Leburn98" <[email protected]> wrote in
    message
    news:[email protected]...
    > How to display data from a recordset based on data from
    another recordset.
    >
    > What I would like to do is as follows:
    >
    > I have a fantasy hockey league website. For each team I
    have a team page
    > (clubhouse) which is generated using PHP/MySQL. The one
    area I would like
    > to
    > clean up is the displaying of the divisional standings
    on the right side.
    > As of
    > right now, I use a URL variable (division = id2) to grab
    the needed data,
    > which
    > works ok. What I want to do is clean up the url abit.
    >
    > So far the url is
    clubhouse.php?team=Wings&id=DET&id2=Pacific, in the end
    > all
    > I want is clubhouse.php?team=Wings.
    >
    > I have a separate table, that has the teams entire
    information (full team
    > name, short team, abbreviation, conference, division,
    etc. so I was
    > thinking if
    > I could somehow do this:
    >
    > Recordset Team Info is filtered using URL variable team
    (short team).
    > Based on
    > what team equals, it would then insert this variable
    into the Divisional
    > Standings recordset.
    >
    > So example: If I type in clubhouse.php?team=Wings, the
    Team Info recordset
    > would bring up the Pacific division. Then 'Pacific'
    would be inserted into
    > the
    > Divisional Standings recordset to display the Pacific
    Division Standings.
    >
    > Basically I want this
    >
    > SELECT *
    > FROM standings
    > WHERE division = <teaminfo.division>
    > ORDER BY pts DESC
    >
    > Could someone help me, thank you.
    >

  • How  to get  response from such a  function

    How  to get  response from such a  function (in MODULE USER_COMMAND_0010 INPUT I get "ODGOVOR" 'X'
    FUNCTION Z_SEENKRAT.
    ""Local Interface:
    *"  EXPORTING
    *"     REFERENCE(ODGOVOR) TYPE  MSEG-KZEAR
    DATA ok_code LIKE sy-ucomm.
    DATA: test like mseg-kzear.
    BREAK-POINT.
    call screen 10.
    test = ODGOVOR.
    ENDFUNCTION.
    *&      Module  CLEAR_OK_CODE  OUTPUT
          text
    MODULE clear_ok_code OUTPUT.
      CLEAR ok_code.
    ENDMODULE.                 " CLEAR_OK_CODE  OUTPUT
    *&      Module  USER_COMMAND_0010  INPUT
          text
    MODULE USER_COMMAND_0010 INPUT.
    DATA odgovor LIKE mseg-KZEAR.
    CASE ok_code.
        WHEN 'DA'.
        ODGOVOR = 'X'.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0010  INPUT

    Hi,
    You need to declare the ODGOVOR variable in the TOP include, then you will get the value
    Regards
    Sudheer

  • I'm wondering how to display "bullets" from the bottom to the top (last to first) in a slideshow.  Can anyone help?

    I'm wondering how to display "bullets" from the bottom to the top (last to first) in a slideshow.  Can anyone help?

    Select the set of bullets. Go to the "Build" panel of the Inspector. Choose "Build In". Choose your effect. Select "By Bullet Group" under delivery.
    Be sure to experiment with the various options.

  • How to display items from database using catagorylookupdroplet

    Hi everyone,
    i want to know how to display items from database using catagorylookup droplet. if anybody have any code snippet please share it.
    Thanks in advance,

    <dsp:droplet name=".................../CategoryLookup">
         <dsp:param name="id" param="itemId"/>
         <dsp:oparam name="output">
              <dsp:valueof param="element.displayName"/>
                   <%-- This is show the Child Category --%>
                   <dsp:droplet name="......................./ForEach">
                   <dsp:param name="array" param="element.childCategories"/>
                   <dsp:oparam name="outputStart">Child Categories</dsp:oparam>
                   <dsp:oparam name="output">
                        <dsp:a href="">//bydefault it will take its own file's name
                             <dsp:param name="itemId" param="element.repositoryId"/>                                                                                          <dsp:valueof param="element.displayName"/>
                        </dsp:a>
                   </dsp:oparam>                                             
                   </dsp:droplet>
                   <%-- This is show the Child Product --%>          
                   <dsp:droplet name=".............../ForEach">
                        <dsp:param name="array" param="element.childProducts"/>
                        <dsp:oparam name="outputStart">Child Products</dsp:oparam>
                                  <dsp:oparam name="output">
                                       <dsp:droplet name="................/ProductLookup">
                                            <dsp:param name="id" param="itemId"/>
                                            <dsp:param name="elementName" value="Prod"/>
                                            <dsp:oparam name="output">
                                                 <dsp:getvalueof id="img102" param="Prod.smallImage.url" idtype="java.lang.String">
                                                      <dsp:img height="250" width="250" src="<%=img102%>"/>
                                                 </dsp:getvalueof>
                                            </dsp:oparam>
                                       </dsp:droplet>
                                       <dsp:a href="productView.jsp">
                                            <dsp:param name="itemId" param="element.repositoryId"/>
                                            <dsp:valueof param="element.displayName"/>
                                       </dsp:a>
    Hope this helps.
    -RMishra

  • No response from WebService

    Hi, well i read file and want to send data to WS while getting info back, that data is transmitted. But because it should be synchronous i don't get any response from WS.
    What might be wrong?! even if the WS would answer, there should be an entry in Monitor!?
    br

    Ur sender is file which could not be sync. If u want to get the response from webservice, then u need to configure Async-Sync bridge using BPM.
    Regrads,
    Prateek

  • How to update the Sent Idoc Status based on the Response From Webservice

    Hi All,
    I have to develop Idoc--SOAP Sync Process Scenario Using BPM .
    I have configured every thing using BPM and mapped
    MATMAS----SOAP Request
    SOAP Resp----STATUS.SYSTAT01
    In R/3  the Main Idoc Number(MATMAS) Status needs to be update , but it is creating the new Idoc with STATUS.SYSTAT01.
    I have used STATUS.SYSTAT01 Idoc to Update the status of the Original idoc based on the Response that is coming from webservice .
    I was posted the same thread a days ago and there Bhavesh suggested me some sugessions.
    How can we make the status of the Idoc based on some response Text
    iam unable to follow OR not able to clear my self on this.
    Please suggest me or give some over view kind of thing on this
    Regards

    Hi Suman,
    It is clearly mentioned in SAP help that "SAP Intermediate Documents (IDOCS) are EDI like documents that are asynchronous in nature."
    So Your Scenario is Asynch(receive) - Synch(WS call) -Transformation (Multimapping)- Asynch(Send to R/3).
    now go in this way:
    you can develop all the message Interfaces  of  Abstract catagory (not manditory )
    MI_AA_MATMAS   -> Abstract Asynchronous message    interface for your Matmas IDOC
    MI_AS_SOAP_ReqandResp  -> Abstarct Syncronous MI for SOAP request and response.
    MI_AA_STATUS ->Abstract Asyncronous MI for Status Idoc
    MI_AA_SOAP_Req ->  Abstarct Asyncronous MI for SOAP request .
    MI_AA_SOAP_Res ->  Abstarct Asyncronous MI for SOAP response .
    Thats all in Message interface.
    your first reciever :
    (This will receive the message asynchronously from R/3)
    create a conatainer varaiable (say preceive) and assign it message interface MI_AA_MATMAS
    Now in thw Propert TAB of this step: give this message name.
    Step2: Synchronous call :
    create container Variable psoaprequest and psoapresponse  give abstract message interface MI_AA_SOAP_Req and MI_AA_SOAP_Req  resp.
    Now in thw Propert TAB of this step:
    Synchronous Interface : MI_AS_SOAP_ReqandResp
    Request Message : psoaprequest
    Response Message: psoapresponse
    Transformation Step :
    Here you will specify Interface Mapping that will conatain Multimapping between Synch Response - MATMAs and STATUS
    Let's name it as IM_ResandMatmasToStatus
    create a container variable as pstatus and assign it abstract interface MI_AA_STATUS.
    In Property pan of this step :
    Interface mapping :IM_ResandMatmasToStatus
    Source Message :psoapresponse
                                preceive
    (IT will ask you for two source messages as IM selected in this transformation has 2 source messages)
    Target Message :pstatus
    Send step:
    Select a message as pstatus.
    thats all in IR.
    If have doubt in ID just let me know.
    Thanks
    Sunil Singh

  • How to get response from an asynchronous BPEL process in Java

    I'm experimenting with BPEL and doesn't seem to be able to get response from an asynchronous BPEL process. Here's the deal:
    I have a BPEL process that takes a string as input, and gives another string as output. This is a asyncronous process.
    I want to initiate this BPEL process as a web service so I generate a Webservice Proxy in JDeveloper 10g (10.1.3.0.4). The function to call the process is now called "initiate" and takes three arguments: the input string, a "org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType replyTo" and a
    "org.xmlsoap.schemas.ws._2003._03.addressing.AttributedURI messageID".
    HTTP-Analyzer shows that invoking the BPEL process with initiate("somestring", null, null) results in sending a SOAP message to the BPEL process, which returns a "202 Accepted". How do I get the response from the process? My intuition tells me that I have to use that second argument, that EnpointReferenceType thing. How do I use that?
    Another question: If a asynchronous BPEL process does not exists (so the endpoint does not exist) the Java proxy does not throw an error when runned. It does not even sends a message. It exits with status 0! (This happens for example when deploying a new version of a process and when the "old" version is undeployed). Calling a non-existing synchronous BPEL process, the Java proxy DOES throw an error.

    Clemens,
    That all sounds logical. But somehow it is still a mystery for me ... Somehow I don't see what should be done.
    To call the async BPEL process I have the following procedure:
    initiate(String input, org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType replyTo, org.xmlsoap.schemas.ws._2003._03.addressing.AttributedURI messageID)
    The first argument is the input for my BPEL process. The second is the address to a webservice that should handle the callback, right? The third is a messageID (makes sense, but why of the type AttributedURI?).
    Here lies my problem. It is not clear to me how these EndpointReferenceType & AttributedURI work. I can't find anything on the net about it. The AXIS examples as where mentioned earlier use other types (namely the "org.xmlsoap.schemas.ws.addressing.MessageID" and "org.xmlsoap.schemas.ws.addressing.ReplyTo") which are completely different.
    What I did so far:
    - I created an webservice proxy that listens on the onResult endpoint of the BPEL process.
    - I created an webservice proxy that calls the BPEL process through the initiate procedure, but it is not completely clear to me how to construct the EndPointreferenceType replyTo, and the MessageID. I did something like this:
    EndpointReferenceType replyTo = new EndpointReferenceType();
    // callback service running on local machine
    // This URI class is the java.net's version
    URI replyToURI = new URI("http://vaccinatie:8988/syncro-callback-context-root/stringconcatCallbackBindingPort");
    // This AttributedURI is the org.xmlsoap.schemas.ws._2003._03.addressing's version
    AttributedURI address = new AttributedURI();
    // the only public methos that made sense to me:
    address.set_value(replyToURI);
    replyTo.setAddress(address);
    // call the BPEL process
    myPort.initiate("test123", replyTo, address);
    But the above doesn't work (largely because I don't know what I'm doing here prob.:-) ) It does send the "test123" message, and the BPEL process does process it, but I don't seem to get the callback right.
    I hope this makes my problems somewhat clearer. I hope someone can help me, because I'm just a beginner in this whole "web service area" and seems to do something terribly wrong here, because it should be very simple. Thx.

  • SAP Idocs -How to handle response from target system

    Hi,
    I am working on a scenario in which I will send Idocs asynchronously from SAP thro a SOAP adapter to a  webservice deployed on the target system.
    After the Idoc data is posted in the target system,the target system will send the acknowledgement for the receipt(basically response message).How to handle this scenario?
    SAP Idoc( outbound asynchronous)---> SAP XI3.0(soap adapter) ---> Target system(inbound synchronous)
    Do I need to go for BPM to handle this situation?
    Is there any alterantive to BPM.
    If any of the forum members who have worked on the similar scenario could help me in finding a better solution,I will be thankful to them.
    Thanks,
    Leo

    Hi Udo,
    Thanks for the info.My scenario is like this.
    SAP R/3 Idoc -> SAP XI 3.0 <-> Webservice in the target system.
    The webservice in the target system will receive the Idoc as a request messsage and send a response message synchronously.
    Since Idoc is sent asynchronously( I believe Idocs sent from SAP are always asynchronous),there is no Proxy waiting in SAP R/3 to receive the response message from the target system.
    If I go for BPM for the above scenario,will the BPM steps look like the following.
    1)Receive Idoc from SAP.
    2)Send Idoc sysnchronously to webservice
    3)Receive the response from the webservice synchronously.
    4.Post the response message to a proxy which can handle it further in SAP R/3.
    Please note that my knowledge in BPM is limited and correct me if I am wrong.
    Thanks in advance
    S.Banukumar

  • HELP plz..How to send response from server to client

    Hi..plz help me out of this problem..i am sending request from client side to servlet..lets say i am sendin "Bechkam"..now my servlet fetches this request.n finds out that BECHKAM is a football player..now i dont want to print this on the client side..i simply want to sent this response back to the client..after client receives this response the client should print bechkam is a football player..i have done coding of sending request from client(javascript code)to server but dont kno how to send response to client..do i have to use cookies or sessions..
    Any help will be greatly appreciated
    THANX

    I'm not sure how well versed you're with HTTP and servlets.
    What you term as 'printing on the client side' is in fact the response you're looking for. The response you send from a servlet is 'printed' into the response stream. The client receives this data and interprets is according to some headers. Usually, this data is HTML/ plain text which is interpreted by the browser and rendered as required. It could very well be displayed as is.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    ----------------------------------------------------------------

  • How to display response of http request as a web page in ABAP?

    Hi all,
    In ABAP, we can use class <b>cl_http_client</b> to send a http requst and then got the response data as a XSTRING variable. Usually, the response data is the html source of a web page. How to display this web page within dynpro?
    I found we can use class <b>cl_gui_html_viewer</b> to display the web page of a URL or data in SAP web respository. Is there any way of using it to load response data in cl_http_client and display that web page?
    Thanks a lot.

    Welcome to SDN.
    1. use http_client->response->get_cdata( ).
    to get the response data in string format instead of xstring format.
    2. use FM CONVERT_STRING_TO_TABLE to covert the string to table of type W3HTML
    3. use method
    data: l_doc_url(255) type c.
          call method html_control->load_data
                      exporting
                         type         = 'text'
                         subtype      = 'html'
                      importing
                         assigned_url = l_doc_url
                      changing
                         data_table   = html_table.
    call method html_control->show_data
                      exporting
                         url       = l_doc_url.
    to load the html content and show it in cl_gui_html_viewer
    Regards
    Raja

  • How get java Object from webservice

    Hai
    i gave ArrayList<bean> , i can't get this ArrayList<bean> from webservice. How can i get ? via for each or iterator or any ?????
    Note: i iterated  but only one element was come from bean property  using next() of iterator .
    I need all property. any one please help.
    thanks
    Mr...Javan

    Try to return an Array instead of an ArrayList?
    Have a look at http://forums.sun.com/thread.jspa?forumID=331&threadID=5289022.

  • How to display screen saver every 10 seconds ?

    I want to display Screen Saver every 10 seconds as long as the user doesn't make anything on his computer.
    I did that :-
    WHEN-NEW-FORM-INSTANCE
    declare
         t timer;
    begin
         t:= create_timer('Hany',10000,repeat);
    end;
    WHEN-TIMER-EXPIRED
    if :System.MODE = 'NORMAL' then
         Host('C:\WINDOWS\system32\ssmypics.scr');
    End if;
    but in RunTime the Screen Saver's Setting appear not the Screen Saver itself ..... like shown below :-
    http://img118.imageshack.us/img118/245/errorv.png
    that's seems weird because when I run the Screen Saver directly from Start>>RUN :-
    C:\WINDOWS\system32\ssmypics.scr
    it is working nice without appearing of the setting.
    so, what's went wrong ????
    I attached the fmb file to have a look for it if you like:-
    http://www.4shared.com/file/97992483/5ddd2f8c/Screen_Saver.html
    Edited by: HanyFreedom on Apr 14, 2009 3:40 PM

    There is a built-in screensaver in windows, why rebuilt that functionality on your own? If you really need it, try
    HOST('cmd /c C:\WINDOWS\system32\ssmypics.scr');I assume that you are using forms 6i? For in 10g this will now work on the client-side, because HOST is executed on the app-server.
    Edited by: Andreas Weiden on 14.04.2009 17:45

Maybe you are looking for

  • Gspeed ES Pro RAID keeps disappearing from Mac, have to re-initialize!

    UPDATED VERSION: MAC PRO KEEPS LOSING CONNECTION TO RAID DRIVE. After 9 months of organizing a documentary film edit on an external RAID drive (12TB, Raid 0. Yes, I have 2 layers of backup), I purchased the PNY Nvidia Quadro 4000 video card for the p

  • In which table we get the details of related to goods issue and reversal

    dear experts, hello every body  please help me in finding the tables : case 1 : when i use mb1a to issue good with movement type 531 in which table can i find the stock details . case 2. same from 262,532. regards, Bh krishna mohan.

  • New MacBook on old Time Machine backup-creates a new one!

    I've read lots of posts on this, but I can't seem to find the anwer to my problem. I have a Time Machine backup of the last year. However, I just bought a new MacBook Air and I need for Time Machine to inherit this new Mac to my old backup. I used Mi

  • The text does not rotate

    Hi everyone, I'm pretty new here I'm trying to create some animations, I put some text in it, but when I tried to rotate the text within the animation, it doesn't work. The text stands inside the animation only when the animation is in its original f

  • IOS 6 download problem

    I have been trying to download and install IOS 6 on iPhone 4s, ipad2, itouch and it will not download. I have even tried going through iTunes. Help please. I get about 30 minutes into the download on all my devices (no I am not doing them at the same