Package org.apache.camel.non_wrapper.types

Examples of org.apache.camel.non_wrapper.types.GetPerson


        BindingOperationInfo boi = (BindingOperationInfo)exchange.getProperty(BindingOperationInfo.class.toString());
        if (boi != null) {
            LOG.info("boi.isUnwrapped" + boi.isUnwrapped());
        }

        GetPerson person =  exchange.getIn().getBody(GetPerson.class);
        String personId = person.getPersonId();
        GetPersonResponse response = new GetPersonResponse();

        if (personId == null || personId.length() == 0) {
            LOG.info("person id 123, so throwing exception");
            // Try to throw out the soap fault message
View Full Code Here


        BindingOperationInfo boi = (BindingOperationInfo)exchange.getProperty(BindingOperationInfo.class.toString());
        if (boi != null) {
            LOG.info("boi.isUnwrapped" + boi.isUnwrapped());
        }

        GetPerson person =  exchange.getIn().getBody(GetPerson.class);
        String personId = person.getPersonId();
        GetPersonResponse response = new GetPersonResponse();

        if (personId == null || personId.length() == 0) {
            LOG.info("person id 123, so throwing exception");
            // Try to throw out the soap fault message
View Full Code Here

    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

    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());
        assertEquals("we should get the right answer from router", "Test", response.getSsn());
        assertEquals("we should get the right answer from router", "hello world!", response.getPersonId());
View Full Code Here

        BindingOperationInfo boi = (BindingOperationInfo)exchange.getProperty(BindingOperationInfo.class.toString());
        if (boi != null) {
            LOG.info("boi.isUnwrapped" + boi.isUnwrapped());
        }

        GetPerson person =  exchange.getIn().getBody(GetPerson.class);
        String personId = person.getPersonId();
        GetPersonResponse response = new GetPersonResponse();

        if (personId == null || personId.length() == 0) {
            LOG.info("person id 123, so throwing exception");
            // Try to throw out the soap fault message
View Full Code Here

    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

    @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());
        assertEquals("we should get the right answer from router", "Test", response.getSsn());
        assertEquals("we should get the right answer from router", "hello world!", response.getPersonId());
View Full Code Here

        BindingOperationInfo boi = (BindingOperationInfo)exchange.getProperty(BindingOperationInfo.class.toString());
        if (boi != null) {
            LOG.info("boi.isUnwrapped" + boi.isUnwrapped());
        }

        GetPerson person =  exchange.getIn().getBody(GetPerson.class);
        String personId = person.getPersonId();
        GetPersonResponse response = new GetPersonResponse();

        if (personId == null || personId.length() == 0) {
            LOG.info("person id 123, so throwing exception");
            // Try to throw out the soap fault message
View Full Code Here

        Person client = ss.getSoap();
        ((BindingProvider)client).getRequestContext()
            .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                 "http://localhost:" + port1 + "/CxfNonWrapperTest/PersonService/");
       
        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

        BindingOperationInfo boi = (BindingOperationInfo)exchange.getProperty(BindingOperationInfo.class.toString());
        if (boi != null) {
            LOG.info("boi.isUnwrapped" + boi.isUnwrapped());
        }

        GetPerson person =  exchange.getIn().getBody(GetPerson.class);
        String personId = person.getPersonId();
        GetPersonResponse response = new GetPersonResponse();

        if (personId == null || personId.length() == 0) {
            LOG.info("person id 123, so throwing exception");
            // Try to throw out the soap fault message
View Full Code Here

TOP

Related Classes of org.apache.camel.non_wrapper.types.GetPerson

Copyright © 2018 www.massapicom. 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.