use of org.springframework.ws.soap.addressing.core.MessageAddressingProperties in project camel by apache.
the class ProducerParamsPrecedenceTest method testReplyToPrecedence.
@Test
public void testReplyToPrecedence() throws Exception {
template.requestBody("direct:precedenceReplyTo", xmlBody);
assertNotNull(sender.getMessageContext());
// check default actions
Assertions.assertThat(sender.getMessageContext()).isNotNull();
MessageAddressingProperties wsaProperties = TestUtil.getWSAProperties((SoapMessage) sender.getMessageContext().getRequest());
Assertions.assertThat(wsaProperties).isNotNull();
Assertions.assertThat(wsaProperties.getReplyTo().getAddress()).isEqualTo(new URI("http://replyPrecedence.to"));
Assertions.assertThat(wsaProperties.getFaultTo().getAddress()).isEqualTo(new URI("http://faultPrecedence.to"));
}
use of org.springframework.ws.soap.addressing.core.MessageAddressingProperties in project camel by apache.
the class ProducerParamsBasicTest method testReplyDoesntFollowFault.
@Test
public void testReplyDoesntFollowFault() throws Exception {
template.requestBody("direct:omittedReplyTo", xmlBody);
assertNotNull(sender.getMessageContext());
// check default actions
Assertions.assertThat(sender.getMessageContext()).isNotNull();
MessageAddressingProperties wsaProperties = TestUtil.getWSAProperties((SoapMessage) sender.getMessageContext().getRequest());
Assertions.assertThat(wsaProperties).isNotNull();
Assertions.assertThat(wsaProperties.getReplyTo().getAddress()).isEqualTo(anonymousUri);
Assertions.assertThat(wsaProperties.getFaultTo().getAddress()).isEqualTo(new URI("http://fault.to"));
}
use of org.springframework.ws.soap.addressing.core.MessageAddressingProperties in project camel by apache.
the class ProducerParamsBasicTest method testEmptyReplyAndFaultAndActionMustBePresent.
@Test
public void testEmptyReplyAndFaultAndActionMustBePresent() throws Exception {
template.requestBody("direct:empty", xmlBody);
assertNotNull(sender.getMessageContext());
// check default actions
Assertions.assertThat(sender.getMessageContext()).isNotNull();
MessageAddressingProperties wsaProperties = TestUtil.getWSAProperties((SoapMessage) sender.getMessageContext().getRequest());
Assertions.assertThat(wsaProperties).isNotNull();
Assertions.assertThat(wsaProperties.getAction()).isEqualTo(new URI("http://turnOnWSA.com"));
Assertions.assertThat(wsaProperties.getReplyTo().getAddress()).isEqualTo(anonymousUri);
Assertions.assertThat(wsaProperties.getFaultTo().getAddress()).isEqualTo(anonymousUri);
}
use of org.springframework.ws.soap.addressing.core.MessageAddressingProperties in project camel by apache.
the class ProducerParamsBasicTest method testDefaulFaultTo.
@Test
public void testDefaulFaultTo() throws Exception {
template.requestBody("direct:defaultFault", xmlBody);
assertNotNull(sender.getMessageContext());
// check default actions
Assertions.assertThat(sender.getMessageContext()).isNotNull();
MessageAddressingProperties wsaProperties = TestUtil.getWSAProperties((SoapMessage) sender.getMessageContext().getRequest());
Assertions.assertThat(wsaProperties).isNotNull();
Assertions.assertThat(wsaProperties.getReplyTo().getAddress()).isEqualTo(anonymousUri);
Assertions.assertThat(wsaProperties.getFaultTo().getAddress()).isEqualTo(anonymousUri);
}
use of org.springframework.ws.soap.addressing.core.MessageAddressingProperties in project camel by apache.
the class ProducerParamsBasicTest method testFaultFollowsReply.
@Test
public void testFaultFollowsReply() throws Exception {
template.requestBody("direct:omittedFaultTo", xmlBody);
assertNotNull(sender.getMessageContext());
// check default actions
Assertions.assertThat(sender.getMessageContext()).isNotNull();
MessageAddressingProperties wsaProperties = TestUtil.getWSAProperties((SoapMessage) sender.getMessageContext().getRequest());
Assertions.assertThat(wsaProperties).isNotNull();
Assertions.assertThat(wsaProperties.getReplyTo().getAddress()).isEqualTo(new URI("http://reply.to"));
Assertions.assertThat(wsaProperties.getFaultTo().getAddress()).isEqualTo(new URI("http://reply.to"));
}
Aggregations