Tiven Wang
Wang Tiven July 24, 2017
425 favorite favorites
bookmark bookmark
share share

Common Buzzard

Webservice SOAP Faults

在調用 Webservice API 時如果出現以下錯誤:

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
  <soap-env:Header/>
  <soap-env:Body>
    <soap-env:Fault>
      <faultcode>soap-env:Server</faultcode>
      <faultstring xml:lang="en">Authorization role missing for service "ServiceInterface http://sap.com/xi/A1S/Global ManageContactIn <default> <default>", operation "Operation http://sap.com/xi/A1S/Global MaintainBundle" (UTC timestamp 20130320080942;
Transaction ID 00163E0290481EE2A4A6B0992E5E8C2D)</faultstring>
      <detail/>
    </soap-env:Fault>
  </soap-env:Body>
</soap-env:Envelope>

或者

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
  <soap-env:Header/>
  <soap-env:Body>
    <soap-env:Fault>
      <faultcode>soap-env:Server</faultcode>
      <faultstring xml:lang="en">Web service processing error; more details in the Web service error log on provider side (UTC timestamp 20130320080819; Transaction ID 00163E0290481EE2A4A6AA6271768C2A)</faultstring>
      <detail/>
    </soap-env:Fault>
  </soap-env:Body>
</soap-env:Envelope>

你可以在系統中查看詳細錯誤信息 ADMINISTRATOR -> System Administration -> Web Service Message Monitoring

Webservice APIs

Create Social Media User Profile

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
   <soapenv:Header/>
   <soapenv:Body>
      <glob:SocialMediaUserProfileBundleMaintainRequest_sync>
        <SocialMediaUserProfile actionCode="01">
           <!--Optional:-->
           <SocialMediaUserCategoryCode>01</SocialMediaUserCategoryCode>
           <!--1 or more repetitions:-->
           <UserInformation actionCode="01">
              <SocialMediaUserAccountID>tiven0001</SocialMediaUserAccountID>
              <!--Optional:-->
              <GenderCode>1</GenderCode>
              <!--Optional:-->
              <SocialMediaChannelCode>906</SocialMediaChannelCode>
              <!--Optional:-->
              <FamilyName>wang</FamilyName>
              <!--Optional:-->
              <GivenName>tiven</GivenName>
              <!--Optional:-->
              <SocialMediaUserName>anypossible0001</SocialMediaUserName>
              <!--Optional:-->
              <ExternalPartyAccountID >wechat_openid</ExternalPartyAccountID>
           </UserInformation>
        </SocialMediaUserProfile>
      </glob:SocialMediaUserProfileBundleMaintainRequest_sync>
   </soapenv:Body>
</soapenv:Envelope>

Response :

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
   <soap-env:Header/>
   <soap-env:Body>
      <n0:SocialMediaUserProfileBundleMaintainConfirmation_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:LNW:/1SAI/TAE380CF5298475959BCE4F:804">
         <SocialMediaUserProfile>
            <ID>839</ID>
            <UUID>00163e28-f1ac-1ee7-9c8a-14f044444597</UUID>
            <ChangeStateID>20170724091536.8474230</ChangeStateID>
         </SocialMediaUserProfile>
      </n0:SocialMediaUserProfileBundleMaintainConfirmation_sync>
   </soap-env:Body>
</soap-env:Envelope>

SocialMediaUserAccountID 為 UserInformation 的 key , UUID 為 SocialMediaUserProfile 的 key。
當 SocialMediaUserProfile 的 actionCode = 02 為 update , request UserInformation 要填寫完整的數據,即覆蓋系統已有的數據
當 SocialMediaUserProfile 的 actionCode = 04 為 save , UserInformation 可以針對某一個進行操作, actionCode = 01 02 03 04

References

Similar Posts

  • SAP in Opensource Foundations
  • SAP HANA Database SAP HANA is an in-memory, column-oriented, relational database management system developed and marketed by SAP SE. Its primary function as database server is to store and retrieve data as requested by the applications. In addition, it performs advanced analytics (predictive analytics, spatial data processing, text analytics, text search, streaming analytics, graph data processing) and includes ETL capabilities as well as an application server.
  • SAP ABAP CDS
  • SAP OpenUI5
  • SCP Cloud Foundry 1 - Getting Started 很多公司的云平台都提供了Cloud Foundry服务,本文介绍如何在Hybris YaaS上创建Project,如何在HANA Cloud platform HCP上的Cloud Foundry services上创建Application,和一些基础的CF命令
  • How to handle Timezone in SAP HANA, ABAP OData and UI5 本文主要介绍如何在SAP的系列软件中包括Fiori UI5, ABAP, OData, HANA,如何处理不同时区UTC用户使用统一时间timestamp数据。How to handle Timezone in SAP HANA, ABAP OData and UI5

Comments

comments powered by Disqus
Back to Top