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

SOAP API Bug--GetProduct fails to return any price info

Started by ReLLiK75, November 25, 2008, 06:15:09 pm

Previous topic - Next topic

ReLLiK75

Initially, I thought I was doing something wrong, but I've now been able to confirm that there is definitely a bug in the SOAP API.  No price information is ever returned when getting basketItems or expliciting calling GetProduct for a given item in the basket.

I programmatically (using SOAP) created a new product and set the priceExTax attribute to $150.  I then log into KK, find that product and add it to my cart.  My cart then shows my programatically created item with the correct price of $150.  I log out of KK, and run a test application (again, using SOAP) to get my basket items and also get full products (using the GetProduct API) for each item in my basket, which in this case is only one item.  I can see in my debugger that getBasketItemsPerCustomer returns the correct basket item and getProduct returns the correct product, however, there is no pricing info in either the basket object or the product object.

Help!

trevor

If you add the two attached properties files to your webapps/konakart/WEB-INF/classes directory, the next time you launch the KonaKart server it will use the web services engine which is pointing to our online demo web services ( http://www.konakart.com/konakart/services/KKWebServiceEng?wsdl )  . This means that you should be able to run your application using SOAP and using the same data being used by our online demo.

I've just tried it and can see that all products have prices. If you place a proxy between your local application and our web services, you should be able to capture the SOAP messages going back and forth in order to figure out what is going on.

ReLLiK75

Hi Trevor...

Not sure how simply just pointing to your online WSDL is going to make a difference since the the information is coming from my database--not yours.  I would need a URL to your database, as well, in order to be able to use your data.

Anyway...you got me thinking when you mentioned putting a proxy in between my app and the webservice.  I can't actually do that since I'm consuming the KK webservice directly in a C# business layer class which is exposed via WebOrb.  WebOrb is handling all communication between my Flex app and my C# class, which is actually making all the SOAP calls.

One of the very nice things about WebOrb is it's automatic code generation so that you can simply point it to a DLL and get a bunch of client side code to start using right away.  Unfortunately, there are some issues with the way it maps between object types.  For example.  All of the pricing information is typed as System.Nullable<decimal> when converted over to C# via a web reference. WebOrb however, tries to type System.Nullable<Decimal> as an Object for some reason. So by going back to the Reference.CS file generated by Visual Studio and converting System.Nullable<decimal> to simply Decimal, WebOrb was able to correctly map to the corresponding type "Number".

With that change made, all pricing info is now returned.

Do you see any negatives to not using a nullable generic?

Thanks!
Wayne

trevor

QuoteNot sure how simply just pointing to your online WSDL is going to make a difference since the the information is coming from my database--not yours.  I would need a URL to your database, as well, in order to be able to use your data.


The idea was to show that there isn't a bug in the SOAP API  ;)