日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

最详细的使用 soapui 消费 SAP Cloud for Customer Web service 的教程

發布時間:2023/12/19 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 最详细的使用 soapui 消费 SAP Cloud for Customer Web service 的教程 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

本文就以SAP Cloud for Customer的web service消費這個需求為例,來講解soapui這個工具的使用步驟。

使用soapui消費web service,最簡單的方式是在soapui里直接導入web service的WSDL文件。

為此,我們需要先拿到SAP C4C標準web service的WSDL文件。

  • Go to workcenter Administrator, then Input and Output management->Service Explorer, you can get a list of all standard inbound services here.
  • 在administator工作中心的input and output management里找到想消費的web service:

    點擊超鏈接,把它的WSDL文件下載下來。

    If you are working in 1605, you can find a list of all standard web services from SAP help:

    Since I would like to query Opportunity data, I choose QueryOpportunityIn, and click “Show full documentation”:

    The documentation tells me how to fill the request detail in SoapUI.

  • Download and install SoapUI. Create a new SOAP project by loading the WSDL downloaded from previous step.
  • 下載安裝soapui,此處導入第一步下載的WSDL文件。

    Suppose I would like to retrieve this opportunity data in my C4C system by querying its id:

    Of source this example might not make much sense from business perspective as in real world we tend to use other criteria like customer name to query Opportunity.
    Paste the following xml source code in request view to query on Opportunity 15360.

    把下列的XML字符串復制到soapui面板里:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:zzz="http://sap.com/xi/AP/CustomerExtension/BYD/ZZZZZ"><soapenv:Header/><soapenv:Body><glob:OpportunityByElementsQuery_sync_V1><!--Optional:--><OpportunitySelectionByElements><!--Zero or more repetitions:--><SelectionByIdentifier><!--Optional:--><InclusionExclusionCode>I</InclusionExclusionCode><IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode><!--Optional:--><LowerBoundaryIdentifier>15360</LowerBoundaryIdentifier></SelectionByIdentifier></OpportunitySelectionByElements></glob:OpportunityByElementsQuery_sync_V1></soapenv:Body> </soapenv:Envelope>

    復制結束之后是這樣的:這段字符串是我給soapui發起的web service的請求負載:

    Execute this request, I meet with error message: 401 Unauthorized.

    執行soapui請求,遇到了401 錯誤,原來我忘記維護用戶名和密碼了。

    Then I manually maintained my business user and password in request property view:

    此處維護消費這個web service的用戶名和密碼:

    You might also need to maintain proxy setting for SoapUI according to your network landscape.

    如果在企業內網的防火墻里使用soapui,還需要在此處設置代理服務器:

    Once you have finished all such settings, execute request again and now you can see response as expected:

    一切就緒之后,使用soapui能看到web service執行的響應內容了:

    要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":

    總結

    以上是生活随笔為你收集整理的最详细的使用 soapui 消费 SAP Cloud for Customer Web service 的教程的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。