Examples of ProductPrice


Examples of es.upm.fi.sos.t3.shoppingcart.ProductPrice

  public es.upm.fi.sos.t3.shoppingcart.ProductPrice getProductPrice(
      es.upm.fi.sos.t3.shoppingcart.ProductName productName11)
      throws ProductUnknownError, NotValidSessionError {
    // TODO : fill this with the necessary business logic
    WarehouseInformationWSStub service;
    ProductPrice precio = new ProductPrice();
    precio.setProductPrice(0);
    try {
      service = new WarehouseInformationWSStub();
      // Comprobamos que es una sesion valida.
      if (!checkSession()) {
        // Si no es sesion valida lanzo error.
        throw new NotValidSessionError();
      }
      // Veo si existe el producto en el servidor.
      if (!(hasProduct(productName11.getProductName()))) {
        throw new ProductUnknownError();
      }

      // Devuelvo el precio del producto.
      ProductName test = new ProductName();
      test.setProductName(productName11.getProductName());

      precio.setProductPrice(service.getProductPrice(test)
          .getProductPrice());
      return precio;

    } catch (AxisFault e) { // Al generar la conexión.
      // TODO Auto-generated catch block
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.