SAP调用外部WebService.docx
《SAP调用外部WebService.docx》由会员分享,可在线阅读,更多相关《SAP调用外部WebService.docx(8页珍藏版)》请在冰豆网上搜索。
![SAP调用外部WebService.docx](https://file1.bdocx.com/fileroot1/2023-5/21/140c333d-54dc-43de-a4e2-b4a03f2496f3/140c333d-54dc-43de-a4e2-b4a03f2496f31.gif)
SAP调用外部WebService
SAP调用外部WebService
SAP调用外部WebService
打开事务码SE80.
选中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.
结果: