Hybris Marketing onPremise API API_MKT_INTERACTION_SRV/与多个实体的交互

2020-09-16 08:44发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中) 大家好, 我正在尝试使用...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


大家好,

我正在尝试使用API​​ API API_MKT_INTERACTION_SRV/Interactions导入多个交互,并且出现错误"解析XML流时出错"。

这是我建造的Json:

[{" InteractionSourceObject":" RB_000006"," InteractionSourceObjectType":" INVOICE"," InteractionTimeStampUTC":" 2018-02-10T09:00:00"," InteractionContactId":" 8148791"," InteractionContactOrigin":" ZPASSPORT"," InteractionAmount":" 2000.00"," InteractionType":" SALES_ORDER"," CommunicationMedium":" BUSINESS_DOCUMENT"," ZZ1_SalesCost_MIA":" 1837.00"," ZZ1_OrderImcoming_MIA":" 1138.00"," ZZ1_TheoricSales ," ZZ1_TotalDiscount_MIA":" 50.00"," ZZ1_Store_MIA":" 1234"," InteractionCurrency":" BRL"," InteractionProducts":[{" Product":" RB_1234"," ProductOrigin":" SAP_HYBRIS_PRODUCT"," InteractionProductQuantity" :" 2.00"," InteractionProductUnit":" KGM"," InteractionProductAmount":" 500.00"," ZZ1_OfferId_MIP":" 123456"},{" Product":" RB_1235"," ProductOrigin":" SAP_HYBRIS_PRODUCT"," InteractionProductQuantity" :" 2.00"," InteractionProductUnit":" KGM"," InteractionProductAmount":" 500.00"," ZZ1_OfferId_MIP":" 123456"}]},{" InteractionSo urceObject":" RB_000007"," InteractionSourceObjectType":" INVOICE"," InteractionTimeStampUTC":" 2018-02-11T09:00:00"," InteractionContactId":" 8148791"," InteractionContactOrigin":" ZPASSPORT"," InteractionAmount" :" 2000.00"," InteractionType":" SALES_ORDER"," CommunicationMedium":" BUSINESS_DOCUMENT"," ZZ1_SalesCost_MIA":" 1837.00"," ZZ1_OrderImcoming_MIA":" 1138.00"," ZZ1_TheoricSalesPrice_MIA":" 1921,0" 50.00"," ZZ1_Store_MIA":" 1234"," InteractionCurrency":" BRL"," InteractionProducts":[{"" Product":" RB_1234"," ProductOrigin":" SAP_HYBRIS_PRODUCT"," InteractionProductQuantity":" 2.00"," InteractionProductUnit":" KGM"," InteractionProductAmount":" 500.00"," ZZ1_OfferId_MIP":" 123456"},{" Product":" RB_1235"," ProductOrigin":" SAP_HYBRIS_PRODUCT"," InteractionProductQuantity":" 2.00"," InteractionProductUnit":" KGM"," InteractionProductAmount":" 500.00"," ZZ1_OfferId_MIP":" 123456"}]}]

这是退货:

http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> CX_SXML_PARSE_ERROR/001560AA0E081DEB8CA398CC1690D406 解析XML流时出错 CEC-MKT-DM-IA /SAP/ API_MKT_INTERACTION_SRV 0001 223B7B4444B30080E005AB98085AA93F 20180328152830.2430970 对于后端管理员:在SAP Gateway集线器系统上运行事务/IWFND/ERROR_LOG并搜索具有上述时间戳的条目以获取更多详细信息 有关错误分析,请参见SAP注释1797736( https://service.sap.com/sap/support/notes/1797736)>

我确实尝试过使用bacth模式进行上传:

-批处理内容类型:多部分/混合; boundary = changeset --changeset内容类型:application/http内容传输编码:二进制POST位置HTTP/1.1内容类型:application/atom + xml内容长度:10000 <?xml version =" 1.0" encoding =" utf-8" standalone =" yes"?> RB_000006 > INVOICE 2018-02-10T09:00:00 8148791 8148791 --changeset内容类型:application/http Content-Transfer- 编码:二进制POST位置HTTP/1.1内容类型:application/atom + xml内容- 长度:10000 <?xml version =" 1.0" encoding =" utf-8" standalone =" yes"?> RB_000006 INVOICE 2018-02-10T09:00 :00 8148791 8148791 --changeset---批处理-

但是我收到了错误的媒体类型错误

您对我如何使用此API导入多个交互有任何想法吗?

最诚挚的问候


3条回答
Nan4612
2020-09-16 09:36

嗨鲁本斯,

对于json文件,有一个包含json有效负载的数组。 您可以对阵列进行另一个测试吗?

对于批处理模式,POST位于"位置"上,但应为"交互"。
下面是一个具有多个交互的批处理请求的示例。
(对不起,格式错误)

-批处理内容类型:多部分/混合; boundary = changeset_1 --changeset_1内容类型:application/http content-transfer-encoding:二进制POST交互HTTP/1.1接受:application/json Sap-Cuan-SourceSystemType:EXT Sap-Cuan-SourceSystemId:CPI内容类型:application/json Sap-Cuan-ForceSynchronousProcessing:X {" InteractionContactOrigin":" SAP_HYBRIS_CONSUMER"," InteractionContactId":" JHI_001"," CommunicationMedium":" ONLINE_SHOP"," InteractionType":" PROD_REVIEW_CREATED"," InteractionTimeStampUTC--03 06T12:12:24"," SourceSystemType":" COM"," SourceSystem":" SAP_MERCH_SHOP"," InteractionContent":" 2018-03-28交互产品测试01"} --changeset_1内容类型:application/http content -transfer-encoding:二进制POST交互HTTP/1.1接受:application/json Sap-Cuan-SourceSystemId:EXT Sap-Cuan-SourceSystemId:CPI内容类型:application/json Sap-Cuan-ForceSynchronousProcessing:X {" InteractionContactOrigin":" SAP_HYBRIS_CONSUMER"," InteractionContactId":" JHI_001"," CommunicationMedium":" ONL INE_SHOP"," InteractionType":" PROD_REVIEW_CREATED"," InteractionTimeStampUTC":" 2018-03-06T12:12:25"," SourceSystemType":" COM"," SourceSystem":" SAP_MERCH_SHOP"," InteractionContent":" 2018- 03-28互动产品测试02"} --changeset_1-- --batch-

br

Johannes

一周热门 更多>