Search in sources :

Example 11 with MessageAddressingProperties

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

the class ProducerParamsPrecedenceTest method testWsAddressingActionPrecendence.

// TODO AZ
@Test
@Ignore
public void testWsAddressingActionPrecendence() throws Exception {
    Object result = template.requestBody("direct:precedenceWsAddressingAction", xmlBody);
    assertNotNull(result);
    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()).isNull();
    Assertions.assertThat(wsaProperties.getFaultTo()).isNull();
}
Also used : MessageAddressingProperties(org.springframework.ws.soap.addressing.core.MessageAddressingProperties) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 12 with MessageAddressingProperties

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

the class ProducerParamsPrecedenceTest method testWsAddressingAction.

// TODO AZ
@Test
@Ignore
public void testWsAddressingAction() throws Exception {
    Object result = template.requestBody("direct:wsAddressingAction", xmlBody);
    assertNotNull(result);
    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()).isNull();
    Assertions.assertThat(wsaProperties.getFaultTo()).isNull();
}
Also used : MessageAddressingProperties(org.springframework.ws.soap.addressing.core.MessageAddressingProperties) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 13 with MessageAddressingProperties

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

the class ProducerParamsPrecedenceTest 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("http://reply.to"));
    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 14 with MessageAddressingProperties

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

the class ProducerParamsPrecedenceTest method testFaultToPrecedence.

@Test
public void testFaultToPrecedence() throws Exception {
    template.requestBody("direct:precedenceFaultTo", 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://faultPrecedence.to"));
    // /we set in sample data all precendence fields for simplier tests
    // otherwise it woudl be here annonymous
    Assertions.assertThat(wsaProperties.getReplyTo().getAddress()).isEqualTo(new URI("http://replyPrecedence.to"));
}
Also used : MessageAddressingProperties(org.springframework.ws.soap.addressing.core.MessageAddressingProperties) URI(java.net.URI) Test(org.junit.Test)

Example 15 with MessageAddressingProperties

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

the class AbstractWSATests method newChannelParams.

/**
     * Only response is allow using a brand new channel
     * 
     * @return
     */
protected final MessageAddressingProperties newChannelParams() {
    assertNotNull(newReply);
    assertNotNull(newReply.getMessageContext());
    SoapMessage request = (SoapMessage) newReply.getMessageContext().getRequest();
    assertNotNull(request);
    MessageAddressingProperties wsaProperties = TestUtil.getWSAProperties(request);
    assertNotNull(wsaProperties);
    assertNotNull(wsaProperties.getTo());
    return wsaProperties;
}
Also used : MessageAddressingProperties(org.springframework.ws.soap.addressing.core.MessageAddressingProperties) SoapMessage(org.springframework.ws.soap.SoapMessage)

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