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条回答
宇峰
2020-09-16 09:28

我有类似的错误。

在邮递员中,这是我的要求(有效)

-批处理内容类型:多份/混合; boundary = changeset_761e49b6-3146-4a57-8d10-15816fb9c751

-changeset_761e49b6-3146-4a57-8d10-15816fb9c751

内容类型:application/http

POST Interactions()HTTP/1.1

内容类型:application/json

{

" InteractionContactOrigin":" SAP_HYBRIS_CONSUMER",

" InteractionContactId":" 92a2fc8549a4ad28",

" CommunicationMedium":" ONLINE_SHOP",

" InteractionType":" SHOP_ITEM_VIEW",

" InteractionTimeStampUTC":" 1970-01-18T17:14:48",

" InteractionAmount":" 0",

" InteractionCurrency":" EUR",

" DeviceType":"智能手机",

" SourceSystemType":" iOS 11.3",

" InteractionProducts":[{

" ProductOrigin":" SAP_HYBRIS_PRODUCT",

"产品":" 1288120"

}]

}

但是在CPI(云平台集成)中,它表示:

LastError = com.thoughtworks.xstream.converters.ConversionException:OSCI问题:OSCI问题----调试信息----消息:OSCI问题原因:com.sap.gateway.core.ip.processor。 exception.ODataProcessingException原因消息:OSCI问题类:java.util.ArrayList必需类型:java.util.ArrayList转换器类型:com.sap.gateway.core.ip.processor.converter.ConverterXMLToList路径:/batchParts/batchChangeSet/batchChangeSetPart/Interactions行号:2版本:null

有什么主意吗?

最好的问候

C撒

一周热门 更多>