Consuming Webservices in webdynpro ABAP

Hello,
I want to work with consuming Webservices in Webdynpro ABAP. Can anybody give an example for the same.
Any help would be highly appreciated.
Thanks.

Hello
Here is a link.
It has many links for the webservice consumption in abap and web dynpro
Consuming webservice in a webdynpro component
actaully process on a high level is like this.
1. first you need to create an client proxy., For creating this go to SE80
and follow this link
http://help.sap.com/saphelp_nw04/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/content.htm
2. then you can consume this service using the service call option of the web dynpro
here go to the web dynpro comp and right click on it and create-> service call
and use  the proxy created in the first step here.
it will create one custom controller which you can use.
thanks
sarbjeet singh

Similar Messages

  • Webservice in Webdynpro ABAP

    Hi
    Please provide tutorial and general guidelines for settings  for consuming webservice in webdynpro ABAP.
    Thanks & Regards,
    Chaitali

    Thanks Rich for quick answer.
    But my problem is, I have a stand alone WAS without any RFC Function modules and dictionary structures, of backend R/3, on WAS which I wanted to map in my component.
    I strongly believe that in case of stand alone WAS I need to have at least backend dictionary structures to begin with my design. I can’t use wizard, as I don’t have function modules on this system. I have to code for that manually..
    So that is why, I was looking for Webservice option..
    Thanks,
    Nitesh Shelar.

  • Consuming Webservice in WebDynpro - Content-Type issue

    Hi,
    I am getting a shortdump when consuming WebService in WebDynpro.
    I trace it back to the class CL_SOAP_HTTP_TPBND_ROOT method GET_HTTP_HEADERS whereby the
    value = 'text/html; charset=iso-8859-1' while the constants tsrc_soap_11_http_content_type = 'text/xml' ; tsrc_soap_bx_http_content_type = 'application/x-sap-bxml' ; tsrc_soap_mtom_http_cont_type = 'application/xop+xml' ; tsrc_soap_mp_http_content_type = 'Multipart/Related'. Because of this Content-Type difference my WebDynpro application dumps?
    Any ideas how to solve this problem?
    Thanks.
    Regards,
    Amel

    hi,
    Few indroductory sessions
    /people/thomas.jung/blog/2007/12/17/consuming-services-with-abap -Consuming webservices with webdynpro.
    It is possible to create webservice in ABAP as well as in Webdynpro.
    ABAP Webservice:
    http://wiki.open-esb.java.net/Wiki.jsp?page=BAPIWEBSERVICE
    http://www.sappro.com/downloads/SAPXI.pdf
    Webdynpro Webservice:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/244e7923-0a01-0010-5887-fe0b0c6dbb8d
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/30f1b585-0a01-0010-3d96-ad0ea291c4f9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/db785a70-0701-0010-858c-eee0ec4fe1b3
    In Web Dynpro ABAP there is nothing special about calling a web service. Unlike WD Java, there are not dedicated model object types in WD ABAP. WD ABAP simply has the ability to interact with other ABAP development object types. You can call function modules, ABAP classes, even modules in old dynpro apps.
    So calling the webservice from ABAP therefore is just the process of generating the ABAP Proxy Class. This is the same process regardless of if you want to use this proxy class from WDA or any other type of ABAP development object. You can then call the proxy class from WDA just like any other type of ABAP class. There is a service wizard option in later support package levels that includes an option for ABAP Proxy classes - although it doesn't generate the proxy class it just generates the code and context for the call to an already existing proxy class. The service wizards in WD ABAP are not required however. They are just shortcut code generators and often can't even generate a complete context for a complex web service proxy - so expect to do some manual adjustment after running the wizard.
    Edited by: Mahalakshmi kothuri on Jun 1, 2008 4:17 PM

  • 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.

  • 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.

  • 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 use Webservice in Webdynpro ABAP?

    I tried searching option for importing WSDL file in WebDynpro ABAP. But I am unable to upload it in my component. In service call wizard I can see only one option i.e. to import Function module.
    We cant use Webservice in ABAP webdynpro?
    Thanks
    Nitesh Shelar

    Thanks Rich for quick answer.
    But my problem is, I have a stand alone WAS without any RFC Function modules and dictionary structures, of backend R/3, on WAS which I wanted to map in my component.
    I strongly believe that in case of stand alone WAS I need to have at least backend dictionary structures to begin with my design. I can’t use wizard, as I don’t have function modules on this system. I have to code for that manually..
    So that is why, I was looking for Webservice option..
    Thanks,
    Nitesh Shelar.

  • How to call webservices in webdynpro abap

    Hi Experts,
    My requirement is I have to call an URL by exporting an XML file to that URL I have to import an XML file again i .e nothing but I have to send  request file in the form of XML and need to get response in the form of XML file from the URL .This total execution should be finished by clicking a button in webdynpro ABAP.
    Regards,
    Satya.

    Hello Satya,
    You may try to find the sample code as follows:
    1. Goto Transaction se80
    2. Select "package" --> enter "SWDP"
    3. goto "embedded packages" -->  "SWDP_DEMO" --> Web Dynpro
    Here, you will get demo applications. Find the most appropriate demo application and try to customize the code according to your requirement.
    Best Regards,
    Raju MJRK

  • 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.

  • Consuming  WebServices using  WebDynPro

    Hi 
    Need help in finding some good material/hands on  for usage and consuming custom/External web services in  some sample code/project in Web DynPro
    kindly suggest some tutorials including hands on the  same
    thanks

    Hi Saurabh,
    Go through these links .They  are sample tutorials for the same
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on accessing an email web service - 6_0_.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on accessing the car rental web service - 7.htm
    Go through this link also
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/f9bc3d52f39d33e10000000a11405a/frameset.htm
    This will give you a basic idea of webservice import
    Hope this helps you
    Regards
    Rohit

  • How to call java servlet using webservice in webdynpro abap?

    hi all,
                  we have a requirement to connect to non - sap database through webservices. But they do have a java servlet which has a data to get. please help me in this regard.
    Regards,
    Murthy.

    This is not a web dynpro ABAP related question.  Please only post questions in this forum that are directly related to Web Dynpro ABAP.

  • Consuming ABAP Webservice in Webdynpro app

    Hi,
    I have wrote a webdynpro app for consuming ABAP webservice. I used the procedure in the link below
    http://wiki.sdn.sap.com/wiki/display/WDJava/ConsumingABAPWebServiceinJavaWD
    Everything seemed to be went well, I created model and Webservice destinations. I have written the code for calling the webservice, which does not return data as part of response. I mean though the RFC returns data at the backend,its not showing the returned records in the webdynpro table.
    I have also tried checking the same by setting external break point. when the webservice is executed from my webdynpro app,it goes to the ABAP debugger and i could clearly see the records in the export parameters of RFC,but the same is not returned in the reponse object.
    Could any one let me know what could be missing. Any help is greatly appreciated?
    I have used the following code in Init method of my View
    Request_ZMYRFC input=new Request_ZMYRFC (model);
    wdContext.nodeRequest_ZMYRFC ().bind(input);
    ZMYRFC  req= new ZMYRFC (model);
    req.setPUserid("EDLAS00C");
    req.setPLtc("E");
    input.setMYRFC (req);
    IWDMessageManager manager = wdComponentAPI.getMessageManager();
        try
        wdContext.currentRequest_ZMYRFCElement().modelObject().execute();
          wdContext.nodeResponse().invalidate();
          wdContext.nodeZMYRFCResponse().invalidate();
          wdContext.nodeReturn_res().invalidate();
         wdContext.nodeItem_res_ret().invalidate();
          wdContext.nodeILtcg_res().invalidate();
          wdContext.nodeItem_res_ltcg().invalidate();
        catch(Exception e)
          manager.reportException(e.getMessage(), false);
    Thanks
    Santhosh

    santosh,
    Check provider system defination in nwa for webservice.After this mapp the provider system and service group after wd app deployed.This is mandatory while consuming webservice in webdynpro for latest versions of CE7.11 or later.for reference check this article/document. http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50d70a19-45a3-2b10-bba0-807d819daf46
    Thanks,
    Murthy.
    Edited by: Murthy Karaka on Mar 22, 2010 12:59 PM

  • Consuming webservice in a webdynpro component

    Hi Experts,
    I have a third party free webservice as WSDL link.My requirement is to make use of that webservice in my webdynpro component.
    Can any body give me a step by step approach to consume that webservice in my webdynpro Component.
    If possible, Provide me some good material for consuming webservice in a webdynpro component.
    Awaiting for a useful reply.
    Thanks,
    Ramanan.p

    hi,
    Few indroductory sessions
    /people/thomas.jung/blog/2007/12/17/consuming-services-with-abap -Consuming webservices with webdynpro.
    It is possible to create webservice in ABAP as well as in Webdynpro.
    ABAP Webservice:
    http://wiki.open-esb.java.net/Wiki.jsp?page=BAPIWEBSERVICE
    http://www.sappro.com/downloads/SAPXI.pdf
    Webdynpro Webservice:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/244e7923-0a01-0010-5887-fe0b0c6dbb8d
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/30f1b585-0a01-0010-3d96-ad0ea291c4f9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/db785a70-0701-0010-858c-eee0ec4fe1b3
    In Web Dynpro ABAP there is nothing special about calling a web service. Unlike WD Java, there are not dedicated model object types in WD ABAP. WD ABAP simply has the ability to interact with other ABAP development object types. You can call function modules, ABAP classes, even modules in old dynpro apps.
    So calling the webservice from ABAP therefore is just the process of generating the ABAP Proxy Class. This is the same process regardless of if you want to use this proxy class from WDA or any other type of ABAP development object. You can then call the proxy class from WDA just like any other type of ABAP class. There is a service wizard option in later support package levels that includes an option for ABAP Proxy classes - although it doesn't generate the proxy class it just generates the code and context for the call to an already existing proxy class. The service wizards in WD ABAP are not required however. They are just shortcut code generators and often can't even generate a complete context for a complex web service proxy - so expect to do some manual adjustment after running the wizard.
    Edited by: Mahalakshmi kothuri on Jun 1, 2008 4:17 PM

  • How to consume Web Service in ABAP WebDynpro

    Hi
    I want to know the entire details about how to consume Web Service in WebDynpro application.
    regards
    Piyush

    hI piyush,
    Have a look at this Blog by Thomas Jung.
    /people/thomas.jung/blog/2007/12/17/consuming-services-with-abap
    on consuming webservies thru webdynpro ABAP
    Cheers
    Mary

  • Consuming WebServices in ABAP WebDynPro via webservice proxy code

    Hi,
    My requirement is to consume a webservice using WSDL(basic authentication) in WebDynPro ABAP. then based on the SOAP response I need to show a pop up message whether the response valid or not.?
    I first tested the webservice by creating LPCONFIG Logical Port and generated WebService Proxy class.
    It got response correctly with basic authentication enabled each time I send a request.
    Secondly I generated webservice proxy code using service calls on creating webdynpro test application with some UI elements. Service call created Nodes,attributes and method correctly.
    it's giving me error when it tries to invoke webservice method through generated code.
    Question is that How do we code authentication to the webservice method via WebDynPro ABAP code.
    I appreciate anyone who worked on this area and taken basic authentication via coding. or worked successfully through coding.
    Thanks
    Praveen

    hi
    Refer this:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6066fbe8-edc4-2910-9584-a9601649747d
    It might be usefull for u.
    Regards
    Vivekananthan.S

Maybe you are looking for

  • "Edit Original" opens in Paint instead of Photoshop (Windows)

    I've found a solution to this problem, so I wanted everyone to find it. In the older Windows programs, you can choose which program opens in editing, but in Windows 7 that feature is disabled. If you download the following program, click File Type Se

  • Can I find a site's IP address in Firefox?

    1. If I am connected to a website and would like to find the resolved IP address, how do I do that? I know that I can use commands such as tracert in a terminal window, but I would prefer to find the IP address Firefox just used to get to the webpage

  • TS4036 How do I override the request for a pin #.  I forgot what I put in.

    I have an apple i pad that I am locked out of help

  • Stateful Table View

    Hi, I have an editable column in my table fiew which has scroll bar. Can I capture the  changed data even if i am scrolling among the pages? Right now I am not able to get the data which I have filled in previous pages when i navigate back . Kindly a

  • Is Acrobat X Pro included in CS6 Production Premium?

    Can you please confirm if Acrobat X Pro is included in the CS6 Production suite? From your website (http://helpx.adobe.com/creative-suite/suites-help.html), it does not appear to be but I find it strange because it is included in the other 3 CS6 suit