简体   繁体   中英

WSO2 inbound Endpoint

I am working on Inbound endpoints in WSO2....There I tried to access inbound endpoint parameters through config registry,but unable to achieve.

I have referred the below URL for Specifying inbound endpoint parameters as registry values

Reference .

If I try it by hard coding parameters its working fine.

Could anyone please help me in this,please share a sample example of inbound endpoint getting parameters from config or governance registry.

Thanks in Advance.

You can use inbound endpoint parameters as registry resources as documented.

This is a simple sample for file inbound endpoint that uses parameters as registry values.

First I have created a registry resource including the FileURI 在此处输入图片说明

Then created the following file inbound endpoint referring the registry entry created in the config registry.

<?xml version="1.0" encoding="UTF-8"?>
<inboundEndpoint xmlns="http://ws.apache.org/ns/synapse"
                 name="vfsinbound"
                 sequence="ABCSequence"
                 onError="ABCFault"
                 protocol="file"
                 suspend="false">
   <parameters>
      <parameter name="interval">1000</parameter>
      <parameter name="sequential">true</parameter>
      <parameter name="coordination">true</parameter>
      <parameter name="transport.vfs.FileURI" key="conf:/repository/FileLocation"/>
      <parameter name="transport.vfs.ContentType">text/xml</parameter>
      <parameter name="transport.vfs.FileNamePattern">.*\.xml</parameter>
      <parameter name="transport.vfs.Locking">enable</parameter>
      <parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
      <parameter name="transport.vfs.MoveAfterProcess">file:///home/sashika/Desktop/VFS/process</parameter>
      <parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
      <parameter name="transport.vfs.MoveAfterFailure">file:///home/sashika/Desktop/VFS/fail</parameter>
      <parameter name="transport.vfs.AutoLockRelease">false</parameter>
      <parameter name="transport.vfs.LockReleaseSameNode">false</parameter>
      <parameter name="transport.vfs.DistributedLock">false</parameter>
      <parameter name="transport.vfs.FileSortAttribute">NONE</parameter>
      <parameter name="transport.vfs.FileSortAscending">true</parameter>
      <parameter name="transport.vfs.CreateFolder">true</parameter>
      <parameter name="transport.vfs.Streaming">false</parameter>
      <parameter name="transport.vfs.Build">false</parameter>
   </parameters>
</inboundEndpoint>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM