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

Customize method getProductsPerCategory() for Web Service

Started by beltazar_x, October 16, 2012, 11:24:30 pm

Previous topic - Next topic

beltazar_x

Hi,

I am currently developing and android application that connects remotely to my konakart store using Web Services.

Due to limitations in the Java API Android uses, I am unable to use the interface KKWSEng (or if anyone knows how to use it correctly in Android please let me know).

Surfing the web I found KSoap2, that allows to perform SOAP calls in Android. This API has been working fine except that is unable to process nested complex objects sent in the SOAP message (or at least I haven't been able to make it work). This particular problem was found in the method getProductsPerCategory() because it returns an object ProductsIf that has for attribute an array of products.

So I decided to modify the Web Service so that instead of returning ProductsIf, it returns ProductIf[] (using getProductArray()). The change is really simple but I don't really know which source code is the one I need to modify.

I found this guide:
http://www.konakart.com/docs/EngineCustomization.html

There I found about the file KKCustomEng. Is this the one that manages the Web Services? How do I make both versions keep working (the original for my web storefront and the custom for the Android application)?

Best regards.

ryan

I think your best bet would be to upgrade to the enterprise version and use JSON.

You can customize the engine API calls by adding your own code before and after the call, for pre and post processing, but you can't change the method return type since that would involve changing the engine to modify the code that implements the method. Also we use complex objects all over the place so really I don't think that it's a feasible approach.