【发布时间】:2014-02-14 09:34:45
【问题描述】:
我需要帮助来创建加入 2 个服务 Zoho Creator 和 ebay Trading API 的 api 代理
Zoho Creator 可以发送带有 json 的 https POST,但 Zoho 中的构造函数不支持多层 json(仅简单对),eBay 交易 api 仅接受 https XML
我发送简单的 json 请求
{“XMLDATA”:”<GeteBayOfficialTimeRequest xmlns="urn:ebay:apis:eBLBaseComponents">...}
我需要将其转换为 XML 请求,正文中的值为 XMLDATA 并将 Content-type: 的类型更改为“text/xml”
当我从 Zoho 创建者发布请求时,我在 apigee 中获取
内容类型:application/x-www-form-urlencoded
内容长度:234
内容:
XMLDATA=%3CGeteBayOfficialTimeRequest+xmlns%3D%22urn%3Aebay%3Aapis%3AeBLBaseComponents%22%3E+%3CRequesterCredentials%3E+%3CeBayAuthToken%3EMyToken%3C%2FeBayAuthToken%3E+%3C%2FRequesterCredentials%3E+%3C%2FGeteBayOfficialTimeRequest%3E
XMLDATA 的值 - url 编码。
谁能帮助我如何让它工作。
退出时我需要:
Content-type: text/xml
内容喜欢:
<?xml version="1.0" encoding="utf-8"?><GeteBayOfficialTimeRequest xmlns="urn:ebay:apis:eBLBaseComponents"><RequesterCredentials><eBayAuthToken>
【问题讨论】: