Hi all,
I want to call a webservice from ABAP.
In my report i use the below code .
web_rul =' http://test.asmx'.
CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL
EXPORTING
URL = WEB_URL
IMPORTING
CLIENT = CLIENT
EXCEPTIONS
ARGUMENT_NOT_FOUND = 1
PLUGIN_NOT_ACTIVE = 2
INTERNAL_ERROR = 3
OTHERS = 4.
CLIENT->REQUEST->SET_HEADER_FIELD( NAME = '~REQUEST_METHOD' VALUE = 'GET' ).
CLIENT->SEND( ).
CALL METHOD CLIENT->RECEIVE
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2
HTTP_PROCESSING_FAILED = 3
OTHERS = 4.
RET_DATA = CLIENT->RESPONSE->GET_CDATA( ).
REPLACE ALL OCCURRENCES OF '<' IN RET_DATA WITH '<' .
REPLACE ALL OCCURRENCES OF '>' IN RET_DATA WITH '>' .
Please correct me if my approach is wrong. when i execute the report the value in ret_Data is
####<html>#### <head><link rel="alternate" type="text/xml" href="test.asmx?disco" />#### <style type="text/css">## ####BODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px
what is the mistake in this. how should i call the webservice from abap.
Regards,
Subasree