Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP WebService Issue

Former Member
0 Likes
793

Hello Champs,

I am consuming web service using ABAP, configuration done from SOAMANAGER  and its working fine when I am testing it from SE80. but same is not working when I have created program from SE38 not Error no Output nothing.

Requesting your inputs on this, below is my program code. do I have to add any thing else in code or any configuration is still missing.

DATA : proxy    TYPE REF TO /sen/co_real_time_services_mmd.

DATA : input    TYPE /sen/mmdi_get_article_details1,

        lt_article TYPE /sen/type_article_tab1,

        ls_article TYPE /sen/type_article1,

        output TYPE /sen/mmdi_get_article_details,

        lr_proxy TYPE REF TO cl_proxy_client,

        lr_prot_payload TYPE REF TO cl_wsprotocol_payload.

PARAMETERS : p_matnr TYPE c LENGTH 25,

              p_laung TYPE c LENGTH 3,

              p_pack  TYPE i LENGTH 10,

              p_refid TYPE c LENGTH 10,

              p_id    TYPE c LENGTH 10.

TRY.

     CREATE OBJECT proxy

       EXPORTING

         logical_port_name = 'I_MATERIAL'.

   CATCH cx_ai_system_fault .

ENDTRY.

ls_article-article_id           = p_matnr.

ls_article-language             = p_laung.

ls_article-packetnumber         = p_pack.

ls_article-calling_tool_ref_id  = p_refid.

ls_article-calling_tool_id      = p_id.

ls_article-packetnumber         = p_pack.

APPEND ls_article TO lt_article.

input-article[] = lt_article.

TRY.

     CALL METHOD proxy->mmdi_get_article_details

       EXPORTING

         input  = input

       IMPORTING

         output = output.

   CATCH cx_ai_system_fault .

   CATCH cx_ai_application_fault .

ENDTRY.



Hello Champs,

I am consuming web service using ABAP, configuration done from SOAMANAGER  and its working fine when I am testing it from SE80. but same is not working when I have created program from SE38 not Error no Output nothing.

Requesting your inputs on this, below is my program code. do I have to add any thing else in code or any configuration is still missing.

DATA : proxy    TYPE REF TO /sen/co_real_time_services_mmd.

DATA : input    TYPE /sen/mmdi_get_article_details1,

        lt_article TYPE /sen/type_article_tab1,

        ls_article TYPE /sen/type_article1,

        output TYPE /sen/mmdi_get_article_details,

        lr_proxy TYPE REF TO cl_proxy_client,

        lr_prot_payload TYPE REF TO cl_wsprotocol_payload.

PARAMETERS : p_matnr TYPE c LENGTH 25,

              p_laung TYPE c LENGTH 3,

              p_pack  TYPE i LENGTH 10,

              p_refid TYPE c LENGTH 10,

              p_id    TYPE c LENGTH 10.

TRY.

     CREATE OBJECT proxy

       EXPORTING

         logical_port_name = 'I_MATERIAL'.

   CATCH cx_ai_system_fault .

ENDTRY.

ls_article-article_id           = p_matnr.

ls_article-language             = p_laung.

ls_article-packetnumber         = p_pack.

ls_article-calling_tool_ref_id  = p_refid.

ls_article-calling_tool_id      = p_id.

ls_article-packetnumber         = p_pack.

APPEND ls_article TO lt_article.

input-article[] = lt_article.

TRY.

     CALL METHOD proxy->mmdi_get_article_details

       EXPORTING

         input  = input

       IMPORTING

         output = output.

   CATCH cx_ai_system_fault .

   CATCH cx_ai_application_fault .

ENDTRY.



3 REPLIES 3
Read only

Private_Member_7726
Active Contributor
0 Likes
657

Hi,

Yes, processing all those exceptions (say, by catching them into lx_ex type cx_root) and outputting the error messages using message lx_ex type 'E' would not hurt and may actually help to understand what's wrong, isn't it?

cheers

Jānis

Read only

0 Likes
657

Hi Janis,

Thanks for input and I even tried with it but no exception raised by proxy. am I missing anything else here. Do we have to do any special configuration to consume webservice and run it from SE38.

Br,

Amol

Read only

0 Likes
657

Jãnis is right - you must handle the exceptions.

However, if it works in Se80 then it's unlikely you need to do any more configuration. I suggest you go to transaction SMICM and trace the HTTP response to find out what is happening.