Examples of PersonService


Examples of org.apache.camel.non_wrapper.PersonService

@ContextConfiguration(locations = { "/org/apache/camel/component/cxf/context-camel-1145.xml" })
public class TestCamel1145Route extends AbstractJUnit38SpringContextTests {

    public void testCamel1145Route() throws Exception {
        URL wsdlURL = new URL("http://localhost:9000/PersonService/?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", "Bill", response.getName());
View Full Code Here

Examples of org.apache.camel.non_wrapper.PersonService

    @Test
    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());
View Full Code Here

Examples of org.apache.camel.non_wrapper.PersonService

public class TestCamel1145Route extends AbstractJUnit4SpringContextTests {
  
    @Test
    public void testCamel1145Route() throws Exception {
        URL wsdlURL = new URL("http://localhost:9000/PersonService/?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", "Bill", response.getName());
View Full Code Here

Examples of org.apache.camel.non_wrapper.PersonService

    @Test
    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();
        ((BindingProvider)client).getRequestContext()
            .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                 "http://localhost:" + port1 + "/CxfNonWrapperTest/PersonService/");
       
        GetPerson request = new GetPerson();
View Full Code Here

Examples of org.apache.camel.wsdl_first.PersonService

    }

    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);
View Full Code Here

Examples of org.apache.camel.wsdl_first.PersonService

       
        JaxwsTestHandler toHandler = getMandatoryBean(JaxwsTestHandler.class, "toEndpointJaxwsHandler");
        toHandler.reset();

        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);
View Full Code Here

Examples of org.apache.camel.wsdl_first.PersonService

    }
   
    @Test
    public void testJaxWsBeanFromCxfRoute() 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();
        ((BindingProvider)client).getRequestContext()
            .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                 "http://localhost:" + CXFTestSupport.getPort1() + "/CxfBeanTest/PersonService/");
       
        Holder<String> personId = new Holder<String>();
View Full Code Here

Examples of org.apache.camel.wsdl_first.PersonService

    }

    @Test
    public void testRoutes() 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("Bonjour", name.value);

        Person client2 = ss.getSoap2();
        Holder<String> personId2 = new Holder<String>();
        personId2.value = "hello";
        Holder<String> ssn2 = new Holder<String>();
        Holder<String> name2 = new Holder<String>();
        client2.getPerson(personId2, ssn2, name2);
View Full Code Here

Examples of org.apache.camel.wsdl_first.PersonService

    }
   
    @Test
    public void testSoapFaultRoutes() {
        URL wsdlURL = getClass().getClassLoader().getResource("person.wsdl");
        PersonService ss = new PersonService(wsdlURL, new QName("http://camel.apache.org/wsdl-first",
                                                                "PersonService"));
        // test message mode
        Person client = ss.getSoap();
        Holder<String> personId = new Holder<String>();
        personId.value = "";
        Holder<String> ssn = new Holder<String>();
        Holder<String> name = new Holder<String>();
        Throwable t = null;
        try {
            client.getPerson(personId, ssn, name);
            fail("Expect exception");
        } catch (UnknownPersonFault e) {
            t = e;
        }
        assertTrue(t instanceof UnknownPersonFault);

        // test PAYLOAD mode
        Person client2 = ss.getSoap2();
        Holder<String> personId2 = new Holder<String>();
        personId2.value = "";
        Holder<String> ssn2 = new Holder<String>();
        Holder<String> name2 = new Holder<String>();
        try {
View Full Code Here

Examples of org.apache.camel.wsdl_first.PersonService

    }
   
    @Test
    public void testJaxWsBeanFromCxfRoute() 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);
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.