简体   繁体   中英

How to interfacing with eCommerce platform Hybris

Has any experience with integrating with the eCommerce platform 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. 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

They are many ways to interact with Hybris. Hybris is based on standard Java / Spring, and expose API to all Hybris specific functionalities. 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. 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). 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. They are called REST by Hybris, but understand it only as non-SOAP based webservices. 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. 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.

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.

There are many ways to integrate with a hybris-platform. 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.

Checkout the hybriswiki for platformwebservices extension for details.

Another possibility is to use the jms template extension which is based on Java Message Service

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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