Announcement Announcement Module
Collapse
No announcement yet.
How do I get the XML for this namespace configuration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I get the XML for this namespace configuration

    Is there a way for me to get the XML that is created from the following namespace configuration? I need to subclass some of the classes and want to see the generated XML first. Thanks in advance.

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans:beans xmlns="http://www.springframework.org/schema/integration"
    	xmlns:si-xml="http://www.springframework.org/schema/integration/xml"
    	xmlns:file="http://www.springframework.org/schema/integration/file"	
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:beans="http://www.springframework.org/schema/beans"
    	xmlns:context="http://www.springframework.org/schema/context"
    	xmlns:jms="http://www.springframework.org/schema/integration/jms"
    	xmlns:stream="http://www.springframework.org/schema/integration/stream"
    	xmlns:int-sftp="http://www.springframework.org/schema/integration/sftp"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans
    			http://www.springframework.org/schema/beans/spring-beans.xsd
    			http://www.springframework.org/schema/context
    			http://www.springframework.org/schema/context/spring-context.xsd
    			http://www.springframework.org/schema/integration
    			http://www.springframework.org/schema/integration/spring-integration.xsd
    			http://www.springframework.org/schema/integration/xml
    			http://www.springframework.org/schema/integration/xml/spring-integration-xml-2.0.xsd	
    			http://www.springframework.org/schema/integration/file
    			http://www.springframework.org/schema/integration/file/spring-integration-file.xsd					
    			http://www.springframework.org/schema/integration/jms
    			http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
    			http://www.springframework.org/schema/integration/stream
    			http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd
    			http://www.springframework.org/schema/integration/stream
    			http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd
    			http://www.springframework.org/schema/integration/sftp 
    			http://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd">
    
    	<context:property-placeholder />
    	<!-- scan for spring integration components in package com.orangeleap.integration.export -->
    	<context:component-scan base-package="com.orangeleap.integration.export" />
    
    	<beans:bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
    
    	<beans:bean id="sftpSessionFactory" class="org.springframework.integration.sftp.session.DefaultSftpSessionFactory">
    		<beans:property name="host" value="${sftpHost}"/>
    		<beans:property name="port" value="22"/>
    		<beans:property name="user" value="${sftpUserName}"/>
    		<beans:property name="password" value="${sftpPassword}"/>
    	</beans:bean>	
    
    	<int-sftp:inbound-channel-adapter id="sftpAdapterAutoCreate"
    					  session-factory="sftpSessionFactory"
    					  channel="transformIn"
    					  filename-pattern="*.csv"
    					  remote-directory="${inputDir}"
    					  local-directory="file:target/foo"
    					  auto-create-local-directory="true"
    					  delete-remote-files="false">
    	  <poller fixed-rate="1000"/>
    	</int-sftp:inbound-channel-adapter>
    
    	<!-- Transformer to transform csv to constituent -->
    <transformer id="csvToConstituentTransformer" ref="csvToConstituentTransformerBean" input-channel="transformIn" method="transform" output-channel="nullChannel"/>
    
    	<beans:bean id="csvToConstituentTransformerBean"
    		class="com.orangeleap.integration.olimport.ConstituentToCsvTransformer">
    		<beans:property name="wsdlUrl" value="${wsdlUrl}" />
    		<beans:property name="olusername" value="${olusername}" />
    		<beans:property name="olpassword" value="${olpassword}" />
    		<beans:property name="outputDir" value="${outputDir}/${siteName}/segmentation/groupcontact"/>
    		<beans:property name="siteName" value="${siteName}" />
    	</beans:bean>
    
    	<channel id="receiveChannel"/>
    	<channel id="transformIn"/>
    
    	<stream:stderr-channel-adapter channel="errorChannel" append-newline="true" />
    
    </beans:beans>

  • #2
    Let me see if I can ask this question a different way? Does anyone have (or know of) an example of creating a FTP Inbound Channel Adapter as a simple spring bean definition (not using the sftp namespace)? I need to inherit from a SftpInboundFileSyncronizer and want to get the xml configuration to do so....

    Any help would be greatly appreciated...

    Thanks in advance,

    -LeoD

    Originally posted by ldangelo View Post
    Is there a way for me to get the XML that is created from the following namespace configuration? I need to subclass some of the classes and want to see the generated XML first. Thanks in advance.

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans:beans xmlns="http://www.springframework.org/schema/integration"
    	xmlns:si-xml="http://www.springframework.org/schema/integration/xml"
    	xmlns:file="http://www.springframework.org/schema/integration/file"	
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:beans="http://www.springframework.org/schema/beans"
    	xmlns:context="http://www.springframework.org/schema/context"
    	xmlns:jms="http://www.springframework.org/schema/integration/jms"
    	xmlns:stream="http://www.springframework.org/schema/integration/stream"
    	xmlns:int-sftp="http://www.springframework.org/schema/integration/sftp"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans
    			http://www.springframework.org/schema/beans/spring-beans.xsd
    			http://www.springframework.org/schema/context
    			http://www.springframework.org/schema/context/spring-context.xsd
    			http://www.springframework.org/schema/integration
    			http://www.springframework.org/schema/integration/spring-integration.xsd
    			http://www.springframework.org/schema/integration/xml
    			http://www.springframework.org/schema/integration/xml/spring-integration-xml-2.0.xsd	
    			http://www.springframework.org/schema/integration/file
    			http://www.springframework.org/schema/integration/file/spring-integration-file.xsd					
    			http://www.springframework.org/schema/integration/jms
    			http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
    			http://www.springframework.org/schema/integration/stream
    			http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd
    			http://www.springframework.org/schema/integration/stream
    			http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd
    			http://www.springframework.org/schema/integration/sftp 
    			http://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd">
    
    	<context:property-placeholder />
    	<!-- scan for spring integration components in package com.orangeleap.integration.export -->
    	<context:component-scan base-package="com.orangeleap.integration.export" />
    
    	<beans:bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
    
    	<beans:bean id="sftpSessionFactory" class="org.springframework.integration.sftp.session.DefaultSftpSessionFactory">
    		<beans:property name="host" value="${sftpHost}"/>
    		<beans:property name="port" value="22"/>
    		<beans:property name="user" value="${sftpUserName}"/>
    		<beans:property name="password" value="${sftpPassword}"/>
    	</beans:bean>	
    
    	<int-sftp:inbound-channel-adapter id="sftpAdapterAutoCreate"
    					  session-factory="sftpSessionFactory"
    					  channel="transformIn"
    					  filename-pattern="*.csv"
    					  remote-directory="${inputDir}"
    					  local-directory="file:target/foo"
    					  auto-create-local-directory="true"
    					  delete-remote-files="false">
    	  <poller fixed-rate="1000"/>
    	</int-sftp:inbound-channel-adapter>
    
    	<!-- Transformer to transform csv to constituent -->
    <transformer id="csvToConstituentTransformer" ref="csvToConstituentTransformerBean" input-channel="transformIn" method="transform" output-channel="nullChannel"/>
    
    	<beans:bean id="csvToConstituentTransformerBean"
    		class="com.orangeleap.integration.olimport.ConstituentToCsvTransformer">
    		<beans:property name="wsdlUrl" value="${wsdlUrl}" />
    		<beans:property name="olusername" value="${olusername}" />
    		<beans:property name="olpassword" value="${olpassword}" />
    		<beans:property name="outputDir" value="${outputDir}/${siteName}/segmentation/groupcontact"/>
    		<beans:property name="siteName" value="${siteName}" />
    	</beans:bean>
    
    	<channel id="receiveChannel"/>
    	<channel id="transformIn"/>
    
    	<stream:stderr-channel-adapter channel="errorChannel" append-newline="true" />
    
    </beans:beans>

    Comment

    Working...
    X