Академический Документы
Профессиональный Документы
Культура Документы
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.
Click
on
test
button
to
test
the
functionality
of
web
service
Click on the parameters
Enter
submit
the
input
parameters
and
click
on
Comments: The web service has been tested successfully and is ready to use.
Create any client application for consuming it.
Generating the proxy object-Consuming in ABAP
Login to SAP system.
Go to SE80 create proxy object,
Path: create-> enterprise web service->proxy object
Select the option local File and select the wsdl saved on local pc in earlier step.
Specify the package & prefix (z) save it.
*&----------------------------------------------------------------*&
tables : spfli.
DATA: proxy TYPE REF TO zco_zgetflightdet19_wsd,
OUTPUT type ZZGETSFLIGHTDETRESPONSE ,
INPUT type ZZGETSFLIGHTDET .
Data : sys_fault type ref to cx_ai_system_fault,
app_fault type ref to cx_ai_application_fault.
Data : itab type spfli.
*&----------------------------------------------------------------*&
*& UI Declaration
*&----------------------------------------------------------------*&
parameters : p_carrid type spfli-carrid,
p_connid type spfli-connid.
*&----------------------------------------------------------------*&
*& Application logic
*&----------------------------------------------------------------*&
start-of-selection.
TRY.
CREATE OBJECT proxy
exporting
LOGICAL_PORT_NAME = 'ZCO_ZGETFLIGHTDET19_WSD'
.
CATCH cx_ai_system_fault .
create object sys_fault.
write :/ 'error at level 1', sys_fault->errortext.
exit.
ENDTRY.
TRY.
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.
Output: