Trying to configure email in Identity server - wso2

I have configured the email configuration in identity server repository/conf/output-event-adapters.xml with the below settings.
<?xml version="1.0" encoding="UTF-8"?>
< outputEventAdaptersConfig>
< parameter key="mail.smtp.from">name#companyname.com< /parameter>
<parameter key="mail.smtp.host">smtp.companyname.com< /parameter>
<parameter key="mail.smtp.port">25< /parameter>
<parameter key="mail.smtp.starttls.enable">false< /parameter>
<parameter key="mail.smtp.auth">false< /parameter>
<parameter key="mail.smtp.user">name< /parameter>
<parameter key="mail.smtp.password" / >
< /outputEventAdaptersConfig>
but while sending email i am getting the below error
[2019-05-22 06:24:37,892] ERROR
{org.wso2.carbon.event.output.adapter.core.internal.OutputAdapterRuntime}
- Connection unavailable for Output Adopter 'EmailPublish org.wso2.carbon.event.output.adapter.core.exception.ConnectionUnavailableException:
The adapter EmailPublisher failed to connect to the mail server due to
null smtpfrom value
tried the same configuration in axis.xml also. we are using
WSO2 Identity Server 5.5.0
<?xml version="1.0" encoding="UTF-8"?>
< outputEventAdaptersConfig>
< parameter key="mail.smtp.from">name#companyname.com< /parameter>
<parameter key="mail.smtp.host">smtp.companyname.com< /parameter>
<parameter key="mail.smtp.port">25< /parameter>
<parameter key="mail.smtp.starttls.enable">false< /parameter>
<parameter key="mail.smtp.auth">false< /parameter>
<parameter key="mail.smtp.user">name< /parameter>
<parameter key="mail.smtp.password" / >
< /outputEventAdaptersConfig>
[2019-05-22 06:24:37,892] ERROR
{org.wso2.carbon.event.output.adapter.core.internal.OutputAdapterRuntime}
- Connection unavailable for Output Adopter 'EmailPublish org.wso2.carbon.event.output.adapter.core.exception.ConnectionUnavailableException:
The adapter EmailPublisher failed to connect to the mail server due to
null smtpfrom value

Related

WSO2 EI 6.3.0 unable to connect with IBM Websphere MQ v8 using JMS

