Examples of Person


Examples of org.apache.axis2.json.adb.xsd.Person

        }
        return books;
    }

    private Person getPerson(String name) {
        Person person = new Person();
        person.setName(name);
        person.setAge(24);
        person.setAddress(getAddress());
        person.setPhone(12345);
        return person;
    }
View Full Code Here

Examples of org.apache.bval.jsr303.extensions.ExampleMethodService.Person

        MethodValidator mv = getValidator().unwrap(MethodValidator.class);
       
        Method personOp1 = service.getClass().getMethod("personOp1", new Class[]{Person.class});
       
        // Validate with invalid person
        Person p = new ExampleMethodService.Person();
        Set<?> results = mv.validateParameters(service.getClass(), personOp1, new Object[]{p});
        assertEquals("Expected 1 violation", 1, results.size());
       
        // validate with valid person
        p.name = "valid name";
View Full Code Here

Examples of org.apache.camel.builder.sql.Person

    }

    @SuppressWarnings({"rawtypes"})
    private List createBody() {
        List<Person> list = new ArrayList<Person>();
        list.add(new Person("James", "London"));
        list.add(new Person("Guillaume", "Normandy"));
        list.add(new Person("Hiram", "Tampa"));
        list.add(new Person("Rob", "London"));
        return list;
    }
View Full Code Here

Examples of org.apache.camel.component.linkedin.api.model.Person

        // parameter type is String
        headers.put("CamelLinkedIn.fields", "");
        // parameter type is Boolean
        headers.put("CamelLinkedIn.secure_urls", true);

        final Person result = requestBodyAndHeaders("direct://GETPERSON", null, headers);

        assertNotNull("getPerson result", result);
        LOG.debug("getPerson: " + result);
    }
View Full Code Here

Examples of org.apache.camel.converter.jaxb.person.Person

    public void testMarshallSuccess() throws Exception {
        mockMarshall.expectedMessageCount(1);

        Address address = new Address();
        address.setAddressLine1("Hauptstr. 1; 01129 Entenhausen");
        Person person = new Person();
        person.setFirstName("Christian");
        person.setLastName("Mueller");
        person.setAge(Integer.valueOf(36));
        person.setAddress(address);

        template.sendBody("direct:marshall", person);

        assertMockEndpointsSatisfied();
View Full Code Here

Examples of org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person

        template.sendBody(outURI, marshalled);

        mock.assertIsSatisfied();

        Person output = mock.getReceivedExchanges().get(0).getIn().getBody(Person.class);
        assertEquals("Martin", output.getName());
    }
View Full Code Here

Examples of org.apache.camel.itest.osgi.protobuf.generated.AddressBookProtos.Person

        template.sendBody(outURI, marshalled);

        mock.assertIsSatisfied();

        Person output = mock.getReceivedExchanges().get(0).getIn().getBody(Person.class);
        assertEquals("Martin", output.getName());
    }
View Full Code Here

Examples of org.apache.camel.non_wrapper.Person

    public void testInvokingServiceFromCXFClient() throws Exception {

        URL wsdlURL = getClass().getClassLoader().getResource("person-non-wrapper.wsdl");
        PersonService ss = new PersonService(wsdlURL, new QName("http://camel.apache.org/non-wrapper", "PersonService"));
        Person client = ss.getSoap();
        GetPerson request = new GetPerson();
        request.setPersonId("hello");
        GetPersonResponse response = client.getPerson(request);

        assertEquals("we should get the right answer from router", "Bonjour", response.getName());

        request.setPersonId("");
        try {
            client.getPerson(request);
            fail("We expect to get the UnknowPersonFault here");
        } catch (UnknownPersonFault fault) {
            // We expect to get fault here
        }
    }
View Full Code Here

Examples of org.apache.camel.wsdl_first.Person

    public void testInvokingServiceFromCXFClient() throws Exception {

        URL wsdlURL = getClass().getClassLoader().getResource("person.wsdl");
        PersonService ss = new PersonService(wsdlURL, new QName("http://camel.apache.org/wsdl-first", "PersonService"));
        Person client = ss.getSoap();
        Holder<String> personId = new Holder<String>();
        personId.value = "hello";
        Holder<String> ssn = new Holder<String>();
        Holder<String> name = new Holder<String>();
        client.getPerson(personId, ssn, name);
        assertEquals("we should get the right answer from router", "Bonjour", name.value);

        personId.value = "";
        try {
            client.getPerson(personId, ssn, name);
            fail("We expect to get the UnknowPersonFault here");
        } catch (UnknownPersonFault fault) {
            // We expect to get fault here
        }
       
        personId.value = "Invoking getPerson with invalid length string, expecting exception...xxxxxxxxx";
        try {           
            client.getPerson(personId, ssn, name);
            fail("We expect to get the WebSerivceException here");       
        } catch (WebServiceException ex) {
            // Caught expected WebServiceException here
            assertTrue("Should get the xml vaildate error!", ex.getMessage().indexOf("MyStringType") > 0);        
        }
View Full Code Here

Examples of org.apache.commons.lang.builder.ToStringStyleTest.Person

        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", (Object) new String[0], false).toString());
        assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", (Object) new String[0], true).toString());
    }

    public void testPerson() {
        Person p = new Person();
        p.name = "John Doe";
        p.age = 33;
        p.smoker = false;
        String pBaseStr = p.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(p));
        assertEquals(pBaseStr + "[name=John Doe,age=33,smoker=false]", new ToStringBuilder(p).append("name", p.name).append("age", p.age).append("smoker", p.smoker).toString());
    }
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.