Search in sources :

Example 1 with Addressing10

use of org.springframework.ws.soap.addressing.version.Addressing10 in project camel by apache.

the class ConsumerWSAEndpointMappingRouteTest method testWSAddressingActionAndTo.

@Test
public void testWSAddressingActionAndTo() throws Exception {
    StreamSource source = new StreamSource(new StringReader(xmlBody));
    webServiceTemplate.sendSourceAndReceive(source, new ActionCallback(new URI("http://actionAndTo"), new Addressing10(), new URI("http://url4.to")), TestUtil.NOOP_SOURCE_EXTRACTOR);
    resultEndpointActionAndTo.expectedMinimumMessageCount(1);
    resultEndpointActionAndTo.assertIsSatisfied();
}
Also used : SoapActionCallback(org.springframework.ws.soap.client.core.SoapActionCallback) ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) StreamSource(javax.xml.transform.stream.StreamSource) StringReader(java.io.StringReader) Addressing10(org.springframework.ws.soap.addressing.version.Addressing10) URI(java.net.URI) Test(org.junit.Test)

Example 2 with Addressing10

use of org.springframework.ws.soap.addressing.version.Addressing10 in project camel by apache.

the class ConsumerWSAEndpointMappingRouteTest method testWSAddressingToResponseActions.

@Test
public void testWSAddressingToResponseActions() throws Exception {
    StreamSource source = new StreamSource(new StringReader(xmlBody));
    webServiceTemplate.sendSourceAndReceive(source, new ActionCallback(new URI("http://doesn-not-matter.com"), new Addressing10(), new URI("http://urlOutputAndFault2.to")), TestUtil.NOOP_SOURCE_EXTRACTOR);
    resultOutputAndFault2.expectedMinimumMessageCount(1);
    resultOutputAndFault2.assertIsSatisfied();
}
Also used : SoapActionCallback(org.springframework.ws.soap.client.core.SoapActionCallback) ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) StreamSource(javax.xml.transform.stream.StreamSource) StringReader(java.io.StringReader) Addressing10(org.springframework.ws.soap.addressing.version.Addressing10) URI(java.net.URI) Test(org.junit.Test)

Example 3 with Addressing10

use of org.springframework.ws.soap.addressing.version.Addressing10 in project camel by apache.

the class AbstractWSATests method toAndReplyTo.

/**
     * Creates WS-Addressing To and ReplyTo param for request
     * 
     * @param action
     * @param replyTo
     * @return
     * @throws URISyntaxException
     */
protected final ActionCallback toAndReplyTo(String to, String replyTo) throws URISyntaxException {
    requestInputAction = "http://doesn-not-matter.com";
    ActionCallback requestCallback = new ActionCallback(new URI(requestInputAction), new Addressing10(), new URI(to));
    if (replyTo != null) {
        requestCallback.setReplyTo(new EndpointReference(new URI(replyTo)));
    }
    return requestCallback;
}
Also used : ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) Addressing10(org.springframework.ws.soap.addressing.version.Addressing10) URI(java.net.URI) EndpointReference(org.springframework.ws.soap.addressing.core.EndpointReference)

Example 4 with Addressing10

use of org.springframework.ws.soap.addressing.version.Addressing10 in project camel by apache.

the class ConsumerWSAEndpointMappingRouteTest method testWSAddressingResolveToMoreSpecif.

@Test
public void testWSAddressingResolveToMoreSpecif() throws Exception {
    StreamSource source = new StreamSource(new StringReader(xmlBody));
    webServiceTemplate.sendSourceAndReceive(source, new ActionCallback(new URI("http://action1"), new Addressing10(), new URI("http://url1.to")), TestUtil.NOOP_SOURCE_EXTRACTOR);
    resultEndpointToMoreSpecific.expectedMinimumMessageCount(1);
    resultEndpointToMoreSpecific.assertIsSatisfied();
    resultEndpointActionMoreSpecific.expectedMinimumMessageCount(0);
    resultEndpointActionMoreSpecific.assertIsSatisfied();
}
Also used : SoapActionCallback(org.springframework.ws.soap.client.core.SoapActionCallback) ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) StreamSource(javax.xml.transform.stream.StreamSource) StringReader(java.io.StringReader) Addressing10(org.springframework.ws.soap.addressing.version.Addressing10) URI(java.net.URI) Test(org.junit.Test)

Example 5 with Addressing10

use of org.springframework.ws.soap.addressing.version.Addressing10 in project camel by apache.

the class ConsumerWSAEndpointMappingRouteTest method testWSAddressingResolveActionMoreSpecif.

@Test
public void testWSAddressingResolveActionMoreSpecif() throws Exception {
    StreamSource source = new StreamSource(new StringReader(xmlBody));
    webServiceTemplate.sendSourceAndReceive(source, new ActionCallback(new URI("http://action2"), new Addressing10(), new URI("http://url2.to")), TestUtil.NOOP_SOURCE_EXTRACTOR);
    resultEndpointToMoreSpecific.expectedMinimumMessageCount(0);
    resultEndpointToMoreSpecific.assertIsSatisfied();
    resultEndpointActionMoreSpecific.expectedMinimumMessageCount(1);
    resultEndpointActionMoreSpecific.assertIsSatisfied();
}
Also used : SoapActionCallback(org.springframework.ws.soap.client.core.SoapActionCallback) ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) StreamSource(javax.xml.transform.stream.StreamSource) StringReader(java.io.StringReader) Addressing10(org.springframework.ws.soap.addressing.version.Addressing10) URI(java.net.URI) Test(org.junit.Test)

Aggregations

URI (java.net.URI)8 ActionCallback (org.springframework.ws.soap.addressing.client.ActionCallback)8 Addressing10 (org.springframework.ws.soap.addressing.version.Addressing10)8 Test (org.junit.Test)7 SoapActionCallback (org.springframework.ws.soap.client.core.SoapActionCallback)7 StringReader (java.io.StringReader)6 StreamSource (javax.xml.transform.stream.StreamSource)6 StringWriter (java.io.StringWriter)1 StreamResult (javax.xml.transform.stream.StreamResult)1 EndpointReference (org.springframework.ws.soap.addressing.core.EndpointReference)1