Skip to Content

Consuming WSDL

Hi Experts,

I have a WSDL file and i want to consume it in my WD Component. This service is basically for updation purpose. Please tell how can i achieve it in WD ABAP.


Pranav Nagpal

Add comment
10|10000 characters needed characters exceeded

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2008 at 08:43 AM

    Hi Pranav,

    As explained by Thomas Jung LPCONFIG is obsolete from SP14 onwards. If you are on a lower SP then you can execute the transaction. Screens are self explanatory.

    For more information, please refer to the following link.



    Rohit Chowdhary

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 12, 2008 at 09:56 AM

    Hello Pranav,

    everything about Web Services can be found here:



    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2008 at 12:28 PM

    Hi Pranav,

    To consume a WSDL in ABAP, you will need to create proxy using edit object function of object navigator (Se80). Select enterprise service tab from the list of tabs. Select client proxy radio button, enter a name in customer name and then click on the create option.

    To create a proxy you can either use a URL with ?wsdl or a file from local machine. Once object is imported save it and activate it. On activation SAP generate ABAP proxy class and required structures for import and export parameters.

    Next step would be to define logical port using LPconfig trcode.

    Once you have done the settings then you can call the object as per the code given below:

    create object lo_clientproxy


    logical_port_name = im_lp_name. ( this will be the Logical port which you have configured)


    call method lo_clientproxy->xxxxxxxx ( Method of your service call )


    input = ls_request


    output = ls_response.

    catch cx_ai_system_fault into lo_sys_exception.


    ls_request and Ls_response will are the variables referring import and export structures created during import of WSDL file.


    Rohit Chowdhary

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 12, 2008 at 04:14 AM

    Hi Rohit and Thomas,

    Thanks for valuable suggestions, I got a proxy class for the same and i m using it via code wizard and able to pass parameters correctly to the method... but still i m not able to update any thing in database.... i m not sure if my procedure of passing parameter has some problem or if there is some problem with proxy class...

    i m posting my code below as well if you can have a look at it.............

    method execute_send_freeze .
    data it_freeze type zpi_dt_hcm045_freeze_flag__tab.
    data wa_freeze type zpi_dt_hcm045_freeze_flag_deta.
    data output type zpi_mt_hcm045_freeze_flag_deta.
    data wa_controller type prxctrltab.
    data wa_hcm045 type
    *I will be passing these values in function*
    wa_freeze-pernr = wd_this->pernr.
    wa_freeze-functionality = 'UXEDSWEx'.
    wa_freeze-aedtm = sy-datum.
    wa_freeze-uname = sy-uname.
    wa_freeze-sprps = 'X'.
    append wa_freeze to it_freeze.
    output-mt_hcm045_freeze_flag_details-freeze = it_freeze.
      if not wd_this->m_zpi_co_si_hcm045_fre is bound.
            create object wd_this->m_zpi_co_si_hcm045_fre
    *    logical_port_name  =
          catch cx_ai_system_fault .
    * declarations for context navigation
      data lo_send_freeze_flag_det type ref to if_wd_context_node.
      data lo_importing type ref to if_wd_context_node.
      data lo_output type ref to if_wd_context_node.
      data lo_element type ref to if_wd_context_element.
    * declarations for parameters
      data ls_c_output type if_componentcontroller=>element_output.
    * get all involved child nodes
      lo_send_freeze_flag_det = wd_context->get_child_node(
    wd_this->wdctx_send_freeze_flag_det ).
      lo_importing = lo_send_freeze_flag_det->get_child_node(
    wd_this->wdctx_importing ).
      lo_output = lo_importing->get_child_node( wd_this->wdctx_output ).
    * get input from context
      lo_element = lo_output->get_element( ).
        importing static_attributes = ls_c_output ).
    ls_c_output = output.
    * the invocation - errors are always fatal !!!
      data lx_exception  type ref to cx_root.
               output =                          ls_c_output
        catch cx_ai_system_fault into lx_exception.
          raise exception type cx_wd_no_handler
            exporting previous = lx_exception.
    * store output to context



    Edited by: Pranav Nagpal on Dec 12, 2008 5:15 AM

    Add comment
    10|10000 characters needed characters exceeded