Examples of AddressBookEntry


Examples of org.apache.axis2.jaxws.sample.addressbook.AddressBookEntry

                QNAME_PORT, jbc, Mode.PAYLOAD);
               
        // Create the JAX-B object that will hold the data
        ObjectFactory factory = new ObjectFactory();
        AddEntry request = factory.createAddEntry();
        AddressBookEntry content = factory.createAddressBookEntry();
       
        content.setFirstName("Ron");
        content.setLastName("Testerson");
        content.setPhone("512-459-2222");
       
        // Since this is a doc/lit wrapped WSDL, we need to set the
        // data inside of a request wrapper element.
        request.setEntry(content);
       
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addressbook.AddressBookEntry

        AddressBook ab = service.getPort(QNAME_PORT, AddressBook.class);
        BindingProvider p1 = (BindingProvider) ab;
        p1.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, URL_ENDPOINT);
       
        ObjectFactory factory = new ObjectFactory();
        AddressBookEntry content = factory.createAddressBookEntry();
        content.setFirstName("Foo");
        content.setLastName("Bar");
        content.setPhone("512-459-2222");
       
        boolean added = ab.addEntry(content);
       
        // Validate the results
        assertNotNull(added);
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addressbook.AddressBookEntry

        BindingProvider p1 = (BindingProvider) ab;
        p1.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, URL_ENDPOINT);
       
        String fname = "Joe";
        String lname = "Test";
        AddressBookEntry result = ab.findEntryByName(fname, lname);
       
        // Validate the results
        assertNotNull(result);
        assertNotNull(result.getFirstName());
        assertNotNull(result.getLastName());
        assertTrue(result.getFirstName().equals(fname));
        assertTrue(result.getLastName().equals(lname));
       
        // Try the invoke again to verify
        result = ab.findEntryByName(fname, lname);
       
        // Validate the results
        assertNotNull(result);
        assertNotNull(result.getFirstName());
        assertNotNull(result.getLastName());
        assertTrue(result.getFirstName().equals(fname));
        assertTrue(result.getLastName().equals(lname));
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addressbook.AddressBookEntry

                QNAME_PORT, jbc, Mode.PAYLOAD);
               
        // Create the JAX-B object that will hold the data
        ObjectFactory factory = new ObjectFactory();
        AddEntry request = factory.createAddEntry();
        AddressBookEntry content = factory.createAddressBookEntry();
       
        content.setFirstName("Ron");
        content.setLastName("Testerson");
        content.setPhone("512-459-2222");
       
        // Since this is a doc/lit wrapped WSDL, we need to set the
        // data inside of a request wrapper element.
        request.setEntry(content);
       
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addressbook.AddressBookEntry

        AddressBook ab = service.getPort(QNAME_PORT, AddressBook.class);
        BindingProvider p1 = (BindingProvider) ab;
        p1.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, URL_ENDPOINT);
       
        ObjectFactory factory = new ObjectFactory();
        AddressBookEntry content = factory.createAddressBookEntry();
        content.setFirstName("Foo");
        content.setLastName("Bar");
        content.setPhone("512-459-2222");
       
        boolean added = ab.addEntry(content);
       
        // Validate the results
        assertNotNull(added);
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addressbook.AddressBookEntry

        BindingProvider p1 = (BindingProvider) ab;
        p1.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, URL_ENDPOINT);
       
        String fname = "Joe";
        String lname = "Test";
        AddressBookEntry result = ab.findEntryByName(fname, lname);
       
        // Validate the results
        assertNotNull(result);
        assertNotNull(result.getFirstName());
        assertNotNull(result.getLastName());
        assertTrue(result.getFirstName().equals(fname));
        assertTrue(result.getLastName().equals(lname));
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addressbook.data.AddressBookEntry

                QNAME_PORT, jbc, Mode.PAYLOAD);
               
        // Create the JAX-B object that will hold the data
        ObjectFactory factory = new ObjectFactory();
        AddEntry request = factory.createAddEntry();
        AddressBookEntry content = factory.createAddressBookEntry();
       
        content.setFirstName("Ron");
        content.setLastName("Testerson");
        content.setPhone("512-459-2222");
       
        // Since this is a doc/lit wrapped WSDL, we need to set the
        // data inside of a request wrapper element.
        request.setEntry(content);
       
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addressbook.data.AddressBookEntry

        AddressBook ab = service.getPort(QNAME_PORT, AddressBook.class);
        BindingProvider p1 = (BindingProvider) ab;
        p1.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, URL_ENDPOINT);
       
        ObjectFactory factory = new ObjectFactory();
        AddressBookEntry content = factory.createAddressBookEntry();
        content.setFirstName("Foo");
        content.setLastName("Bar");
        content.setPhone("512-459-2222");
       
        boolean added = ab.addEntry(content);
       
        // Validate the results
        assertNotNull(added);
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addressbook.data.AddressBookEntry

        BindingProvider p1 = (BindingProvider) ab;
        p1.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, URL_ENDPOINT);
       
        String fname = "Joe";
        String lname = "Test";
        AddressBookEntry result = ab.findEntryByName(fname, lname);
       
        // Validate the results
        assertNotNull(result);
        assertNotNull(result.getFirstName());
        assertNotNull(result.getLastName());
        assertTrue(result.getFirstName().equals(fname));
        assertTrue(result.getLastName().equals(lname));
       
        // Try the invoke again to verify
        result = ab.findEntryByName(fname, lname);
       
        // Validate the results
        assertNotNull(result);
        assertNotNull(result.getFirstName());
        assertNotNull(result.getLastName());
        assertTrue(result.getFirstName().equals(fname));
        assertTrue(result.getLastName().equals(lname));
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addressbook.data.AddressBookEntry

    public AddressBookEntry findEntryByName(String firstname, String lastname) {
        TestLogger.logger.debug("New request received.");
        TestLogger.logger.debug("Looking for entry: [" + firstname + "] [" + lastname + "]");
        Iterator<AddressBookEntry> i = data.iterator();
        while (i.hasNext()) {
            AddressBookEntry entry = i.next();
           
            //If they have a firstname and it doesn't match, just go on
            //to the next entry.
            if (firstname != null) {
                if (!firstname.equals(entry.getFirstName()))
                    continue;                   
            }
           
            if (lastname != null) {
                if (lastname.equals(entry.getLastName()))
                    return entry;
            }
        }
       
        return null;
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.