I am trying to connect WSO2 Enterprise Integrator with IBM Websphere MQ v 8.0.0.5 by JMS Transport. The purpose is to be able to receive/publish messages on Queues that are made in IBM Websphere MQ via WSO2 Enterprise Integrator using JMS Protocol.
Link:
I followed this link provided by WSO2 official documentation. I followed all the steps exactly but when I deploy the JMS Listener Proxy, it becomes a faulty service and It shows me the following error on the console:
Error Stack Trace:
com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:203)
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:412)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:8475)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:7913)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl._createConnection(JmsConnectionFactoryImpl.java:299)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:236)
at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6024)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:136)
at com.ibm.mq.jms.MQQueueConnectionFactory.createConnection(MQQueueConnectionFactory.java:209)
at org.apache.axis2.transport.jms.JMSUtils.createConnection(JMSUtils.java:786)
at org.apache.axis2.transport.jms.JMSListener.checkJMSConnection(JMSListener.java:155)
at org.apache.axis2.transport.jms.JMSListener.startEndpoint(JMSListener.java:99)
at org.apache.axis2.transport.jms.JMSListener.startEndpoint(JMSListener.java:54)
at org.apache.axis2.transport.base.AbstractTransportListenerEx.startListeningForService(AbstractTransportListenerEx.java:154)
at org.apache.axis2.transport.base.AbstractTransportListener.internalStartListeningForService(AbstractTransportListener.java:213)
at org.apache.axis2.transport.base.AbstractTransportListener$2.serviceAdded(AbstractTransportListener.java:126)
at org.apache.axis2.transport.base.tracker.AxisServiceTracker.serviceAdded(AxisServiceTracker.java:212)
at org.apache.axis2.transport.base.tracker.AxisServiceTracker$1.serviceUpdate(AxisServiceTracker.java:98)
at org.apache.axis2.engine.AxisConfiguration.notifyObservers(AxisConfiguration.java:666)
at org.apache.axis2.engine.AxisConfiguration.addServiceGroup(AxisConfiguration.java:420)
at org.apache.axis2.engine.AxisConfiguration.addService(AxisConfiguration.java:350)
at org.apache.synapse.core.axis2.ProxyService.buildAxisService(ProxyService.java:750)
at org.wso2.carbon.proxyadmin.service.ProxyServiceAdmin.addProxyService(ProxyServiceAdmin.java:273)
at org.wso2.carbon.proxyadmin.service.ProxyServiceAdmin.addProxy(ProxyServiceAdmin.java:710)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Proxy Service Code as mentioned in documentation:
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="MyJMSProxy"
transports="jms"
startOnLoad="true"
trace="disable">
<description/>
<target>
<inSequence>
<log level="full"/>
<drop/>
</inSequence>
</target>
<parameter name="transport.jms.Destination">LocalQueue1</parameter>
</proxy>
Axis2 File Configuration:
Following are axis2 configurations for transport receiver and transport listener.
Transport Receiver:
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="default" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:/C:/jndidirectory</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">MyQueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.UserName" locked="false">omerk</parameter>
<parameter name="transport.jms.Password" locked="false">password</parameter>
</parameter>
<parameter name="myQueueConnectionFactory1" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:/C:/jndidirectory</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">MyQueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.UserName" locked="false">omerk</parameter>
<parameter name="transport.jms.Password" locked="false">password</parameter>
</parameter>
</transportReceiver>
Transport Listener:
<transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender">
<parameter name="default" locked="false">
<parameter name="vender.class.loader.enabled">false</parameter>
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:/C:/jndidirectory</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">MyQueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.UserName" locked="false">omerk</parameter>
<parameter name="transport.jms.Password" locked="false">password</parameter>
</parameter>
<parameter name="myQueueConnectionFactory1" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:/C:/jndidirectory</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">MyQueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.UserName" locked="false">omerk</parameter>
<parameter name="transport.jms.Password" locked="false">password</parameter>
</parameter>
</transportSender>
Research So far:
I tried googling it and apparently it is showing that It is not able to figure out the Queue Manager Name. But I am unable to figure out where to add this information and how? I tried adding it on the JMS Proxy Service Level Parameters but it didn't work. So any insight would be helpful.
TroubleShooting
For Troubleshooting, when I checked the Error logs of IBM Websphere MQ. IT was giving the following error:
AMQ5534: User ID 'omerk' authentication failed
EXPLANATION:
The user ID and password supplied by the 'carbon.bootstrap.Bootstrap' program
could not be authenticated.
Solution:
For my solution the authentication was not a requirement. So I basically disabled the authentication of my queue manager by running the following commands.
ALTER AUTHINFO(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) AUTHTYPE(IDPWOS) CHCKCLNT(NONE)
REFRESH SECURITY TYPE(CONNAUTH)
IT worked for me and solved my problem.

WSO2: Override JMS producer JNDI properties for MQ

