Examples of findQNameForSoapActionOrType()


Examples of org.apache.camel.dataformat.soap.name.ServiceInterfaceStrategy.findQNameForSoapActionOrType()

        ServiceInterfaceStrategy strategy = new ServiceInterfaceStrategy(CustomerService.class, true);
        QName elName = strategy.findQNameForSoapActionOrType("", GetCustomersByName.class);
        assertEquals("http://customerservice.example.com/", elName.getNamespaceURI());
        assertEquals("getCustomersByName", elName.getLocalPart());

        QName elName2 = strategy.findQNameForSoapActionOrType("getCustomersByName", GetCustomersByName.class);
        assertEquals("http://customerservice.example.com/", elName2.getNamespaceURI());
        assertEquals("getCustomersByName", elName2.getLocalPart());

        // Tests the case where the soap action is found but the in type is null
        QName elName3 = strategy.findQNameForSoapActionOrType("http://customerservice.example.com/getAllCustomers",
View Full Code Here

Examples of org.apache.camel.dataformat.soap.name.ServiceInterfaceStrategy.findQNameForSoapActionOrType()

        QName elName2 = strategy.findQNameForSoapActionOrType("getCustomersByName", GetCustomersByName.class);
        assertEquals("http://customerservice.example.com/", elName2.getNamespaceURI());
        assertEquals("getCustomersByName", elName2.getLocalPart());

        // Tests the case where the soap action is found but the in type is null
        QName elName3 = strategy.findQNameForSoapActionOrType("http://customerservice.example.com/getAllCustomers",
                null);
        assertNull(elName3);

        try {
            elName = strategy.findQNameForSoapActionOrType("test", Class.class);
View Full Code Here

Examples of org.apache.camel.dataformat.soap.name.ServiceInterfaceStrategy.findQNameForSoapActionOrType()

        QName elName3 = strategy.findQNameForSoapActionOrType("http://customerservice.example.com/getAllCustomers",
                null);
        assertNull(elName3);

        try {
            elName = strategy.findQNameForSoapActionOrType("test", Class.class);
            fail();
        } catch (RuntimeCamelException e) {
            LOG.debug("Caught expected message: " + e.getMessage());
        }
    }
View Full Code Here

Examples of org.apache.camel.dataformat.soap.name.TypeNameStrategy.findQNameForSoapActionOrType()

public class TypeNameStrategyTest {

    @Test
    public void testTypeNameStrategy() {
        TypeNameStrategy strategy = new TypeNameStrategy();
        QName name = strategy.findQNameForSoapActionOrType("", GetCustomersByName.class);
        Assert.assertEquals("http://customerservice.example.com/", name.getNamespaceURI());
        Assert.assertEquals("getCustomersByName", name.getLocalPart());
    }

    @Test
View Full Code Here

Examples of org.apache.camel.dataformat.soap.name.TypeNameStrategy.findQNameForSoapActionOrType()

    @Test
    public void testNoAnnotation() {
        TypeNameStrategy strategy = new TypeNameStrategy();
        try {
            strategy.findQNameForSoapActionOrType("", String.class);
            Assert.fail();
        } catch (RuntimeException e) {
            // Expected here
        }
    }
View Full Code Here

Examples of org.apache.camel.dataformat.soap.name.TypeNameStrategy.findQNameForSoapActionOrType()

    }

    @Test
    public void testNoPackageInfo() {
        TypeNameStrategy strategy = new TypeNameStrategy();
        QName name = strategy.findQNameForSoapActionOrType("", AnnotatedClassWithoutNamespace.class);
        Assert.assertEquals("test", name.getLocalPart());
        Assert.assertEquals("##default", name.getNamespaceURI());

        QName name2 = strategy.findQNameForSoapActionOrType("", AnnotatedClassWithNamespace.class);
        Assert.assertEquals("test", name2.getLocalPart());
View Full Code Here

Examples of org.apache.camel.dataformat.soap.name.TypeNameStrategy.findQNameForSoapActionOrType()

        TypeNameStrategy strategy = new TypeNameStrategy();
        QName name = strategy.findQNameForSoapActionOrType("", AnnotatedClassWithoutNamespace.class);
        Assert.assertEquals("test", name.getLocalPart());
        Assert.assertEquals("##default", name.getNamespaceURI());

        QName name2 = strategy.findQNameForSoapActionOrType("", AnnotatedClassWithNamespace.class);
        Assert.assertEquals("test", name2.getLocalPart());
        Assert.assertEquals("http://mynamespace", name2.getNamespaceURI());
    }
}
View Full Code Here

Examples of org.apache.camel.dataformat.soap.name.TypeNameStrategy.findQNameForSoapActionOrType()

public class TypeNameStrategyTest {

    @Test
    public void testTypeNameStrategy() {
        TypeNameStrategy strategy = new TypeNameStrategy();
        QName name = strategy.findQNameForSoapActionOrType("", GetCustomersByName.class);
        Assert.assertEquals("http://customerservice.example.com/", name.getNamespaceURI());
        Assert.assertEquals("getCustomersByName", name.getLocalPart());
    }

    @Test
View Full Code Here

Examples of org.apache.camel.dataformat.soap.name.TypeNameStrategy.findQNameForSoapActionOrType()

    @Test
    public void testNoAnnotation() {
        TypeNameStrategy strategy = new TypeNameStrategy();
        try {
            strategy.findQNameForSoapActionOrType("", String.class);
            Assert.fail();
        } catch (RuntimeException e) {
            // Expected here
        }
    }
View Full Code Here

Examples of org.apache.camel.dataformat.soap.name.TypeNameStrategy.findQNameForSoapActionOrType()

    }

    @Test
    public void testNoPackageInfo() {
        TypeNameStrategy strategy = new TypeNameStrategy();
        QName name = strategy.findQNameForSoapActionOrType("", AnnotatedClassWithoutNamespace.class);
        Assert.assertEquals("test", name.getLocalPart());
        Assert.assertEquals("##default", name.getNamespaceURI());

        QName name2 = strategy.findQNameForSoapActionOrType("", AnnotatedClassWithNamespace.class);
        Assert.assertEquals("test", name2.getLocalPart());
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.