/** * Return the line number in the XML resource that failed. * @return the line number if available (in case of a SAXParseException); -1 else * @see org.xml.sax.SAXParseException#getLineNumber() */ public int getLineNumber() { Throwable cause = getCause(); if (cause instanceof SAXParseException) { return ((SAXParseException) cause).getLineNumber(); } return -1; }
/** * Return the line number in the XML resource that failed. * @return the line number if available (in case of a SAXParseException); -1 else * @see org.xml.sax.SAXParseException#getLineNumber() */ public int getLineNumber() { Throwable cause = getCause(); if (cause instanceof SAXParseException) { return ((SAXParseException) cause).getLineNumber(); } return -1; }
/** * Return the line number in the XML resource that failed. * @return the line number if available (in case of a SAXParseException); -1 else * @see org.xml.sax.SAXParseException#getLineNumber() */ public int getLineNumber() { Throwable cause = getCause(); if (cause instanceof SAXParseException) { return ((SAXParseException) cause).getLineNumber(); } return -1; }
@Test public void chainHeaderValueRouter() throws Exception { try { this.bootStrap("header-value-router"); fail("Expected a XmlBeanDefinitionStoreException to be thrown."); } catch (XmlBeanDefinitionStoreException e) { assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" + " allowed to appear in element 'int:header-value-router'.", e.getCause().getMessage()); } }
@Test public void chainAggregator() throws Exception { try { this.bootStrap("aggregator"); fail("Expected a XmlBeanDefinitionStoreException to be thrown."); } catch (XmlBeanDefinitionStoreException e) { assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" + " allowed to appear in element 'int:aggregator'.", e.getCause().getMessage()); } }
@Test public void chainHeaderFilter() throws Exception { try { this.bootStrap("header-filter"); fail("Expected a XmlBeanDefinitionStoreException to be thrown."); } catch (XmlBeanDefinitionStoreException e) { assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" + " allowed to appear in element 'int:header-filter'.", e.getCause().getMessage()); } }
@Test public void chainTransformer() throws Exception { try { this.bootStrap("transformer"); fail("Expected a XmlBeanDefinitionStoreException to be thrown."); } catch (XmlBeanDefinitionStoreException e) { assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" + " allowed to appear in element 'int:transformer'.", e.getCause().getMessage()); } }
@Test public void chainServiceActivator() throws Exception { try { this.bootStrap("service-activator"); fail("Expected a XmlBeanDefinitionStoreException to be thrown."); } catch (XmlBeanDefinitionStoreException e) { assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" + " allowed to appear in element 'int:service-activator'.", e.getCause().getMessage()); } }
@Test public void chainDelayer() throws Exception { try { this.bootStrap("delayer"); fail("Expected a XmlBeanDefinitionStoreException to be thrown."); } catch (XmlBeanDefinitionStoreException e) { assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" + " allowed to appear in element 'int:delayer'.", e.getCause().getMessage()); } }
@Test public void chainHeaderEnricher() throws Exception { try { this.bootStrap("header-enricher"); fail("Expected a XmlBeanDefinitionStoreException to be thrown."); } catch (XmlBeanDefinitionStoreException e) { assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" + " allowed to appear in element 'int:header-enricher'.", e.getCause().getMessage()); } }
@Test public void chainOutboundGatewayWithInputChannel() throws Exception { try { bootStrap("file-outbound-gateway-input-channel"); fail("Expected a XmlBeanDefinitionStoreException to be thrown."); } catch (XmlBeanDefinitionStoreException e) { assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" + " allowed to appear in element 'int-file:outbound-gateway'.", e.getCause().getMessage()); } }
@Test public void chainGateway() throws Exception { try { this.bootStrap("gateway"); fail("Expected a XmlBeanDefinitionStoreException to be thrown."); } catch (XmlBeanDefinitionStoreException e) { assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" + " allowed to appear in element 'int:gateway'.", e.getCause().getMessage()); } }
@Test public void chainSplitter() throws Exception { try { this.bootStrap("splitter"); fail("Expected a XmlBeanDefinitionStoreException to be thrown."); } catch (XmlBeanDefinitionStoreException e) { assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" + " allowed to appear in element 'int:splitter'.", e.getCause().getMessage()); } }
@Test public void chainResequencer() throws Exception { try { this.bootStrap("resequencer"); fail("Expected a XmlBeanDefinitionStoreException to be thrown."); } catch (XmlBeanDefinitionStoreException e) { assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" + " allowed to appear in element 'int:resequencer'.", e.getCause().getMessage()); } }
@Test public void chainChain() throws Exception { try { this.bootStrap("chain"); fail("Expected a XmlBeanDefinitionStoreException to be thrown."); } catch (XmlBeanDefinitionStoreException e) { assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" + " allowed to appear in element 'int:chain'.", e.getCause().getMessage()); } }
@Test public void chainFilter() throws Exception { try { this.bootStrap("filter"); fail("Expected a XmlBeanDefinitionStoreException to be thrown."); } catch (XmlBeanDefinitionStoreException e) { assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" + " allowed to appear in element 'int:filter'.", e.getCause().getMessage()); } }
@Test public void chainRouter() throws Exception { try { this.bootStrap("router"); fail("Expected a XmlBeanDefinitionStoreException to be thrown."); } catch (XmlBeanDefinitionStoreException e) { assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" + " allowed to appear in element 'int:router'.", e.getCause().getMessage()); } }
/** * Return the line number in the XML resource that failed. * @return the line number if available (in case of a SAXParseException); -1 else * @see org.xml.sax.SAXParseException#getLineNumber() */ public int getLineNumber() { Throwable cause = getCause(); if (cause instanceof SAXParseException) { return ((SAXParseException) cause).getLineNumber(); } return -1; }