I am trying to override the JMS connection properties as outlined in the documentation:
https://docs.wso2.com/display/EI640/Using+the+ESB+as+a+JMS+Producer
You can define a JMS queue name and connection factory parameters in the JMS connection URL. Values of connection factory parameters depend on the type of the JMS broker.
I have multiple queue connection factories defined in my axis2.xml file to support multiple queue managers. However, the following configuration does not take effect (the messages are not sent to the right queue environment):
<endpoint name="myEndpoint" xmlns="http://ws.apache.org/ns/synapse">
<address format="pox" uri="jms://MY_QUEUE_NAME?transport.jms.ConnectionFactoryJNDIName=MYQUEUEQCF"/>
</endpoint>
The axis2 configuration matches with the above:
<transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender">
<parameter name="myConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:bindings</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">OTHERQCF</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.UserName" locked="false"></parameter>
<parameter name="transport.jms.Password" locked="false"></parameter>
</parameter>
<parameter name="secondConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:bindings</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">MYQUEUEQCF</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.UserName" locked="false"></parameter>
<parameter name="transport.jms.Password" locked="false"></parameter>
</parameter>
</transportSender>
The messages are going through the first connection factory, OTHERQCF, and not via MYQUEUEQCF as expected, so they are sent to the wrong environment. The queue technology used is WebSphere MQ.
Is this a bug or am I missing something?
I have also tried with the following config and it does not take effect:
<endpoint name="myEndpoint" xmlns="http://ws.apache.org/ns/synapse">
<address format="pox" uri="jms://MY_QUEUE_NAME?transport.jms.ConnectionFactoryJNDIName=MYQUEUEQCF&java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory&java.naming.provider.url=file:bindings&transport.jms.DestinationType=queue"/>
</endpoint>
Finally found the solution: the WSO2 documentation is (as usual) incomplete and in this case, incorrect.
First of all, the second JMS producer must have CacheLevel above SESSION (i.e. value set to auto, consumer, or producer in axis.xml configuration, e.g.:
<parameter name="secondConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:bindings</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">MYQUEUEQCF</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.UserName" locked="false"></parameter>
<parameter name="transport.jms.Password" locked="false"></parameter>
<parameter name="transport.jms.CacheLevel" locked="false">producer</parameter>
</parameter>
This is because the JMSProducer will otherwise move to use the default connection factory based on the code on github.
Second of all, the documentation states the parameter name incorrectly. The parameter to use is called transport.jms.ConnectionFactory and not transport.jms.ConnectionFactoryJNDIName.
Additionally the parameter value is referring to the overall internal axis2 name of the connection factory, i.e. secondConnectionFactory in the example above, rather than the MYQUEUEQCF JNDI name.
So with the following configuration, the message is correctly sent to the second queue:
<endpoint name="myEndpoint" xmlns="http://ws.apache.org/ns/synapse">
<address format="pox" uri="jms://MY_QUEUE_NAME?transport.jms.ConnectionFactory=secondConnectionFactory&java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory&java.naming.provider.url=file:bindings&transport.jms.DestinationType=queue"/>
</endpoint>
Not sure if it´s the same under EI 6.x but for esb 4.8 you had to define a second transport sender witch you then refer in the send/endpoint.
<transportSender name="jmsSecond" class="org.apache.axis2.transport.jms.JMSSender">
<parameter name="secondConnectionFactory" .....
</transportSender>
<endpoint name="myEndpoint" xmlns="http://ws.apache.org/ns/synapse">
<address format="pox" uri="jmsSecond://MY_QUEUE_NAME?transport.jms.ConnectionFactoryJNDIName=MYQUEUEQCF"/>
</endpoint>

wso2 5.0.0 jms activemq consummer.exclusive

Using a proxy-service listening on a jms queue in wso2esb-5.0.0, how do I use the activemq consumer.exclusive=true property ?
I have the following configuration in axis2.xml :
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="default" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">failover:(tcp://V1-AMQ01:61616,tcp://V1-AMQ02:61616)?jms.nonBlockingRedelivery=true&nested.consumer.exclusive=true</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.SessionTransacted">true</parameter>
<parameter name="transport.jms.SessionAcknowledgement" locked="true">CLIENT_ACKNOWLEDGE</parameter>
<parameter name="transport.Transactionality" locked="true">local</parameter>
<parameter name="redeliveryPolicy.maximumRedeliveries" locked="true">-1</parameter>
<parameter name="redeliveryPolicy.redeliveryDelay">4000</parameter>
<parameter name="transport.jms.CacheLevel" locked="true">consumer</parameter>
<parameter name="redeliveryPolicy.initialRedeliveryDelay">4000</parameter>
<parameter name="redeliveryPolicy.maximumRedeliveryDelay">864000</parameter>
<parameter name="redeliveryPolicy.useExponentialBackOff">true</parameter>
<parameter name="redeliveryPolicy.backOffMultiplier">3</parameter>
</parameter>
</transportReceiver>
All my proxy services listening on jms queues use this configuration. The esb doesn't consume any messages. When I remove the "&nested.consumer.exclusive=true" it correctly consumes messages.
If I look at the activemq console, I see 0 consumers on my queues (normally, 1)
If I delete the queues and restart the esb, the queues are not recreated (normally they are)
The option needs to be set on the proxy service:
<proxy name="Myqueue?consumer.exclusive=true&consumer.prefetchSize=0" startOnLoad="true" transports="jms" xmlns="http://ws.apache.org/ns/synapse">
However this creates errors in the log:
2018-07-31 18:50:02,981 WARN JMSListener - Error registering a MBean with objectname ' org.apache.axis2:Type=Transport,ConnectorName=jms-listener-1065586266,Group=Services,Service=JMS_SMS_MainNotification?consumer.exclusive=true&consumer.prefetchSize=0 ' for JMX management
javax.management.MalformedObjectNameException: Invalid character '=' in value part of property
at javax.management.ObjectName.construct(ObjectName.java:618)
But as far as I understand the alternative is to use transport.jms.Destination (cf https://docs.wso2.com/display/ESB490/JMS+Transport ) but this duplicates the axis2.xml configuration ?? Is that it ?

WSO2 IMB MQ connection with new created Queues

I have a question,I new in ESB so I used the manual to create connection with my ESB and IBM MQ
https://docs.wso2.com/display/ESB460/Configure+with+IBM+WebSphere+MQ
on the end I create .bindings file and used. Everything worked fine. So Im able to read messages from Queues that exist in QueueManager.
QUESTION:
Am I need to rebuild .binding file every time when I create new Queue?
is there a way to use/see newly created Queues without rebuild a .binding file?
For connection in \repository\conf\axis2.xml I used
> <parameter name="transport.jms.ConnectionFactoryType" > locked="false">queue</parameter>
> <parameter name="transport.jms.UserName" locked="false">**myname**</parameter>
> <parameter name="transport.jms.Password" locked="false">**mypassword**</parameter>
I see this on http://nandikajayawardana.blogspot.com/search/label/WSo2%20ESB
but maybe I should use this
> <parameter name="transport.jms.ConnectionFactoryType"
> locked="false">**topic**</parameter>
> <parameter name="transport.jms.Destination">ivtT</parameter>
After I tried every single combination. Working solution in my case is :
WMQInitialContextFactory is not recommended... starting from version 8 IBM MQ they using ONLY RefFSContextFactory
so after creating .binding file the repository\conf\axis2.xml should look like
<parameter name="esbMngr" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:/home/wso2admin/wso2esb-5.0.0/jndi</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">GSTQueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.UserName" locked="false">userName</parameter>
<parameter name="transport.jms.Password" locked="false">userPassword</parameter>
</parameter>
.....
where GSTQueueConnectionFactory is ConectionFactory name that is defined in .binding file
So proxy server looks like :
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse"
name="TMSLeaseMQParser"
startOnLoad="true"
statistics="disable"
trace="disable"
transports="jms">
<target>
<inSequence>
<log level="full">
</log>
</inSequence>
<outSequence>
<send/>
</outSequence>
<faultSequence/>
</target>
<parameter name="transport.jms.DestinationType">queue</parameter>
<parameter name="transport.jms.Destination">TMSALease</parameter>
<parameter name="transport.jms.ContentType">
<rules xmlns="">
<jmsProperty>contectType</jmsProperty>
<default>application/xml</default>
</rules>
</parameter>
<parameter name="transport.jms.ConnectionFactory">esbMngr</parameter> <description/>
</proxy>
So esbMngr is name of section defined in axis2.xml while TMSALease is your message queue that you are reading from IBM MQ
I hope is this is going to save some time someone ... Any feedback is welcome
NOTE: communication can be tricky. Be sure that you check that your userName have access to queue, read more in IBM Technote "2035 MQRC_NOT_AUTHORIZED Connecting to WebSphere MQ from WebSphere Application Server via CLIENT Bindings"
To check MQ OAM permissions us the dspmqaut command, for example:
dspmqaut -m WS02ESBManager -n TMSALease -t queue -p userName
To set MQ OAM permissions us the setmqaut command, for example:
setmqaut -m WS02ESBManager -n TMSALease -t queue -p userName+put
Also sometimes help if you :
Disable Channel authentication records in Communication in Properties of queue manager ...

WSO2 inboundEndpoint trying to parse file as XML despite transport.vfs.ContentType="text/csv"

When trying to use File inboundEndpoint in WSO2 5.0.0 to process an inbound csv file I'm always getting an exception as if WSO2 is trying to parse the file as XML despite the fact tat I've set the transport.vfs.ContentType parameter to "text/csv" in the inboundEndpoint configuration:
<parameter name="transport.vfs.ContentType">text/csv</parameter>
Here's the full stack error I'm getting:
[2016-10-08 16:56:31,181] ERROR - FileInjectHandler Error while processing the file/folder
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'i' (code 105) in prolog; expected '<'
at [row,col {unknown-source}]: [1,1]
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
at org.apache.axiom.om.impl.AbstractOMMetaFactory.createStAXSOAPModelBuilder(AbstractOMMetaFactory.java:73)
at org.apache.axiom.om.impl.AbstractOMMetaFactory.createSOAPModelBuilder(AbstractOMMetaFactory.java:79)
at org.apache.axiom.om.OMXMLBuilderFactory.createSOAPModelBuilder(OMXMLBuilderFactory.java:196)
at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:65)
at org.wso2.carbon.inbound.endpoint.protocol.file.FileInjectHandler.invoke(FileInjectHandler.java:141)
at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.processFile(FilePollingConsumer.java:763)
at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.directoryHandler(FilePollingConsumer.java:543)
at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.poll(FilePollingConsumer.java:214)
at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.execute(FilePollingConsumer.java:134)
at org.wso2.carbon.inbound.endpoint.protocol.file.FileTask.taskExecute(FileTask.java:47)
at org.wso2.carbon.inbound.endpoint.common.InboundTask.execute(InboundTask.java:45)
at org.wso2.carbon.mediation.ntask.NTaskAdapter.execute(NTaskAdapter.java:98)
at org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:67)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)
And here's the full configuration for the inboundEndpoint:
<?xml version="1.0" encoding="UTF-8"?>
<inboundEndpoint name="BigBuyCategoryMapper" protocol="file" sequence="ProcessCategoryMapper" suspend="false" xmlns="http://ws.apache.org/ns/synapse">
<parameters>
<parameter name="interval">5000</parameter>
<parameter name="sequential">true</parameter>
<parameter name="coordination">true</parameter>
<parameter name="transport.vfs.ContentType">text/csv</parameter>
<parameter name="transport.vfs.LockReleaseSameNode">false</parameter>
<parameter name="transport.vfs.AutoLockRelease">false</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.FileURI">file:///Users/gamac/temp/in</parameter>
<parameter name="transport.vfs.MoveAfterFailure">file:///Users/gamac/temp/failed</parameter>
<parameter name="transport.vfs.DistributedLock">false</parameter>
<parameter name="transport.vfs.FileNamePattern">mapper_category.csv</parameter>
<parameter name="transport.vfs.MoveAfterProcess">file:///Users/gamac/temp/done</parameter>
<parameter name="transport.vfs.Locking">disable</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>
Please help.
Thanks!
Using text/plain instead of text/csv seems to get around this issue:
<parameter name="transport.vfs.ContentType">text/plain</parameter>
However the proper solution is probably to configure a Message Builder/Formatter for text/csv as per WSO2 documentation: https://docs.wso2.com/display/ESB481/Working+with+Message+Builders+and+Formatters