• Welcome to KonaKart Community Forum. Please login or sign up.
 

Communication between Konakart and Liferay

Started by liferay_resource, May 10, 2011, 07:51:18 am

Previous topic - Next topic

liferay_resource

Hi Folks,

This may be an oft repeated question/query here but still wanted some kind of a suggestion/workaround for the same.

Environment:
KonaKart-5.2.0.0 Community Edition
Liferay 6.0.5 with Tomcat 6.0.26 on MySQL

I have deployed KonaKart as a portlet in liferay and so far so good.

Now we want to open an communication channel/integration between KonaKart and our Liferay custom portlets.

For example,
On any Konakart 'Order' checkout, we need to call out liferay portlet with the 'Order' detail where in we will be doing some processing and storing the data in liferay database in a separate table.Also the checkout process will continue on Konakart's end.
This just one of many scenarios we need to handle.


Following are the options this kind of communication that we can think of -

1)Web Services
From what we have researched, it seems that web services have a axis compatibility issue.
Now does that mean Liferay webservices are not available to KonaKart or vice-versa or in both directions its not working?

2)RMI
As currently we cannot go for Enterprise Edition, this is not feasible

3)Direct Java/POJO
Can our functionality be fulfilled by using this POJO engine of Konakart?

Also, is there any other way of interation for achieving this functionality ?

Thanks for any help/hint/suggestion :)

Regards,
LR

greg

It is the Axis web services of KonaKart that aren't available inside Liferay, because Liferay uses a different version of Axis.    You can call web services from your KonaKart portlet so long as you use libraries that are compatible with Liferay & KonaKart.   You can make KonaKart's web services available in a separate deployment that's outside Liferay if you really need to make them available however.

You can use java inside the KonaKart webapp/portlet to call your Liferay services so long as you don't have jar incompatibilities.  If I understand you correctly,  this doesn't really have anything to do with the POJO engine of KonaKart since you are talking about calling out not in.

For order integration - look at the OrderIntegrationMgr - specially designed for this purpose.



trevor

Take a look at the OrderIntegrationManager http://www.konakart.com/docs/OrderStatusChangeActions.html . Here you can add your own code to communicate with Liferay when the state of an order changes or an order is saved. Maybe you can call Liferay APIs directly from here since KonaKart is running in the same WebApp as Liferay?

liferay_resource

Thanks a lot guys. These are the quickest replies I have ever received on a forum. Just fabulous :)


We have edited 'OrderIntegrationMgr - beforeSaveOrder()' for inserting some dummy entries in KonaKart database and its working as expected. And as both of you corroborated, I am going in the right direction with regards to the place of integration :)


For Greg:
So what I infer is from KonaKart I can call Liferay webservices without any hitch. That means even axis is not an issue.
Also, does that mean POJO engine is used only while calling KonaKart web services ?

For Trevor:
Both KonaKart and our liferay custom portlets are running on the same webapp as you mentioned but how can I call my liferay APIs directly ? Can you please guide me for the same.

Thanks a lot.

Regards,
LR

trevor

I'm not a Liferay expert I'm afraid, but I was assuming that since you have access to the Liferay Jars there could be a way of calling into Liferay.

greg

QuoteAlso, does that mean POJO engine is used only while calling KonaKart web services ?


No.  KonaKart has engines - basically one for the storefront part (the "application") and one for the admin part (loading products etc).

To program against these you instantiate one of the various clients to these engines.  There is a POJO client (the default), RMI or SOAP.   Each implement a defined interface so you can write your code once and decide which engine to instantiate at runtime by name.

Check out the User Guide in every download package that gives you more information on these things.

liferay_resource

Quote from: trevor on May 10, 2011, 09:08:41 am
I'm not a Liferay expert I'm afraid, but I was assuming that since you have access to the Liferay Jars there could be a way of calling into Liferay.


Fair enough.. I will do check this aspect and revert if its feasible.

Quote from: greg on May 10, 2011, 09:21:49 am
QuoteAlso, does that mean POJO engine is used only while calling KonaKart web services ?


No.  KonaKart has engines - basically one for the storefront part (the "application") and one for the admin part (loading products etc).

To program against these you instantiate one of the various clients to these engines.  There is a POJO client (the default), RMI or SOAP.   Each implement a defined interface so you can write your code once and decide which engine to instantiate at runtime by name.

Check out the User Guide in every download package that gives you more information on these things.


I had a bird's eye view of the docs but will again read through for this info.

Thanks a lot once again :)

Regards,
LR