Hi ,

I had been using XMLRPC regularly for invoking OFBiz functions and getting
results.
However with below function calculateProductPrice I am facing problem in
passing the
"product" param . I am getting the error below:

Service: calculateProductPrice faultString:Type check failed for field
[calculateProductPrice.product]; expected type is
[org.apache.ofbiz.entity.GenericValue]; actual type is [java.util.HashMap]

my question is how/what do i send using XMLRPC so that the casting of
"GenericValue" works.


regds
mallah.


================> Defination of function calculateProductPrice
<=============================================
public static Map<String, Object> calculateProductPrice(DispatchContext
dctx, Map<String, ? extends Object> context) {
        Delegator delegator = dctx.getDelegator();
        LocalDispatcher dispatcher = dctx.getDispatcher();
        Map<String, Object> result = new HashMap<String, Object>();
        Timestamp nowTimestamp = UtilDateTime.nowTimestamp();

        GenericValue product = (GenericValue) context.get("product");
        String productId = product.getString("productId");
        String prodCatalogId = (String) context.get("prodCatalogId");
        String webSiteId = (String) context.get("webSiteId");
        String checkIncludeVat = (String) context.get("checkIncludeVat");
        String surveyResponseId = (String) context.get("surveyResponseId");
        Map<String, Object> customAttributes =
UtilGenerics.checkMap(context.get("customAttributes"));

        String findAllQuantityPricesStr = (String)
context.get("findAllQuantityPrices");
        boolean findAllQuantityPrices =
"Y".equals(findAllQuantityPricesStr);
        boolean optimizeForLargeRuleSet =
"Y".equals(context.get("optimizeForLargeRuleSet"));

        String agreementId = (String) context.get("agreementId");

        String productStoreId = (String) context.get("productStoreId");
        String productStoreGroupId = (String)
context.get("productStoreGroupId");
        Locale locale = (Locale) context.get("locale");

        GenericValue productStore = null;

Reply via email to