简体   繁体   English

如何与电子商务平台Hybris对接

[英]How to interfacing with eCommerce platform Hybris

Has any experience with integrating with the eCommerce platform Hybris. 有与电子商务平台Hybris集成的经验。 I do know that Hybris has an import folder where you can dump a file and then create custom Java source code to parse the content of the file. 我确实知道Hybris有一个导入文件夹,您可以在其中转储文件,然后创建自定义Java源代码以解析文件的内容。 This is however a very static method. 但是,这是一种非常静态的方法。 Is there a way of communication/sending data directly to Hybris eg use an XML file(of course with a specific defined structure of the XML file) and send this file to a MQ, web service or other 是否有一种直接将数据通信/发送到Hybris的方法,例如使用XML文件(当然具有XML文件的特定定义结构)并将此文件发送到MQ,Web服务或其他

They are many ways to interact with Hybris. 他们是与Hybris互动的多种方式。 Hybris is based on standard Java / Spring, and expose API to all Hybris specific functionalities. Hybris基于标准Java / Spring,并将API暴露于所有Hybris特定功能。 Of the top of my head, I see the following solutions : 在我的头上,我看到以下解决方案:

  • Write your own web services using any technology you want (we use JAXB) and plug into the Hybris Java API. 使用所需的任何技术(我们使用JAXB)编写自己的Web服务,并插入Hybris Java API。 This is probably the most flexible solution, but requires to write and maintain additional code. 这可能是最灵活的解决方案,但是需要编写和维护其他代码。
  • Use the impex mechanism of Hybris (it is a kind of mix between CSV and SQL). 使用Hybris的impex机制(它是CSV和SQL之间的一种混合)。 This is a quite low level mechanism, which maps almost directly to your data model, so no higher level abstraction here. 这是一个非常低级的机制,它几乎直接映射到您的数据模型,因此这里没有更高级别的抽象。 The performances of impexes are not stellar (to say the least) so be carefull. 即兴表演的表现不是很出色(至少可以这么说),所以要小心。
  • All Hybris services can be exposed as XML or JSON based services. 所有Hybris服务都可以公开为基于XML或JSON的服务。 They are called REST by Hybris, but understand it only as non-SOAP based webservices. Hybris将它们称为REST,但仅将其理解为基于非SOAP的Web服务。 Most of them are not document oriented. 它们中的大多数不是面向文档的。 Also, standard Hybris services are usually of a lower level of abstraction than what I would like for an external API. 而且,标准Hybris服务的抽象级别通常比我对外部API的抽象级别低。 You can also expose your own services with the same mechanism. 您也可以使用相同的机制公开自己的服务。
  • As you point out, Hybris can also watch a folder to import XML or impex based files and import them. 如您所指出的,Hybris还可以监视文件夹以导入基于XML或impex的文件并将其导入。

The decision of which solution to use depends on you specific requirements, but for most cases, I would go with Hybris "REST" services to keep close to the standard, or expose your own services using the same mechanism if you want a higher level of abstraction, or write your own SOAP based services if you need a clear published interface. 使用哪种解决方案的决定取决于您的特定要求,但是在大多数情况下,我会选择Hybris的“ REST”服务来保持与标准的接近,或者如果您想要更高级别的服务,则可以使用相同的机制公开自己的服务。抽象,或在需要清晰的发布接口时编写自己的基于SOAP的服务。

There are many ways to integrate with a hybris-platform. 与hybris平台集成的方法有很多。 If you're using a more or less recent Version 4 of the hybris-platform, you can use the out-of-the-box rest-webservices. 如果您使用的Hybris平台版本或多或少是最新的,则可以使用开箱即用的rest-webservices。

Checkout the hybriswiki for platformwebservices extension for details. 查阅hybriswiki的platformwebservices扩展以获取详细信息。

Another possibility is to use the jms template extension which is based on Java Message Service 另一种可能性是使用基于Java消息服务的jms模板扩展

The way to go depends usually on the question where the data is coming from and in which form it is available and with which tools you're most familiar with. 处理方式通常取决于以下问题:数据来自何处,可用数据的形式以及您最熟悉的工具。 Last but not least, consider performance: Are you importing millions of Product-related items or do you synchronize some user-data only? 最后但并非最不重要的一点是,考虑性能:是要导入数百万个与产品相关的项目,还是仅同步某些用户数据?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM