How to call a webService from WebDynPro ABAP ?

We are trying to call a webService from WebDynPro-ABAP application. It is not working, While if we are calling the WebService from a Report, it is working.
How exactly do we call a WebService from a WebDynPro-ABAP application?
What are the main steps involved ?

Hi Phani,
You will need to create a service call as follows.
Right click on your WD component name and select Create->Service Call
The wizard will guide you through a series of steps to make a Web Service Call. On the 3rd screen, it will give you options such as Function Module, Web Service, etc
Before making a service call, you will need to create a proxy for the Web service in the ABAP Workbench using a WSDL document as a basis. To create or consume Web services, you will need the authorizations associated with the role SAP_BC_WEBSERVICE_ADMIN.

Similar Messages

  • Calling a webservice from webdynpro ABAP.

    Hi,
    Anybody have doc/material with screenshots on calling a webservice from webdynpro ABAP (In WAS 7.0 version using service calls )  with clear steps ?
    Thanks in advance. Ponts will not be a constraint for right answers
    Praveen
    Edited by: Praveen kumar Kadi on Feb 23, 2009 11:19 AM

    Hi Praveen,
    1st Step : configure Logical Port
    http://help.sap.com/saphelp_nw70/helpdata/EN/16/285d32996b25428dc2eedf2b0eadd8/frameset.htm
    2nd Step : Generate Proxy Object
    http://help.sap.com/saphelp_nw70/helpdata/EN/16/285d32996b25428dc2eedf2b0eadd8/frameset.htm
    3rd Step : Instantiating the proxy object & calling the methods exposed by webservice
    data: sys_exception type ref to cx_ai_system_fault,
          sys_exception2 type ref to cx_ai_application_fault,
          client_proxy type ref to zco_myesa, "MY PROXY CLASS
          lv_ret_code type int4,
          lv_input type zsend_email_input,
          lv_response type zsend_email_response.
    data: lv_from type string,
          lv_from_address type string,
          lv_to type string,
          lv_to_address type string,
          lv_subject type string,
          lv_msg type string.
    lv_input-from = 'MYSAPTEST'.
    lv_input-from_address = '<someAddress>'.
    lv_input-to = 'Prashant'.
    lv_input-to_address = '<someAddress>'.
    lv_input-subject = ' TEST'.
    lv_input-msg_body = ' Hi this is wonderfull to see it work'.
    try.
    create object client_proxy
    exporting
    logical_port_name = 'BASIC'. " Basic is a TYPE G RFC Destination
    call method client_proxy->send_email
       exporting
         input  = lv_input
       importing
         output = lv_response    .
      catch cx_ai_system_fault  into sys_exception .
        data lv_err type string.
         lv_err = sys_exception->if_message~get_text( ).
         write: / lv_err.
      catch cx_ai_application_fault into sys_exception2  .
         lv_err = sys_exception->if_message~get_text( ).
         write: / lv_err.
    endtry.
    if lv_response is initial.
       write: /'Not Executed'.
    else.
       write: /'Did Execute'.
    endif.
    Greetings
    Prashant

  • How to call BSP page from Webdynpro ABAP ?

    Hi All,
         I have a BSP page which has a page attibute . I need to pass a parameter from Webdynpro ALV table to the BSP page attibute and also need to display that BSP Page . Can any one help me out , how to proceed in this ?
    Regards,
    Kalpana A .

    hi kalpana,
    Use Exit Plug and pass data as URL Parameter.
    http://help.sap.com/saphelp_nw04s/helpdata/en/45/1bc575ba064574e10000000a114a6b/content.htm
    for how to pass url please check this
    http://help.sap.com/saphelp_nw70/helpdata/EN/7b/fb57412df8091de10000000a155106/frameset.htm
    Yogesh N

  • Calling Java code from Webdynpro Abap UI

    Hi All,
    Can anybody tell me, How to make calls to java code on a button click from webdynpro ABAP UI ?
    Thanks in Advance.
    Jenish .V. Joy

    Hi Jenish,
    As I am new to WebDynpro for ABAP I could not help you out exactly.But See this link which will help you to create applications in WebDynpro by using ABAP language.
    https://www.sdn.sap.com/irj/sdn/developerareas/abap?
    rid=/library/uuid/02e1fa45-0801-0010-10a0-f1cf47e8c943
    If you get any answer for your question let me know.
    Regards,
    Karthick K Eswaran

  • Call the webservices in webdynpro ABAP.

    Hi,
      I have WSDL file. please tell me the procedure how to call webservices in webdynpro -ABAP.
    Thank you
    neelima

    Hi neelima,
    Refer This,
    <b>Consuming XI Web Services using Web Dynpro</b>
    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]
    <b>Web service related scenario with XI</b>
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/336365d3-0401-0010-9884-a651295aeaa9.
          (Reward Points If helpful)
    Regards
    Nandha.

  • How to call a webservice from JSP

    I want to call a webservice from JSP? How can I do that .

    Check out this OBE and I think it's pretty well documented in JDeveloper help.
    http://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
    Thanks, Rob

  • How to access SQL tables from WebDynPro ABAP application ?

    Hi,
    I am trying a scenario, where I need to send an user ID to SQL server table (update/modify/delete) from webDynpro ABAP application.
    Basically ,I am trying to know:---
    a>How to write a SQL Connection from ABAP code within webdynpro ABAP application
    b>What are the ways to do it.(by code or any other API/mechanism)
    I appreciate if anybody knows this.
    Thanks
    Praveen

    Hi,
    The EXEC CONNECT ... is usually used in the procedural ABAP code. For this you can refer to the ABAPDOCU.
    I dont have any sample code on the classes I listed try to check out them for the parameters and the methods they have.
    In WD for Java, we have these connection classes to connect to any databsae server.
    Or try to create an RFC with DESTINATION for this
    Pls check out this link for this -
    Pull data from another r3 server using abap dynpro
    Regards
    Lekha

  • How to call IAC Iview from WebDynpro java code

    Hi Team,
    I am tring to call IAC Iview from WebDynpro Java code. we are passing value but blank page  displayed and there is no error show on error log.
    Below is Java Code which i am calling.
      public void wdDoInit()
          try {
                String strURL = "portal_content/TestSRM/iView/TestSRM";                           //WDProtocolAdapter.getProtocolAdapter().getRequestParameter("application");
                 String random = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("random_code");     
                 //wdContext.currentContextElement().setRandomNumber(random);
    //below we are call URL           
    WDPortalNavigation.navigateAbsolute("ROLES://portal_content/TestSRM/iView/TestSRM?VAL="+random,WDPortalNavigationMode.SHOW_INPLACE,(String)null, (String)null,
                       WDPortalNavigationHistoryMode.NO_DUPLICATIONS,(String)null,(String)null, " ");
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
    I am passing value from URL.
    http://<host Name>:<port>/webdynpro/resources/local/staruser/StarUser?random_code=111111111
    when we call above URL we getting blank screen.
    Regards
    Pankaj Kamble

    Hi Vinod,
    read this document (from pages 7 ).
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b5380089-0c01-0010-22ae-bd9fa40ddc62">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b5380089-0c01-0010-22ae-bd9fa40ddc62</a>
    In addition lok at these links: (Navigation Between Web Dynpro Applications in the Portal)
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/ae/36d93f130f9115e10000000a155106/frameset.htm">http://help.sap.com/saphelp_erp2005/helpdata/en/ae/36d93f130f9115e10000000a155106/frameset.htm</a>
    <a href="http://help.sap.com/saphelp_erp2004/helpdata/en/b5/424f9c88970f48ba918ad68af9a656/frameset.htm">http://help.sap.com/saphelp_erp2004/helpdata/en/b5/424f9c88970f48ba918ad68af9a656/frameset.htm</a>
    It may be helpful for you.
    Best regards,
    Gianluca Barile

  • How to call java webservice from plsql procedure.

    Hi,
    Could any one please provide any reference document for invoking a java webservice from pl/sql procedure.
    regards,
    Venkat

    Hi,
    There are basically various platforms where u develop the code with different patterns, though the idea is same everywhere.
    1. If you want develop a Java Client to call a WebService from NWDS then Pls refer >>
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/cb2e29578c0262e10000000a11466f/frameset.htm
    Note: By default the WebService developed under NWDS is Document Based WebService (i.e. In WSDL the style element would be 'document')
    2. If you want to call a WebService from the platform other than NWDS than, Sun's official site would be the best choice to go for.
    Pls refer >>
    http://java.sun.com/developer/technicalArticles/J2EE/j2ee_ws/#design
    Would appreciate if you reward the points if the answer is helpful.
    Regards,
    Arvind Kugasia [[email protected]]

  • Problem in calling Webservice from Webdynpro ABAP

    I want to call a BAPI FM which is available in SAP ECC server when user is clicking on a button in a web dynpro application which is available in SAP Portal server.
    For example,
    Portal server name is DVP-EPP &
    ECC server name is DVP-ECC
    I have the done the following steps to achieve it,
    In Server DVP ECC:
    1) Created Web service from the standard BAPI FM (SE37-->Utilities-->More Utilities-->Create WebService --> From the the Func.Module)
    2) Downloaded the WebService as WSDL file from SOAMANAGER
    3) Tested the Web service through SE80, it is correctly calling the BAPI & creating necessary data.
    In Server DVP EPP:
    4) Created a Proxy class as follows,
    a) SE80 --> Package --> Create --> Enterprise service
    b) Selected Object type "Service Consumer"
    c) Selected Service Consumer "Local File"
    d) Browsed and selected WSDL file downloaded from DVP ECC
    e) Selected the Package, Prefix, Request, Completed the process & Activated it.
    5) Configured the Logical port as follows,
    a) Selected my Proxy class through F4
    b) Wrote a name for Logical port, Selected 'Default port' checkbox and selected 'Create'
    c) In the next screen, in 'Call parameters' tab, selected the 'URL' radio button & mentioned the URL of the WSDL-Document created in DVP-ECC system
    d) Saved the data & activated it
    5) Now, tested the service through (SE80-->Package-->Enterprise Services-->Client Proxy) option.
    6) When I test it, system prompts a dialog box for User-Name & Password (as available in DVP-ECC system).
    After the details are given, system throws the Information message as "SOAP:14 Unexpected element -el=definitions ns=http://schemas.xmlsoap.org/wsdl/" - Exception of class CX_AI_SYSTEM_FAULT
    No record is created in DVP-ECC through the WebService BAPI.
    Please tell me whether the steps that I followed are correct as per my requirement and a solution for the above interruption.
    Thanks in advance

    Good day guys,
    Somehow I managed to resolve the above error.
    Now in DVP-EPP system, I am able to Test the Web service Client Proxy (through SE80) and a record is successfully created in destination system (DVP-ECC).
    Now, in Webdynpro I am unable to call this webservice proxy class.
    System throws the error,
    Error (id=SoapFaultCode:5): Web service processing error; more details in the
    web service error log on provider side (UTC timestamp 20141006045544;
    Transaction ID 9A144DE49C12F1B5A6B9E41F137BE3CC)
    I just created a sample WDA application and on click of a button I am calling the Webservice Proxy class as follows,
    Method on_submit_click().
    TRY.
          CREATE OBJECT wd_assist
            EXPORTING
              logical_port_name = 'ZLOG_PORT'. "Logic port creatd for Proxy class (in SOAMANAGER)
          CALL METHOD wd_assist->bus1240create     "Method available in generated Proxy Class
            EXPORTING
              input  = ls_inp                                        
            IMPORTING
              output = ls_outp.
        CATCH cx_ai_system_fault.
      ENDTRY.
    ENDMETHOD.
    Do I have to do any thing additionally in order to call the WebService in WDA?? Because, in the same system, if I test it in SE80, record is perfectly created in destination server.
    Also please suggest if I have to do any other configuration changes related to this.
    Keenly awaiting your reply.
    Have a nice day .
    Thank you.

  • How To : Call External Webservice from BPEL and pass SOAP Message to the WS

    Hello All-
    Greetings to all BPEL gurus. I am currently facing difficulties in calling an External Webservice from my BPEL Process and passing SOAP Message to it. The details are below:
    <strong>1. The BPEL process, using database polling feature of DB Adapter, will get the records from the database.</strong>
    <strong>2. Transform the message</strong>
    <strong>3. Call the External Webservice and pass the transformed message as the input to it. However the Webservice expects the BPEL process to send SOAP headers in the input message.</strong>
    I am struggling on how to put the transformed message within a SOAP envelope in the BPEL process.
    If anyone had similar requirements and have successfully been able to send SOAP messages from BPEL process to an external webservice, kindly let me know.
    Also if there is some kind of documentation or any link in the forum that I can refer, please let me know that as well.
    I am new to Webservice integration using BPEL and would really appreciate your help.
    Thanks In Advance
    Regards,
    Dibya

    Hi Dharmendra,
    I am trying to send a SOAP message from my BPEL process to a web service. I have a complete SOAP message in a complex variable defined in the wsdl for the partnerlink (web service). My problem is that when I invoke the partnerlink it fails even though the content shown in the BPEL console looks valid.
    I have set up obtunnel to see what I am actually sending out from BPEL. You mention that BPEL creates the SOAP envelope automatically.
    I think that my problem is a result of this automatic SOAP envelope that BPEL is creating. Do you know if there is a way to turn it off?
    This is what I see in the TCP monitor, please note the double SOAP env:Body:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <RCMR_IN000002NR01 xmlns="urn:hl7-org:v3" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <env:Header>
    <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://testhost/CCS/Service_Endpoint</wsa:To>
    <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:Address>http://localhost/CCS/Service_Endpoint</wsa:Address>
    <wsa:Metadata>
    <device xmlns:hl7="urn:hl7-org:v3">
    </device>
    </wsa:Metadata>
    </env:Header>
    <env:Body>
    <RCMR_IN000002NR01>
    </RCMR_IN000002NR01>
    </env:Body>
    </RCMR_IN000002NR01>
    </env:Body>
    </env:Envelope>
    Any help is appreciated.
    Regards,
    Aagaard
    Edited by: Aagaard on Oct 30, 2008 8:59 PM
    Should have mentioned. I am using BPEL 10.1.3.4
    Edited by: Aagaard on Oct 31, 2008 8:43 AM
    I have opened a new thread for this question so as to not confuse the issue more than necessary.
    How many SOAP envelopes do you really need?

  • How to call the rfc in webdynpro abap..?

    Dear Experts,
    I need to add two numbers using RFC in webdynpro abap.
    First we have to give the input then click the submit button.. The result will be shown in next screen with addition of two numbers...  Please help me in this...
    Thanks.

    Calling an RFC Function module in Web Dynpro ABAP is nothing different from Classical ABAP
    use Pattern button to call function module and use DESTINATION syntax to specify the RFC destination
    http://www.octavia.de/fileadmin/octavia_files/content_bilder/Hauptnavigation/SAP_NetWeaver/WebDynpro/Web_Dynpro_Part_II.pdf?PHPSESSID=c528a60bf8857431c0fa6f6595639da7
    In Above document, page no 7, there is a wizard for Service call, in that 4th step is select service where
    you can specify the function module name and the rfc destination name
    Abhi

  • How to Call the RFC in Webdynpro abap application

    Dear Experts,
    Good Evening to all...
    I have to add two numbers using RFC in webdynpro abap application. If we give the numbers in the input screen then the RFC should add it and give it in the output screen. This is the application for that I have created the RFC.
    But the problem is i don't know how to call the RFC in that Webdynpro abap application and how to link the input view and output view with that RFC...? I am new to Webdynpro abap. Please kindly help me on this... I am struggled here... I need your help in this....
    Thank You.

    Hi Jaga,
    You asked the same question again.
    Without closing the [previous one|Re: Where SAP store the uploaded files?].
    I think Abhi has answered your question.
    If not please elaborate on the problem.
    The solution btw is to create a Service Call.
    Sumit

  • How to call a servlet from Webdynpro application

    Hi All,
        I am new to SAP . I have requirement to call a SERVLET which is on a different application server from my webdynpro application , the servlet will return a file .. i need to display that file to the user .. can some one tell me how this can be done .. If possibel please provide some sample code.
    Regards,
    Tarun.

    Hi
    Check this
    1. How to access Servlet information from a webdynpro application ?
    Regards
    Abhijith YS

  • How to call interactive form using webdynpro abap.

    Hi Sap Guru's,
    I have Created Invoice Interactive form using SFP Transaction , now my requirement is ,
    Need to Call that invoice form using webdynpro abap by passing invoice number(vbeln) from the screen.
    please suggest .
    thanks

    Hi Suresh,
    Refer <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/aa/940ee5331b4b8fa0a6cb6714dc5db4/frameset.htm">Interactive Forms in WDA.</a>, this is the best one .
    Welcome to <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/interactiveforms">Interactive Forms.</a>.
    Do post your queries on Interactive Forms in SAP Interactive Forms by Adobe.
    Rgds,
    - anto.

Maybe you are looking for