INT-4114: Add missed <poller> to XSDs

JIRA: https://jira.spring.io/browse/INT-4114
This commit is contained in:
Artem Bilan
2018-10-26 12:28:07 -04:00
committed by Gary Russell
parent fef0a4db03
commit 674d5adfc0
21 changed files with 216 additions and 90 deletions

View File

@@ -465,8 +465,9 @@ this list can also be simple patterns to be matched against the header names (e.
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="transformerType">
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:choice maxOccurs="2">
<xsd:element name="soap-action" type="headerType"/>
<xsd:element ref="integration:poller" minOccurs="0"/>
</xsd:choice>
<xsd:attribute name="default-overwrite">
<xsd:annotation>

View File

@@ -1,14 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/integration/ws"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/beans
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:int="http://www.springframework.org/schema/integration"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/ws
http://www.springframework.org/schema/integration/ws/spring-integration-ws.xsd">
<int:channel id="literalValueInput">
<int:queue/>
</int:channel>
<header-enricher input-channel="literalValueInput">
<soap-action value="http://test"/>
<int:poller fixed-delay="100"/>
</header-enricher>
<header-enricher input-channel="expressionInput">

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,15 +30,19 @@ import org.springframework.integration.ws.WebServiceHeaders;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.support.GenericMessage;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* @author Mark Fisher
* @author Artem Bilan
*
* @since 2.0
*/
@ContextConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
@DirtiesContext
public class WebServiceHeaderEnricherTests {
@Autowired
@@ -53,7 +57,7 @@ public class WebServiceHeaderEnricherTests {
public void literalValue() {
MessagingTemplate template = new MessagingTemplate();
template.setDefaultDestination(literalValueInput);
Message<?> result = template.sendAndReceive(new GenericMessage<String>("foo"));
Message<?> result = template.sendAndReceive(new GenericMessage<>("foo"));
Map<String, Object> headers = result.getHeaders();
assertEquals("http://test", headers.get(WebServiceHeaders.SOAP_ACTION));
}
@@ -62,7 +66,7 @@ public class WebServiceHeaderEnricherTests {
public void expression() {
MessagingTemplate template = new MessagingTemplate();
template.setDefaultDestination(expressionInput);
Message<?> result = template.sendAndReceive(new GenericMessage<String>("foo"));
Message<?> result = template.sendAndReceive(new GenericMessage<>("foo"));
Map<String, Object> headers = result.getHeaders();
assertEquals("http://foo", headers.get(WebServiceHeaders.SOAP_ACTION));
}