Package com.google.code.magja.service

Examples of com.google.code.magja.service.ServiceException


    try {
      success = (Boolean) soapClient.call(
          ResourcePath.CategoryAssignProduct, list);
    } catch (AxisFault e) {
      System.out.println(e.getMessage());
      throw new ServiceException(e.getMessage());
    }
    if (!success) {
      throw new ServiceException(
          "Not success assign product to category.");
    }
  }
View Full Code Here


      productList = (List<Map<String, Object>>) soapClient.call(
          ResourcePath.CategoryAssignedProducts, list);
    } catch (AxisFault e) {
      if (debug)
        e.printStackTrace();
      throw new ServiceException(e.getMessage());
    }

    if (productList == null)
      return products;
View Full Code Here

    try {
      attributes = (List<Map<String, Object>>) soapClient.call(
          ResourcePath.CategoryAttributeList, "");
    } catch (AxisFault e) {
      if(debug) e.printStackTrace();
      throw new ServiceException(e.getMessage());
    }

    if (attributes == null)
      return results;

    for (Map<String, Object> att : attributes) {

      CategoryAttribute attribute = new CategoryAttribute();

      for (Map.Entry<String, Object> attr : att.entrySet())
        attribute.set(attr.getKey(), attr.getValue());

      // verify options
      if (att.get("type") != null) {
        String type = (String) att.get("type");
        if (type.equals("select") || type.equals("multiselect")) {

          List<Object> optParamList = new LinkedList<Object>();
          optParamList.add(att.get("attribute_id"));
          optParamList.add(storeView);

          List<Map<String, Object>> optList = null;
          try {
            optList = (List<Map<String, Object>>) soapClient.call(
                ResourcePath.CategoryAttributeOptions,
                optParamList);
          } catch (AxisFault e) {
            if(debug) e.printStackTrace();
            throw new ServiceException(e.getMessage());
          }

          if (optList != null) {
            for (Map<String, Object> optAtt : optList) {
View Full Code Here

    try {
      Boolean success = (Boolean) soapClient.call(
          ResourcePath.CustomerAddressDelete, id);
      if (!success)
        throw new ServiceException(
            "Error deleting the Customer Address");
    } catch (AxisFault e) {
      if(debug) e.printStackTrace();
      throw new ServiceException(e.getMessage());
    }

  }
View Full Code Here

    try {
      remote_result = (Map<String, Object>) soapClient.call(
          ResourcePath.CustomerAddressInfo, id);
    } catch (AxisFault e) {
      if(debug) e.printStackTrace();
      throw new ServiceException(e.getMessage());
    }

    if (remote_result == null)
      return null;
    else
View Full Code Here

    try {
      resultList = (List<Map<String, Object>>) soapClient.call(
          ResourcePath.CustomerAddressList, customerId);
    } catch (AxisFault e) {
      if(debug) e.printStackTrace();
      throw new ServiceException(e.getMessage());
    }

    if (resultList == null)
      return addresses;
View Full Code Here

            ResourcePath.CustomerAddressCreate, customerAddress
                .serializeToApi()));
        customerAddress.setId(id);
      } catch (NumberFormatException e) {
        if(debug) e.printStackTrace();
        throw new ServiceException(e.getMessage());
      } catch (AxisFault e) {
        if(debug) e.printStackTrace();
        throw new ServiceException(e.getMessage());
      }
    } else {
      try {
        Boolean success = (Boolean) soapClient.call(
            ResourcePath.CustomerAddressUpdate, customerAddress
                .serializeToApi());
        if (!success)
          throw new ServiceException(
              "Error updating Customer Address");
      } catch (AxisFault e) {
        if(debug) e.printStackTrace();
        throw new ServiceException(e.getMessage());
      }
    }

  }
View Full Code Here

    try {
      Boolean success = (Boolean) soapClient.call(
          ResourcePath.CustomerDelete, id);
      if (!success)
        throw new ServiceException("Error deleting the Customer");
    } catch (AxisFault e) {
      if(debug) e.printStackTrace();
      throw new ServiceException(e.getMessage());
    }

  }
View Full Code Here

    try {
      remote_result = (Map<String, Object>) soapClient.call(
          ResourcePath.CustomerInfo, id);
    } catch (AxisFault e) {
      if(debug) e.printStackTrace();
      throw new ServiceException(e.getMessage());
    }

    if (remote_result == null)
      return null;
    else
View Full Code Here

    try {
      resultList = (List<Map<String, Object>>) soapClient.call(
          ResourcePath.CustomerList, params);
    } catch (AxisFault e) {
      if(debug) e.printStackTrace();
      throw new ServiceException(e.getMessage());
    }

    if (resultList == null)
      return customers;
View Full Code Here

TOP

Related Classes of com.google.code.magja.service.ServiceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.