cancel
Showing results for 
Search instead for 
Did you mean: 

Consume WebService in ABAP Web Dynpro

Former Member
0 Kudos

Hi, Is there any How To or step by step document which shows to consume web service in ABAP Web Dynpro.

I've searched a lot but could not find any.

Please provide me some pointer/examples.

Thanks,

CD

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

That's probably because there is nothing Web Dynpro specific about consuming a web service. Most of the steps for doing so (generating an ABAP Proxy Class) are the same regardless of what type of ABAP development you are going to use the web service call within. Just look for general documentation on how to consume a web service in ABAP, like this:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/frameset.htm

The resulting proxy class can then be used within Web Dynpro ABAP like any other class.

There is a service call wizard in Web Dynpro ABAP. However everything that it generates can be also built by hand. The main advantage of the wizard is that it can generate a context that matches the service interface. However it has limitations on how deeply nested of an interface it can handle. I generally find that services are too deeply nested to work work and end up just doing the work of the wizard myself. For more information on the service wizard in WDA:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/a189b0ee583b8be10000000a421937/frameset.htm

Former Member
0 Kudos

Hi Thomas,

I am facing a problem in consuming web service in webdynpro.

I created a web service for standard FM BAPI_BUS1240_CREATE (it is available in SAP ECC server).

I want to consume this web service in another system (SAP Portal system, where users will be providing input; this FM is not available here).

I created a Proxy class in SAP Portal system through the WSDL document of the Web service.

I configured logical port for the same in TCode: SOAMANAGER and successfully tested the Client proxy (through TCode: SE80). As a result, the record is created in SAP ECC server.

Now, I am unable to do the same through Webdynpro. Please find the attached Proxy class screen-shot. It has 6 methods of which BUS1240_CREATE contains the relevant parameters of the actual BAPI FM.

I filled up the same parameters that I used in Testing the Client proxy but unable to create record in SAP ECC system. My code (On_submit of a button) looks like below,

TRY.
      CREATE OBJECT wd_assist
        EXPORTING
          logical_port_name = 'ZXXXXXXX'.          "Logical port configured through SOAMANGER
        CATCH cx_ai_system_fault.
  ENDTRY.

      CALL METHOD wd_assist->bus1240create                  "Method filled with input parameters given by user
        EXPORTING
          input  = ls_inp
        IMPORTING
          output = ls_outp.

After execution of method BUS1240_CREATE, system throws the error as below,

The following error text was processed in the system DEP : Error (id=SoapFaultCode:5 😞 Web service processing error; more details in the web service error log on provider side (UTC timestamp 20141011062545; Transaction ID 5B0F51E4AD4EF13EA6B9E41F137BE3CC)

Please tell me where I went wrong. Do I need to call methods of the Proxy class? Also suggest if any configuration change involved in this.

Have a nice day, thanks.

Answers (0)