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

Help with API Parameters

Started by ReLLiK75, November 04, 2008, 04:18:05 pm

Previous topic - Next topic

ReLLiK75

Hi there!

I'm currently looking into the possibility of placing a Flex front-end on top of KonaKart via the SOAP APIs.  The front-end is already written and currently works with an "asset-management" type of system to display products for sale.

When I take a look at the wsdl, all the method parameters show up as in0, in1, in2, etc.  There are a couple which a pretty obvious (login, for example), but the majority I have no clue what each parameter is supposed to map to.  I've looked through a good amount of the available documentation and haven't been able to come up with anything that will provide me with the detailed API method parameters. 

Can you please tell me how I go about determining what parameters correspond to what object?

Also, as I mentioned previously, all of my products currently exist in a different SQL Server database. Information about each item for sale needs to come from this database (as it currently does).  Is it possible to use KonaKart simply for customer management/order management/order history?  Is it possible to create an order without having placed anything in the KonaKart basket (maybe dynamically populate the cart and create the order at the same time).  Is it possible to place an object in the KonaKart basket that doesn't already exist as a KonaKart Product object?  Our system directly integrates with ERPs to query in real-time qty on hand, and pricing info.  What I would like to be able to do is take my Product object that contains the real-time info from the ERP and then programmatically create a KonaKart Product object.  I don't see an API to create a KonaKart Product object programmatically, which is something I'd need to do if the only thing that can go in the KonaKart basket is a KonaKart Product.

Thanks!

Wayne


julie

QuoteWhen I take a look at the wsdl, all the method parameters show up as in0, in1, in2, etc.  There are a couple which a pretty obvious (login, for example), but the majority I have no clue what each parameter is supposed to map to.  I've looked through a good amount of the available documentation and haven't been able to come up with anything that will provide me with the detailed API method parameters. 

Can you please tell me how I go about determining what parameters correspond to what object?


Take a look at http://www.konakart.com/apiexamplesfaq.php . All you need to do is to use the KonaKart Web Service Engine which is really a "stub engine" that generates SOAP calls. The Web Service Engine implements the same interface as the standard engine and the custom engine so it is easy to switch from one to another. i.e. You don't have to change a line of code to use the SOAP API.

QuoteAlso, as I mentioned previously, all of my products currently exist in a different SQL Server database. Information about each item for sale needs to come from this database (as it currently does).  Is it possible to use KonaKart simply for customer management/order management/order history?


Yes. as long as the available API calls cover your needs.

QuoteIs it possible to create an order without having placed anything in the KonaKart basket (maybe dynamically populate the cart and create the order at the same time). 


You have to pass the createOrder function an array of basket items which define the products that you want to be in the order and how they are configured in terms of options.

QuoteIs it possible to place an object in the KonaKart basket that doesn't already exist as a KonaKart Product object?  Our system directly integrates with ERPs to query in real-time qty on hand, and pricing info.  What I would like to be able to do is take my Product object that contains the real-time info from the ERP and then programmatically create a KonaKart Product object.  I don't see an API to create a KonaKart Product object programmatically, which is something I'd need to do if the only thing that can go in the KonaKart basket is a KonaKart Product.


This approach looks correct. You create a product using the Admin App API.

All KonaKart functionality (app and admin app) calls our APIs, so if you can achieve something through our apps, you can be sure that you can achieve the same thing through the APIs.

ReLLiK75

QuoteTake a look at http://www.konakart.com/apiexamplesfaq.php . All you need to do is to use the KonaKart Web Service Engine which is really a "stub engine" that generates SOAP calls. The Web Service Engine implements the same interface as the standard engine and the custom engine so it is easy to switch from one to another. i.e. You don't have to change a line of code to use the SOAP API.


Hi...Thanks for the reply!  I took a look at the url as suggested.  Maybe I'm missing something.  I tried importing the the WSDL into a C# project in Visual Studio 2008 to see about maybe writing a proxy class, hoping the code completion in VS would help me out.  Unfortunately not.  There are a few strongly typed object parameters in the method headers, but I still see things like string in0, int in1.  For example, the addToBasket call looks like KKWSEngIf.addToBasket(string in0, int in1, Basket in2).  For this particular call, the only thing I'm certain of is that a basket object is the third parameter.  How am I supposed to know what the first two parameters are?

This problem is further compounded by the fact that I've taken your WSDL, compiled a C# class for it using the WSDL tool in VS, deployed it to WebOrb to handle all the remoting for me, and then used the WebOrb code generation utility to generate all the Flex value objects and the delegate class.  If a parameter is strongly typed, I can see that in Flex, but generic string and number parameters as so abstract I have no clue what to pass in--hence the reason for a middle proxy that strongly defined the method headers for the KonaKart APIs I am going to use.  But like I said before, even in the VS IDE, I don't have enough information to make the API call.

Also in your AxisExample.java file, I see you're using a servicelocator.  I don't see that class available in C#. 

Help!

Thanks!
Wayne

kate

Hi,

Since the parameters for the direct java API are identical to the SOAP API you can look at the javadoc for the direct java API to see the interface documentation...

see http://www.konakart.com/javadoc/admin/ (Admin API) and http://www.konakart.com/javadoc/server/ (Application API)

Kate

ReLLiK75

Beautiful!  Thanks!  Once I realized I needed to view the KKEng and KKAdmin Interface Objects, I found exactly what I needed!

Wayne