Examples of Customers


Examples of com.restfully.shop.domain.Customers

      System.out.println("** Buy an iPhone for Bill Burke");
      System.out.println();
      System.out.println("** First see if Bill Burke exists as a customer");
      request = new ClientRequest(shoppingLinks.get("customers").getHref() + "?firstName=Bill&lastName=Burke");
      Customers customers = request.getTarget(Customers.class);
      Customer customer = null;
      if (customers.getCustomers().size() > 0)
      {
         System.out.println("- Found a Bill Burke in the database, using that");
         customer = customers.getCustomers().iterator().next();
      }
      else
      {
         System.out.println("- Cound not find a Bill Burke in the database, creating one.");
         customer = new Customer();
View Full Code Here

Examples of com.restfully.shop.domain.Customers

         if (previous < 0) previous = 0;
         URI previousUri = builder.clone().build(previous, size);
         Link previousLink = Link.fromUri(previousUri).rel("previous").type("application/xml").build();
         links.add(previousLink);
      }
      Customers customers = new Customers();
      customers.setCustomers(list);
      customers.setLinks(links);
      return customers;
   }
View Full Code Here

Examples of com.restfully.shop.domain.Customers

         ClientRequest request = new ClientRequest(url);
         String output = request.getTarget(String.class);
         System.out.println("** XML from " + url);
         System.out.println(output);

         Customers customers = request.getTarget(Customers.class);
         url = customers.getNext();
      }
   }
View Full Code Here

Examples of com.restfully.shop.domain.Customers

         if (previous < 0) previous = 0;
         URI previousUri = builder.clone().build(previous, size);
         Link previousLink = Link.fromUri(previousUri).rel("previous").type("application/xml").build();
         links.add(previousLink);
      }
      Customers customers = new Customers();
      customers.setCustomers(list);
      customers.setLinks(links);
      return customers;
   }
View Full Code Here

Examples of com.restfully.shop.domain.Customers

            URI previousUri = builder.clone().build(previous, size);
            Link previousLink = new Link("previous", previousUri.toString(), "application/xml");
            links.add(previousLink);
         }
      }
      Customers customers = new Customers();
      customers.setCustomers(list);
      customers.setLinks(links);
      return customers;
   }
View Full Code Here

Examples of org.apache.cxf.binding.http.Customers

    @Get
    @HttpResource(location = "/customers")
    @WebMethod
    public Customers getCustomers() {
        Customers cbean = new Customers();
        cbean.setCustomer(customers.values());
        return cbean;
    }
View Full Code Here

Examples of org.apache.cxf.binding.http.Customers

    @Get
    @HttpResource(location = "/customers")
    @WebMethod
    public Customers getCustomers(@WebParam(name = "GetCustomers") GetCustomers req) {
        Customers cbean = new Customers();
        cbean.setCustomer(customers.values());
        return cbean;
    }
View Full Code Here

Examples of org.apache.cxf.binding.http.Customers

       
        Object[] objects = client.invoke(new QName("http://cxf.apache.org/jra", "getCustomers"),
                                         new GetCustomers());
        assertNotNull(objects);
       
        Customers c = (Customers) objects[0];
        Customer customer = c.getCustomer().iterator().next();
        assertEquals("Dan Diephouse", customer.getName());
       
        GetCustomer getCustomer = new GetCustomer();
        getCustomer.setId(customer.getId());
        objects = client.invoke(new QName("http://cxf.apache.org/jra", "getCustomer"), getCustomer);
View Full Code Here

Examples of org.apache.cxf.binding.http.Customers

    @Get
    @HttpResource(location = "/customers")
    @WebMethod
    public Customers getCustomers() {
        Customers cbean = new Customers();
        cbean.setCustomer(customers.values());
        return cbean;
    }
View Full Code Here

Examples of org.apache.cxf.binding.http.Customers

    @Get
    @HttpResource(location = "/customers")
    @WebMethod
    public Customers getCustomers(@WebParam(name = "GetCustomers") GetCustomers req) {
        Customers cbean = new Customers();
        cbean.setCustomer(customers.values());
        return cbean;
    }
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.