PDA

View Full Version : Values too big for Integers


indy2005
16-01-09, 01:00
Hi,

I am using .net to consume the SOAP service. While I know .net is not supported (which upsets me), I am getting errors caused by Product IDs and EAN numbers being returned which dont fit into an Integer.

I dont understand how this can work in any language when EAN values and everything else are coming back as large as below.

<oProduct>
<iId>38931721</iId>
<iCategoryId>230</iCategoryId>
<iMerchantId>2066</iMerchantId>
<sMerchantProductId>9780744010213</sMerchantProductId>
<bAdult>false</bAdult>
<bHotPick>false</bHotPick>
<iEan>9780744010213</iEan>
<iIsbn>9780744010213</iIsbn>
<sName>World of Warcraft: Wrath of the Lich King Official Strategy Guide: (Bg) by Brady Games</sName>
<sDescription>Features coverage of each race in the World of Warcraft: Wrath of the Lich King with strengths, weaknesses and more uncovered. This title helps you find the awesome battery of weapons and armour through equipments lists and pick up information on quests, bosses and treasures. It covers PC.</sDescription>
<sPromotion>Save 20% from the RRP price</sPromotion>
<sBrand>Brady Games</sBrand>
<sModel>9780744010213</sModel>
<sAwDeepLink>http://www.awin1.com/pclick.php?p=38931721&amp;a=87435&amp;m=2066&amp;platform=cs</sAwDeepLink>
<sAwThumbUrl>http://images.productserve.com/thumb/2066/38931721.jpg</sAwThumbUrl>
<sAwImageUrl>http://images.productserve.com/preview/2066/38931721.jpg</sAwImageUrl>
<sMerchantThumbUrl>http://217.205.197.220/borders-media/BookCoverThumbnail/9780744010213/world-of-warcraft-wrath-of-the-lich-king-official-strategy-guide.jpg</sMerchantThumbUrl>
<sMerchantImageUrl>http://217.205.197.220/borders-media/BookCover/9780744010213/world-of-warcraft-wrath-of-the-lich-king-official-strategy-guide.jpg</sMerchantImageUrl>
<fPrice>13.59</fPrice>
<sCurrency>GBP</sCurrency>
<fStorePrice>0</fStorePrice>
<fRrpPrice>16.99</fRrpPrice>
<fDeliveryCost>0</fDeliveryCost>
<bWebOffer>false</bWebOffer>
<bPreOrder>false</bPreOrder>
</oProduct>

GeorgeGaz
16-01-09, 12:36
Hello,

Thank you for raising this. We have been spending a lot of development time of recent tweaking the ProductServe API to make it as usable as possible. As you may know we have come a long way since version one and we are constantly trying to improve the API.

At the moment we are working on a new version and are trying to fix many of these issues you are experiencing. I would be grateful to hear back from you (and other .NET developers) regarding your experience with .NET and which fields you found necessary to change in the API.

We have spent time going through the WSDL this morning and have identified a few fields that need updating to xsd:long to fix this issue. The fields we have found, and will look at, are:
iUpc
iEan
iIsbn
iId

I would suggest using a local copy of the WSDL until we are able to resolve this issue.

As you can understand, the ProductServe API and its corresponding ShopWindow client software installations are a work in progress (beta) and we are constantly striving to improve the products to improve the uptake and usability where possible.

Regards

GeorgeGaz
16-01-09, 13:26
A further note on this.

iId will not be a problem as an int can go up to 2,147,483,647. So unless we get some hardcore merchants on board with billions of products then we should be ok on that one for a while :D

Cheers

Ollie
16-01-09, 16:05
To follow up and answer your question:

PHP is an untyped language. Meaning when you get a value back that is bigger than an everyday integer, it'll become a bigint. Its a little annoying for users of .NET who are constrained by typing but explains why we missed this one. Let me tell you, its a curse and a blessing.

Rest assured this is being looked into. For the moment we would suggest taking a local copy of the WSDL and changing the values where necessary from xsd:int to xsd:long.

We have tried to make the API accessible for all languages and hopefully with your help will be able to make this so for every web capable language in the future.

Thanks for your support!

indy2005
20-01-09, 00:55
Hi,

Have changed the WSDL and all is well. Thanks.

SM