public EndpointReference getEventSink() { try { return lookupEpr(NS, "event-sink-epr"); } catch (AxisFault e) { e.printStackTrace(); return null; } }
@Override public void updatePrice(List<ProductUpdatePrice> products) throws ServiceException { log.info("Updating products price for {}.", products); try { soapClient.callSingle(ResourcePath.ProductUpdatePrice, products); } catch (AxisFault e) { log.error("Cannot call product.ProductUpdatePrice for " + products, e); if (debug) e.printStackTrace(); throw new ServiceException("Cannot call product.ProductUpdatePrice for " + products, e); } }
public final void init(AxisService service) { super.axisService = service; this.serviceName = service.getName(); try { super.init(); } catch (AxisFault e) { e.printStackTrace(); } }
public final void init(AxisService service) { super.axisService = service; this.serviceName = service.getName(); try { super.init(); } catch (AxisFault e) { e.printStackTrace(); } }
public final void init(AxisService service) { super.axisService = service; super.serviceName = service.getName(); try { super.init(); } catch (AxisFault e) { e.printStackTrace(); } }
@Override public void setAssociatedProducts(String productSku, Map<String, String> childProducts) throws ServiceException { try { String results = soapClient.callArgs(ResourcePath.ProductAssociateChildren, new Object[] { productSku, childProducts }); log.debug("setAssociated products {} returned {}", productSku, results); } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } }
@Override public Map<String, String> getCarriers(Integer orderId) throws ServiceException { try { Map<String, String> carriers = soapClient.callSingle(ResourcePath.SalesOrderShipmentGetCarriers, orderId); return carriers; } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } }
@Override public void delete(String attributeName) throws ServiceException { try { if (!(Boolean) soapClient.callSingle(ResourcePath.ProductAttributeDelete, attributeName)) throw new ServiceException("Error deleting product attribute."); } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } }
@Override public void sendInfo(Shipment shipment, String comment) throws ServiceException { Object[] params = new Object[] { shipment.getId(), (comment != null ? comment : "") }; try { soapClient.callArgs(ResourcePath.SalesOrderShipmentSendInfo, params); } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } } }
@Override public void capture(Invoice invoice) throws ServiceException { try { soapClient.callSingle(ResourcePath.SalesOrderInvoiceCapture, invoice.getId()); } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } }
@Override public void cancel(Order order) throws ServiceException { try { soapClient.callSingle(ResourcePath.SalesOrderCancel, order.getOrderNumber()); } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } }
@Override public Shipment getById(Integer id) throws ServiceException { Map<String, Object> result = null; try { result = soapClient.callSingle(ResourcePath.SalesOrderShipmentInfo, id); } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } return (result != null ? buildShipment(result) : null); }
@Override public void voidInvoice(Invoice invoice) throws ServiceException { try { soapClient.callSingle(ResourcePath.SalesOrderInvoiceVoid, invoice.getId()); } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } }
@Override public void cancelInvoice(Invoice invoice) throws ServiceException { try { soapClient.callSingle(ResourcePath.SalesOrderInvoiceCancel, invoice.getId()); } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } }
@Override public void delete(Integer id) throws ServiceException { try { Boolean success = (Boolean) soapClient.callSingle(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()); } }
@Override public void addComment(Order order, String status, String comment, Boolean notify) throws ServiceException { try { soapClient.callArgs(ResourcePath.SalesOrderAddComment, new Object[] { order.getOrderNumber(), status, comment, notify ? 1 : 0 }); } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } }
@Override public void addComment(Shipment shipment, String comment, Boolean email, Boolean includeComment) throws ServiceException { Object[] params = new Object[] { shipment.getId(), (comment != null ? comment : ""), (email ? "1" : "0"), (includeComment ? "1" : "0") }; try { soapClient.callArgs(ResourcePath.SalesOrderShipmentAddComment, params); } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } }
@Override public void addComment(Invoice invoice, String comment, Boolean email, Boolean includeComment) throws ServiceException { try { soapClient.callArgs(ResourcePath.SalesOrderInvoiceAddComment, new Object[] { invoice.getId(), comment != null ? comment : "", email ? "1" : "0", includeComment ? "1" : "0" }); } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } }
@Override public Invoice getById(Integer id) throws ServiceException { Map<String, Object> result = null; try { result = soapClient.callSingle(ResourcePath.SalesOrderInvoiceInfo, id); } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } return (result != null ? buildInvoice(result) : null); }
@Override public void unhold(Order order) throws ServiceException { try { soapClient.callSingle(ResourcePath.SalesOrderUnhold, order.getOrderNumber()); } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } }