Package com.google.code.magja.service

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


    try {
      soapClient.call(ResourcePath.SalesOrderHold, order.getId());
    } catch (AxisFault e) {
      if(debug) e.printStackTrace();
      throw new ServiceException(e.getMessage());
    }

  }
View Full Code Here


      order_list = (List<Map<String, Object>>) soapClient.call(
          ResourcePath.SalesOrderList, (filter != null ? filter
              .serializeToApi() : ""));
    } catch (AxisFault e) {
      if(debug) e.printStackTrace();
      throw new ServiceException(e.getMessage());
    }

    for (Map<String, Object> map : order_list)
      results.add(buildOrderObject(map));
View Full Code Here

    try {
      soapClient.call(ResourcePath.SalesOrderUnhold, order.getId());
    } catch (AxisFault e) {
      if(debug) e.printStackTrace();
      throw new ServiceException(e.getMessage());
    }

  }
View Full Code Here

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

    if(remote_list == null) return regions;

    for (Map<String, Object> map : remote_list) {
View Full Code Here

      return cart;
    } catch (AxisFault e) {
      if (debug) {
        e.printStackTrace();
      }
      throw new ServiceException(e.getMessage());
    }
  }
View Full Code Here

      if (customerId != null) {
        customerProps.put("mode", "customer");
        customerProps.put("customer_id", customerId);
      } else {
        // TODO: mode=guest, register
        throw new ServiceException(
            "Customer must exist; modes [guest|register] not supported yet");
      }

      callParams.put("quoteId", cart.getId());
      callParams.put("customer", customerProps);
      callParams.put("storeId", cart.getStoreId());

      Boolean success = (Boolean) soapClient.call(
          ResourcePath.ShoppingCartCustomerSet, callParams);
      if (!success) {
        throw new ServiceException("Could not set customer");
      }

    } catch (AxisFault e) {
      if (debug) {
        e.printStackTrace();
      }
      throw new ServiceException(e.getMessage());
    }
  }
View Full Code Here

          ResourcePath.ShoppingCartLicenseAgreement, callParams);
    } catch (AxisFault e) {
      if (debug) {
        e.printStackTrace();
      }
      throw new ServiceException(e.getMessage());
    }

    if (result != null) {
      cart.setLicenseAgreements(buildLicenseAgreements(result));
    }
View Full Code Here

          ResourcePath.ShoppingCartTotals, callParams);
    } catch (AxisFault e) {
      if (debug) {
        e.printStackTrace();
      }
      throw new ServiceException(e.getMessage());
    }

    if (result != null) {
      cart.setTotals(buildTotals(result));
    }
View Full Code Here

          ResourcePath.ShoppingCartInfo, callParams);
    } catch (AxisFault e) {
      if (debug) {
        e.printStackTrace();
      }
      throw new ServiceException(e.getMessage());
    }
    if (result != null) {
      return Cart.fromAttributes(result);
    }
View Full Code Here

      Boolean success = (Boolean) soapClient.call(
          ResourcePath.ShoppingCartOrder, callParams);
      // FIXME: getOrder...
      if (!success) {
        throw new ServiceException("Could not create order from cart");
      }
    } catch (AxisFault e) {
      if (debug) {
        e.printStackTrace();
      }
      throw new ServiceException(e.getMessage());
    }
  }
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.