Search in sources :

Example 11 with Customer

use of org.jboss.test.ws.jaxws.benchmark.test.complex.types.Customer in project jbossws-cxf by jbossws.

the class ComplexTest method testRegistration.

public void testRegistration(Registration port) throws Exception {
    Customer customer = getFredJackson();
    customer.getReferredCustomers().add(getJohnDoe());
    customer.getReferredCustomers().add(getAlCapone());
    XMLGregorianCalendar cal = getCalendar();
    port.register(customer, cal);
    customer = getAlCapone();
    port.register(customer, cal);
}
Also used : XMLGregorianCalendar(javax.xml.datatype.XMLGregorianCalendar) InvoiceCustomer(org.jboss.test.ws.jaxws.benchmark.test.complex.types.InvoiceCustomer) Customer(org.jboss.test.ws.jaxws.benchmark.test.complex.types.Customer)

Example 12 with Customer

use of org.jboss.test.ws.jaxws.benchmark.test.complex.types.Customer in project jbossws-cxf by jbossws.

the class RegistrationServiceImpl method register.

public long register(Customer customer, Object when) throws AlreadyRegisteredFault_Exception, ValidationFault_Exception {
    Name name = customer.getName();
    if (name == null) {
        ValidationFault fault = new ValidationFault();
        fault.getFailedCustomers().add(customer.getId());
        throw new ValidationFault_Exception("No name!", fault);
    }
    for (Customer c : customer.getReferredCustomers()) {
        log.trace("Refered customer: " + c.getName());
    }
    log.trace("registering customer: " + customer);
    return customer.getId();
}
Also used : ValidationFault_Exception(org.jboss.test.ws.jaxws.benchmark.test.complex.types.ValidationFault_Exception) ValidationFault(org.jboss.test.ws.jaxws.benchmark.test.complex.types.ValidationFault) InvoiceCustomer(org.jboss.test.ws.jaxws.benchmark.test.complex.types.InvoiceCustomer) Customer(org.jboss.test.ws.jaxws.benchmark.test.complex.types.Customer) Name(org.jboss.test.ws.jaxws.benchmark.test.complex.types.Name)

Aggregations

Customer (org.jboss.test.ws.jaxws.benchmark.test.complex.types.Customer)12 InvoiceCustomer (org.jboss.test.ws.jaxws.benchmark.test.complex.types.InvoiceCustomer)12 Address (org.jboss.test.ws.jaxws.benchmark.test.complex.types.Address)8 PhoneNumber (org.jboss.test.ws.jaxws.benchmark.test.complex.types.PhoneNumber)8 Name (org.jboss.test.ws.jaxws.benchmark.test.complex.types.Name)7 QName (javax.xml.namespace.QName)6 XMLGregorianCalendar (javax.xml.datatype.XMLGregorianCalendar)2 ValidationFault (org.jboss.test.ws.jaxws.benchmark.test.complex.types.ValidationFault)2 ValidationFault_Exception (org.jboss.test.ws.jaxws.benchmark.test.complex.types.ValidationFault_Exception)2 ArrayList (java.util.ArrayList)1