Professional Documents
Culture Documents
in ABAP
By Chandra Dasari, YASH Technologies
Description: Creating ABAP based Web services and consuming in report. In this example we will be using wizard provided by SAP.
Enter the Service Definition Name followed by short text as shown below
Select the end point, as of now the following options are available
Function module
Function Group
BAPI
Make sure we select the check box release Service for Runtime
If this is not selected we need to go to TCode: WSCONFIG & release it
This is the final screen for wizard before completion.
Go back
Yes the green icon shows the wsd is released successfully for soap runtime.
Generating the wsdl from wsd
Go to transaction code wsadmin as shown
service
on
test
button
to
test
the
functionality
of
web
submit
Comments: The web service has been tested successfully and is ready to use.
Create any client application for consuming it.
Select the option local File and select the wsdl saved on local pc in earlier step.
Specify the package & prefix (z) save it.
input-carrid = p_carrid.
input-connid = p_connid.
CALL METHOD proxy->zgetsflightdet
EXPORTING
input = input
IMPORTING
OUTPUT = output
.
CATCH CX_AI_SYSTEM_FAULT .
create object sys_fault.
write :/ 'error at level 2', sys_fault->errortext.
exit.
CATCH ZCX_EXCEPTION00 .
CATCH CX_AI_APPLICATION_FAULT .
write : 'error 3'.
exit.
ENDTRY.
write : / 'TEST RESULTS OF CLIENT APPLICATION RUNNING ON YHSAPX05'.
WRITE : / 'THE CLIENT APPLICATION CALLS THE WEBSERVICE LOCATED ON YHSAPI01
SYSTEM'.
SKIP.
write :/ output-carrid,
/ output-connid,
/ output-currency,
/ output-planetype,
/ output-price,
/ output-seatsmax,
/ output-seatsocc.
Performing test from client application.
Execute the application.
Input screen:
Output: