Added support for 'order' and 'auto-startup' on WS 'outbound-gateway'.

This commit is contained in:
Mark Fisher
2009-07-03 04:29:22 +00:00
parent 387ab9965c
commit 467b752481
3 changed files with 24 additions and 0 deletions

View File

@@ -130,6 +130,8 @@
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="message-senders" type="xsd:string"/>
<xsd:attribute name="order" type="xsd:string"/>
<xsd:attribute name="auto-startup" type="xsd:string"/>
</xsd:complexType>
</xsd:element>

View File

@@ -207,6 +207,23 @@ public class WebServiceOutboundGatewayParserTests {
5000, ((Long)accessor.getPropertyValue("interval")).longValue());
}
@Test
public void simpleGatewayWithOrder() {
ApplicationContext context = new ClassPathXmlApplicationContext(
"simpleWebServiceOutboundGatewayParserTests.xml", this.getClass());
AbstractEndpoint endpoint = (AbstractEndpoint) context.getBean("gatewayWithOrderAndAutoStartupFalse");
Object gateway = new DirectFieldAccessor(endpoint).getPropertyValue("handler");
assertEquals(99, new DirectFieldAccessor(gateway).getPropertyValue("order"));
}
@Test
public void simpleGatewayWithStartupFalse() {
ApplicationContext context = new ClassPathXmlApplicationContext(
"simpleWebServiceOutboundGatewayParserTests.xml", this.getClass());
AbstractEndpoint endpoint = (AbstractEndpoint) context.getBean("gatewayWithOrderAndAutoStartupFalse");
assertEquals(Boolean.FALSE, new DirectFieldAccessor(endpoint).getPropertyValue("autoStartup"));
}
@Test
public void marshallingGatewayWithAllInOneMarshaller() {
ApplicationContext context = new ClassPathXmlApplicationContext(

View File

@@ -82,6 +82,11 @@
</si:poller>
</ws:outbound-gateway>
<ws:outbound-gateway id="gatewayWithOrderAndAutoStartupFalse"
request-channel="inputChannel"
uri="http://example.org"
order="99"
auto-startup="false"/>
<ws:outbound-gateway id="gatewayWithUriHeader"
request-channel="inputChannel"