2015-03-02 40 views
0

我与Magento的同步产品集成ADempiere的,我想创建一个自定义选项中添加新的自定义选项的值,但即时得到错误使用Web服务在Magento API

XML-RPC Error: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'price_type' cannot be null, query was: INSERT INTO `catalog_product_option_type_price` (`option_type_id`, `store_id`, `price`, `price_type`) VALUES (?, ?, ?, ?) 

我已经给定的值Product_DATA.put (“price_type”,“百分比”);代码:

public int CreateCustomOptions(String sessionid,Integer product_id,String Option,String o_value , String o_sku, String price) 
{ 
     HashMap Product_DATA = new HashMap(); 
     Product_DATA.put("title", o_value);  
     Product_DATA.put("price",price); 
     Product_DATA.put("price_type", "percent"); 
     Product_DATA.put("sku", o_sku); 

     Vector ARGS = new Vector(); 
     ARGS.add(sessionid); 
     ARGS.add(new String ("product_custom_option_value.add")); 
     ARGS.add(new Object[] {110,Product_DATA});  
     this.newRequest(remoteHost, "", sessionid, "call", ARGS);    
     Object RESULT = (Object) this.sendRequest(); 
} 

回答