Search in sources :

Example 1 with MessageAddressingProperties

use of org.springframework.ws.soap.addressing.core.MessageAddressingProperties in project camel by apache.

the class ProducerParamsBasicTest method testNoAction.

@Test
public void testNoAction() throws Exception {
    template.requestBody("direct:noAction", xmlBody);
    assertNotNull(sender.getMessageContext());
    // WSA is not supported, if there is no ws action
    Assertions.assertThat(sender.getMessageContext()).isNotNull();
    MessageAddressingProperties wsaProperties = TestUtil.getWSAProperties((SoapMessage) sender.getMessageContext().getRequest());
    Assertions.assertThat(wsaProperties).isNull();
}
Also used : MessageAddressingProperties(org.springframework.ws.soap.addressing.core.MessageAddressingProperties) Test(org.junit.Test)

Example 2 with MessageAddressingProperties

use of org.springframework.ws.soap.addressing.core.MessageAddressingProperties in project camel by apache.

the class ProducerParamsBasicTest method testFaultTo.

@Test
public void testFaultTo() throws Exception {
    template.requestBody("direct:faultTo", 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"));
}
Also used : MessageAddressingProperties(org.springframework.ws.soap.addressing.core.MessageAddressingProperties) URI(java.net.URI) Test(org.junit.Test)

Example 3 with MessageAddressingProperties

use of org.springframework.ws.soap.addressing.core.MessageAddressingProperties in project camel by apache.

the class ProducerParamsBasicTest method testReplyTo.

@Test
public void testReplyTo() throws Exception {
    template.requestBody("direct:replyTo", 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("mailto://replyTo@chocolatejar.eu"));
    Assertions.assertThat(wsaProperties.getFaultTo().getAddress()).isEqualTo(new URI("http://fault.to"));
}
Also used : MessageAddressingProperties(org.springframework.ws.soap.addressing.core.MessageAddressingProperties) URI(java.net.URI) Test(org.junit.Test)

Example 4 with MessageAddressingProperties

use of org.springframework.ws.soap.addressing.core.MessageAddressingProperties in project camel by apache.

the class ProducerParamsBasicTest method testDefaultReplyTo.

@Test
public void testDefaultReplyTo() throws Exception {
    template.requestBody("direct:defaultOk", 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);
}
Also used : MessageAddressingProperties(org.springframework.ws.soap.addressing.core.MessageAddressingProperties) Test(org.junit.Test)

Example 5 with MessageAddressingProperties

use of org.springframework.ws.soap.addressing.core.MessageAddressingProperties in project camel by apache.

the class ProducerParamsPrecedenceTest method testFaultTo.

@Test
public void testFaultTo() throws Exception {
    template.requestBody("direct:faultTo", 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.getFaultTo().getAddress()).isEqualTo(new URI("http://fault.to"));
    Assertions.assertThat(wsaProperties.getReplyTo().getAddress()).isEqualTo(anonymousUri);
}
Also used : MessageAddressingProperties(org.springframework.ws.soap.addressing.core.MessageAddressingProperties) URI(java.net.URI) Test(org.junit.Test)

Aggregations

MessageAddressingProperties (org.springframework.ws.soap.addressing.core.MessageAddressingProperties)17 Test (org.junit.Test)14 URI (java.net.URI)9 SoapMessage (org.springframework.ws.soap.SoapMessage)3 Ignore (org.junit.Ignore)2