Author Topic: Could not add Tags to Product using SOAP web services for KonakartAdmin  (Read 4909 times)


  • Jr. Member
  • **
  • Posts: 6
    • View Profile

I am creating portlets in Liferay and using SOAP webservices of konakart admin to create products in konakart .
I am not able to associate Tags with Product.
Below is the related code snippet to add Tags to Product.

Code: [Select]
* Add Tags to Product

AdminSearch adminSearchForTag = new AdminSearch();
AdminTagSearchResult adminTagSearchResult = adminIf.getTags(sessionId, adminSearchForTag, 0, -1);
AdminTag[] adminTags = adminTagSearchResult.getTags();

try {
AdminEngineConfig adminEngineConfig = new AdminEngineConfig();
adminEngineConfig.setProperties(new String[] {"konakartadmin.webservice.URL", "http://localhost:8880/konakartadmin/services/KKWSAdmin", "customAdmin.webservice.URL", "http://localhost:8880/konakartadmin/services/KKWSCustomAdminService", "konakartadmin.webservice.timeoutSecs", "10"});
KKAdmin kkAdmin = new KKAdmin(adminEngineConfig);
AdminTagMgr adminTagMgr = new AdminTagMgr(kkAdmin);
adminTagMgr.addTagsToProduct(adminTags, productId);

} catch (KKAdminException e1) {
} catch (Exception e1) {

It throws error while initializing KKAdmin.
Code: [Select]
[b]KKAdmin kkAdmin = new KKAdmin(adminEngineConfig);[/b]

The error is
java.lang.NoClassDefFoundError for com.konakart.util.PropertyFileNames

I have already added the konakart_utils.jar as a dependency. But the class in error is not there in that jar, and I am not able to find it in any of the jars from konakart. I have also searched in all the jars from konakart and konakartadmin webapp library. But couldn't found the class.

Please correct me, if I am implementing it in wrong way. Specially the initialization of KKAdmin. It might need any other properties, or should I simply feed it with or ?
In any case, the error reported has hardly anything to do with any missing property.

-------------------- Konakart Version Details ------------------------------
 KonaKart Engine Version = (built 8:36AM 25-Apr-2014 BST)

Run Time Info:

Mode = 0, StoreId = store1

Customers Shared = No, Products Shared = No, Categories Shared = No

KonaKart Admin Client Version =

Any help or guidance is a welcome.

« Last Edit: June 20, 2014, 08:32:23 AM by Abhed »


  • Administrator
  • Hero Member
  • *****
  • Posts: 350
    • View Profile
    • KonaKart Website
You can use SOAP for that but I'm not sure why you don't simply use POJOs from there.


When you want to use SOAP instantiate KKWSAdmin(engingConfig)
When you want to use POJO instantiate KKAdmin(engineConfig)

Both of these implement KKAdminIf so you can change which one you use at runtime, if you wish.

Another Clue:

Use properties files rather than that "setProperties(new String[]"  syntax you have used.

The class you couldn't find is in konakart_custom_utils.jar


  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Hello Ming,

Thank you for clues. I am able to achieve it through KKWSAdmin.addTagsToProduct method.