使用soapUI消费SAP Cloud for Customer的web service
Hello all, I am really a newbie to Cloud for Customer world and this is my first blog, very simple but I hope it can help some other newbies just the same as me.
I have been working as an application developer in SAP CRM for 5 years, and in CRM we have dedicated work center to create web service based on CRM standard business object.
Just a quick glance at the modeling UI in CRM.
and now I have to do the same in C4C, let’s say I would like to query C4C Opportunity transaction data in my custom application using standard web service provided in C4C. In order to test this consumption, I choose SoapUI.
Here below is detailed step by step screenshot.
(1) Go to workcenter Administrator, then Input and Output management->Service Explorer, you can get a list of all standard inbound services here.
Download the WSDL for later use. 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.
(2) Download and install SoapUI. Create a new SOAP project by loading the WSDL downloaded from previous step.
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.
<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>
Execute this request, I meet with error message: 401 Unauthorized.
Then I manually maintained my business user and password in request property view:
You might also need to maintain proxy setting for SoapUI according to your network landscape.
Once you have finished all such settings, execute request again and now you can see response as expected:
Update 2017-11-29
In case you meet with error message “Authorization role missing” when consuming web service, you might refer to this blog for help: How to resolve error message when calling Web Service in SoapUI – Authorization role missing
- GitLab 任意文件读取漏洞 (CVE-2016-9086) 和任意用户 token 泄露漏洞
- 如何使用Hue通过数据文件创建Collections
- GNU tar 解压路径绕过漏洞(CVE-2016-6321) 分析
- Memcached 命令执行漏洞(CVE-2016-8704、CVE-2016-8705、CVE-2016-8706)简析
- 使用Hue创建Ssh的Oozie工作流时重定向输出日志报错分析
- Joomla未授权创建特权用户漏洞(CVE-2016-8869)分析
- 检测本地文件躲避安全分析
- 如何在Kerberos的Linux上安装及配置Impala的ODBC驱动
- 对抗静态分析——so文件的加密
- Bypass unsafe-inline mode CSP
- Joomla未授权创建用户漏洞(CVE-2016-8870)分析
- 如何将HDFS文件系统挂载到Linux本地文件系统
- 使用 XML 内部实体绕过 Chrome 和 IE 的 XSS 过滤器
- 响应式编程的实践
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- K8s之Helm工具详解
- 技术创作101训练营——上古神器Gvim--从入门到精通
- 关于linux7下编写crontab任务执行mysqldump备份无效
- 黑暗中的YOLO:解决黑夜里的目标检测 | ECCV 2020
- Elasticsearch:Java 运用示例
- 【5分钟玩转Lighthouse】搭建个人云盘
- Elasticsearch:Index alias
- 编程神器来了!写代码、搜问题,全部都在「终端」完成!是时候入手了
- Array - 238. Product of Array Except Self
- Array - 209. Minimum Size Subarray Sum
- Array - 334. Increasing Triplet Subsequence
- Array - 123. Best Time to Buy and Sell Stock III
- Array - 122. Best Time to Buy and Sell Stock II
- Array - 121. Best Time to Buy and Sell Stock
- Array - 220. Contains Duplicate III