use of org.apache.camel.dataformat.soap.name.TypeNameStrategy in project camel by apache.
the class TypeNameStrategyTest method testNoAnnotation.
@Test
public void testNoAnnotation() {
TypeNameStrategy strategy = new TypeNameStrategy();
try {
strategy.findQNameForSoapActionOrType("", String.class);
Assert.fail();
} catch (RuntimeException e) {
// Expected here
}
}
use of org.apache.camel.dataformat.soap.name.TypeNameStrategy in project camel by apache.
the class Soap12MarshalTest method createDataFormat.
/**
* Create data format by using the constructor
*/
protected SoapJaxbDataFormat createDataFormat() {
String jaxbPackage = GetCustomersByName.class.getPackage().getName();
ElementNameStrategy elStrat = new TypeNameStrategy();
SoapJaxbDataFormat answer = new SoapJaxbDataFormat(jaxbPackage, elStrat);
answer.setVersion("1.2");
return answer;
}
use of org.apache.camel.dataformat.soap.name.TypeNameStrategy in project camel by apache.
the class SoapMarshalTest method createDataFormat.
/**
* Create data format by using the constructor
*/
protected SoapJaxbDataFormat createDataFormat() {
String jaxbPackage = GetCustomersByName.class.getPackage().getName();
ElementNameStrategy elStrat = new TypeNameStrategy();
return new SoapJaxbDataFormat(jaxbPackage, elStrat);
}
use of org.apache.camel.dataformat.soap.name.TypeNameStrategy in project camel by apache.
the class SoapRoundtripTest method createRouteBuilder.
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
String jaxbPackage = GetCustomersByName.class.getPackage().getName();
@Override
public void configure() throws Exception {
ElementNameStrategy elNameStrat = new TypeNameStrategy();
from("direct:start").marshal().soapjaxb(jaxbPackage, elNameStrat).unmarshal().soapjaxb(jaxbPackage, elNameStrat).to("mock:result");
}
};
}
use of org.apache.camel.dataformat.soap.name.TypeNameStrategy in project camel by apache.
the class TypeNameStrategyTest method testTypeNameStrategy.
@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());
}
Aggregations