cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP proxy from wsdl

Former Member
0 Kudos

Hi, I have developed an ABAP proxy from WSDL file. I tested the service when I generated proxy class in SE80 and it worked fine.

Now I have developed the following report that call the proxy class generated:




REPORT  zprova_proxy.

DATA: proxy TYPE REF TO zco_service1soap.

DATA : sys_fault TYPE REF TO cx_ai_system_fault.


DATA: intab  TYPE zget_dati_sipamsoap_in.
DATA: outtab type zget_dati_sipamsoap_out.

create object proxy
  exporting
    logical_port_name = 'PORTA1'.

IF sy-subrc EQ 0.

  TRY.
      CALL METHOD proxy->get_dati_sipam
        EXPORTING
          input  = intab
        IMPORTING
          output = outtab.
    CATCH cx_ai_system_fault .
      CREATE OBJECT sys_fault.
      WRITE 😕 'error at level 1', sys_fault->errortext.
      EXIT.
    CATCH cx_ai_application_fault .

  ENDTRY.


How can I display data conteined in 'outtab'?

In my proxy class I have this output structure for method 'get_dati_sipam' :

GET_DATI_VESTIARIORESULT (type TABL)

- MATRMEC ( type string)

- MATRTAGLIA ( type string)

Help me please. THANKS

Accepted Solutions (1)

Accepted Solutions (1)

former_member181962
Active Contributor
0 Kudos

Declare a table of type GET_DATI_VESTIARIORESULT

data: out type standard table of GET_DATI_VESTIARIORESULT with header line.

out[] = outtab-GET_DATI_VESTIARIORESULT[].

loop at out.
write:/ out-MATRMEC, out-MATRTAGLIA.
endloop.

Regards,

Ravi

Former Member
0 Kudos

I have the following error on this line:

out[] = outtab-GET_DATI_VESTIARIORESULT[]  

.:

"GET_DATI_VESTIARIORESULT" is not an internal table - the "OCCURS n" specification is missing.

Can you help me?THANKS

Edited by: Andrea Ruocco on Jun 10, 2009 4:29 PM

former_member181962
Active Contributor
0 Kudos

Hi Andrea,

Can you give us the structure of zget_dati_sipamsoap_out?

Regards,

Ravi

Former Member
0 Kudos

PAEX OUTPUT ( type ZGET_DATI_SIPAMSOAP_OUT ) that contains this structure:

-GET_DATI_SIPAMRESULT (type ZGET_DATI_SIPAMSOAP_OUT_GET_DA) that contains this fields:

- MATRMEC ( type string)

- MATRTAGLIA ( type string)

Excuse me for the imprecision but I have a similar scenario for the method GET_DATI_VESTIARIO.

THANKS

former_member181962
Active Contributor
0 Kudos

Hi Andrea,

If ZGET_DATI_SIPAMSOAP_OUT_GET_DA is a table type, then do this

data wa like line of ZGET_DATI_SIPAMSOAP_OUT_GET_DA.
loop at out-GET_DATI_SIPAMRESULT into wa.
write:/ wa-MATRMEC, wa-MATRTAGLIA.
endloop.

If ZGET_DATI_SIPAMSOAP_OUT_GET_DA is a simple structure, then do this:

write:/ out-GET_DATI_SIPAMRESULT-MATRMEC, out-GET_DATI_SIPAMRESULT -MATRTAGLIA.

Regards,

Ravi

Answers (0)