Search This Blog

Tuesday, November 30, 2010

SOA Config Plan for File Adapter

The Simple use case for using the SOA config plan is to change the Physical path(or the File Adapter JCA properties) can be achieved as

Let's say you want to change the Physical path for File Adapter from which it will read/write the contents.
While developing the Application; you design the adapter to have following path
/home/devuser/fileLoc . The .jca file in this case will look like

  <connection-factory location="eis/file/SampleFileAdapter" adapterRef=""/>
  <endpoint-interaction portType="Write_ptt" operation="Write">
    <interaction-spec className="oracle.tip.adapter.file.outbound.FileInteractionSpec">
      <property name="PhysicalDirectory" value="/home/devuser/fileLoc"/>
      <property name="Append" value="false"/>
      <property name="NumberMessages" value="1"/>
    </interaction-spec>
  </endpoint-interaction>

</adapter-config>

Generate the Config plan for your composite and add the following Code snippet to change the Physical directory property of File Adapter

 <!-- replace file endpoint for Sample File Adapter Service -->
   <wsdlAndSchema name="SampleFileAdapter_file.jca">
     <jca:property name="PhysicalDirectory">
        <replace>/home/produser/fileLoc</replace>
     </jca:property>
   </wsdlAndSchema>

This will replace the PhysicalDirectiory path to /home/produser/fileLoc

Similarly; you can replace the Topic/Queue name for the JMS adapter using following

   <!-- replace jms destination for jms adapter -->
   <wsdlAndSchema name="JMSAdapter_jms.jca">
     <jca:property name="DestinationName">
        <replace>jms/DemoTopic</replace>
     </jca:property>
   </wsdlAndSchema> 

No comments:

Post a Comment