2008 Jun 17 9:57 AM
I am new to use webservices.Please help me to call a ABAP Webservice in ABAP program and How to call a other Webservice like Java Webservice in ABAP. Please give me steps to follow.
Thanks,
Suneetha.
2008 Jun 17 10:01 AM
Hi Suneetha,
After u create webservices one URL will be generated. U can call this in ABAP program using Function module CALL_BROWSER.
Dont forget to reward points if found useful.
Thanks,
Satyesh
2008 Jun 17 10:01 AM
Hi Suneetha,
After u create webservices one URL will be generated. U can call this in ABAP program using Function module CALL_BROWSER.
Dont forget to reward points if found useful.
Thanks,
Satyesh
2008 Jun 17 10:10 AM
Hi,
Thanks for the reply.
I want to call an existing webservice available in internet. How to check the available webservices in Internet and call them into ABAP.
For eg: I want to call a java webservice related to online prepaid sim card registration.
Thanks,
Regards.
2008 Jun 17 11:12 AM
May be this prog. will give u the required info.
Use a free web service in an ABAP program which validates * an email-id.
REPORT zvalidate_email.
PARAMETERS: p_mail(100) LOWER CASE. " E-Mail id to be verified
DATA: http_client TYPE REF TO if_http_client .
DATA: w_string TYPE string ,
w_result TYPE string ,
r_str TYPE string .
DATA: result_tab TYPE TABLE OF string.
START-OF-SELECTION .
CLEAR w_string .
CONCATENATE
'http://www.webservicex.net/ValidateEmail.asmx/IsValidEmail?Email=' p_mail
INTO
w_string .
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = w_string
IMPORTING
client = http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4.
CALL METHOD http_client->send
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2.
CALL METHOD http_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3.
CLEAR w_result .
w_result = http_client->response->get_cdata( ).
REFRESH result_tab .
SPLIT w_result AT cl_abap_char_utilities=>cr_lf INTO TABLE result_tab .
READ TABLE result_tab INTO r_str INDEX 2.
IF r_str+44(1) = 't'.
WRITE:/ 'Valid email address'.
ELSE.
WRITE:/ 'Invalid email address'.
ENDIF.