SAP调用外部WebService.docx
《SAP调用外部WebService.docx》由会员分享,可在线阅读,更多相关《SAP调用外部WebService.docx(8页珍藏版)》请在冰点文库上搜索。
![SAP调用外部WebService.docx](https://file1.bingdoc.com/fileroot1/2023-7/13/4cc9ecad-af4e-436b-91de-4e8bd3b998cb/4cc9ecad-af4e-436b-91de-4e8bd3b998cb1.gif)
SAP调用外部WebService
SAP调用外部WebService
SAP调用外部WebService
打开事务码SE80.
prefix名称自己定义,需要Z开头.
选中SOAP方式
创建完成后保存,激活.
进入事务码SOAMANAGER.
SearchBy:
选择ConsumerProxy,Field:
BothNames.
在WebService地址中找到soapAction的值.
operationsoapAction="http:
//tempuri.org/HelloWorld"style="document"/>
保存.
代码:
data:
exc type ref to cx_root.
data:
msg type string.
start-of-selection.
data proxy_test type ref to ZWS_QD_3CO_TEST_WEB_SERVICE1SO.
try.
if proxy_test is not bound.
create object proxy_test type ZWS_QD_3CO_TEST_WEB_SERVICE1SO.
endif.
data:
input type ZWS_QD_3HELLO_WORLD_SOAP_IN,
output type ZWS_QD_3HELLO_WORLD_SOAP_OUT.
input-AA = sy-uname.
call method proxy_test->HELLO_WORLD
exporting
input = input
importing
output = output.
WRITE :
output-HELLO_WORLD_RESULT.
catch cx_ai_system_fault into exc.
msg = exc->get_text( ).
write:
/ msg.
endtry.
结果: