Support for adding exchange email account with EMM - wso2

I have tried searching, but it does not seem the question has been asked anywhere.
Is there any way to configure Exchange account from EMM?
I know you can set up POP3/IMAP-mail.
What would have to be done to implement such feature?
Best regards

EMM can send email invites, and to send smtp server needs to exist. we can configure smtp sever via the axis2.xml available within repository/conf/axis2
<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
<parameter name="mail.smtp.host">smtp.gmail.com</parameter>
<parameter name="mail.smtp.port">587</parameter>
<parameter name="mail.smtp.starttls.enable">true</parameter>
<parameter name="mail.smtp.auth">true</parameter>
<parameter name="mail.smtp.user">synapse.demo.0</parameter>
<parameter name="mail.smtp.password">mailpassword</parameter>
<parameter name="mail.smtp.from">synapse.demo.0#gmail.com</parameter>
</transportSender>
based on exchange server support for SMTP your scenario should be possible.
Please refer the below document[1] for configuration to send out emails to users that register with EMM
https://docs.wso2.com/display/EMM210/Android+Device

Related

Disable SSLv3 on WSO2 WSAS 3.1

I am administering an instance of WSO2 WSAS 3.1. After searching for the documentation, I couldn't find anything related to how to change ssl/tls protocols.
Does anyone knows how can I disable the SSLv3 in this version of WSO2 WSAS?
Thanks in advance
To solve the problem I had to change the SSL/TLS protocols in [wso2_home]/conf/transports.xml
FROM:
<transport name="https" class="org.wso2.carbon.server.transports.http.HttpsTransport">
<parameter name="port">9443</parameter>
<parameter name="sslProtocol">TLS</parameter>
TO:
<transport name="https" class="org.wso2.carbon.server.transports.http.HttpsTransport">
<parameter name="port">9443</parameter>
<parameter name="sslProtocols">SSLv2Hello,TLSv1</parameter>
Then stop and start the service.

Can't access to production endpoint with WSO2 API Manager - entreprise proxy

I'm trying wso2 api manager for my team.
When i follow the quick start guide, I can't get a good production endpoint in the implement part.
It's the same for wsdl
I think it's because I have the api manager on my computer, and this computer is behind a entreprise proxy.
I search on the documentation and on stack overflow but I don't understand how I can say carbon to use the proxy.
If you have an idea of how I can configure AM to use an entreprise proxy, I will be very happy
I don't know if its can help : I can't acces to the api manager whitout using localhost or 127.0.0.1:9443
Thanks !
You need to make the following configuration changes to tell API Manager (APIM) to talk to the Web proxy. Restart APIM for the config changes to take effect.
Edit the following file:
<APIM Home>/repository/conf/axis2/axis2.xml
Add the follow lines in two places:
<parameter name="http.proxyHost" locked="false">proxyName.company.com</parameter>
<parameter name="http.proxyPort" locked="false">1234</parameter>
<parameter name="http.nonProxyHosts" locked="false">localhost</parameter>
Near line 483, add the 3 new lines, such that is looks like this when you’re done:
<transportSender name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpSender">
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="http.proxyHost" locked="false">proxyName.company.com</parameter>
<parameter name="http.proxyPort" locked="false">1234</parameter>
<parameter name="http.nonProxyHosts" locked="false">localhost</parameter>
</transportSender>
Near line 528, add the 3 new lines, such that is looks like this when you’re done:
<transportSender name="https" class="org.apache.synapse.transport.passthru.PassThroughHttpSSLSender">
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="http.proxyHost" locked="false">proxyName.company.com</parameter>
<parameter name="http.proxyPort" locked="false">1234</parameter>
<parameter name="http.nonProxyHosts" locked="false">localhost</parameter>
<parameter name="keystore" locked="false">
<KeyStore>
<Location>repository/resources/security/wso2carbon.jks</Location>
<Type>JKS</Type>
<Password>wso2carbon</Password>
<KeyPassword>wso2carbon</KeyPassword>
</KeyStore>
</parameter>
<parameter name="truststore" locked="false">
<TrustStore>
<Location>repository/resources/security/client-truststore.jks</Location>
<Type>JKS</Type>
<Password>wso2carbon</Password>
</TrustStore>
</parameter>
<!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>-->
<!--supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
</transportSender>
Restart APIM for the config changes to take effect.
You need to edit carbon.xml Host parameter if you want to access management console with a host name. (And particular host entry should be resolved with a DNS name, else you can edit hosts file too)
If you want to pass the traffic via a proxy server then you need to do like this;
In axis2 configuration , at the transport sender configuration two properties has to be provided.
http.proxyHost : Proxy server's IP
http.proxyPort : Prosy server's port

Email feature in WSO2 BPS

I have developed the Human Task using WSO2 BPS, now I would to have email notification to managers user when he has new task to proceed (approve or decline). Could you please advise me how to configure email sending in WSO2 BPS.
Thank you so much
Regards,
Trong
Please refer bps documentation to setup email configurations to the human task.
Follow below steps to Configure email settings
Go to BPS_HOME/repository/conf/axis2
Open axis2-client.xml and add below configuration (Change relevant paramaters according to your email details)
<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
<parameter name="mail.smtp.from">bpsuser#gmail.com</parameter>
<parameter name="mail.smtp.user">bpsuser</parameter>
<parameter name="mail.smtp.password">bpsuserpassword</parameter>
<parameter name="mail.smtp.host">smtp.gmail.com</parameter>
<parameter name="mail.smtp.port">587</parameter>
<parameter name="mail.smtp.starttls.enable">true</parameter>
<parameter name="mail.smtp.auth">true</parameter>
</transportSender>
Then go to <BPS_HOME>/repository/conf/humantask.xml file and change below property
<EnableEMailNotification>true</EnableEMailNotification>
To configure email message content follow below steps.
Define the email message settings inside the .ht file. (The .ht file can be accessed by unzipping the .zip file found in the <BPS_HOME>/repository/samples/humantask directory)
Add below configuration and change the content accordingly
<htd:renderings>
<htd:rendering type="wso2:email">
<wso2:to name="to" type="xsd:string">bpsuser#gmail.com</wso2:to>
<wso2:subject name="subject" type="xsd:string">Email Subject</wso2:subject>
<wso2:body name="body" type="xsd:string">Your message goes here</wso2:body>
</htd:rendering>
</htd:renderings>
At the top of the .ht filw add the name space as wso2
xmlns:wso2="http://wso2.org/ht/schema/renderings/"
Then save the changes and restart your server
WSO2 products support for sending mail using axis2 email transport. Therefore you may need to enable the mail transport in the axis2.xml file by defining the mail server and so on. If you just check by default, there configuration are commented. But there may be some component that uses this transport and send the email.. I am not sure how to send it with the Human Task using some configuration... But if there is no change config.. You can create axis2 service that supports for email sending and call that using your Human task. Please read this SO question for more details and this blog

SMPP using WSO2

Hi Followed the blog mentioned in SMS Transport sender in wso2 ESB and configured axis2.xml for transportSender and transportReceiver. I am able to send a message from ESB to SMPP simulator but I am unable to receive message from SMPP simulator to ESB.
In the SMPP Simulator, I tried by adding bot 't'/'r' to enable transmitter/receiver and also tried by giving tr assuming that it is for tranceiver in users.txt but still I am unable to get a response in ESB.
Could you please help in implementing SMPP -> ESB scenario. Any link that describes this procedure also helpful for me. ( I am unable to find such)
I am editing this to make my scenario more clear
My simulator is opensmpp-sim. I added the user details in user.txt as
name=esb
password=esb
timeout=unlimited
bound=t,r
I executed the simulator with port 2775.
In ESB, axis2.xml I gave the following configurations
Transport Receiver
<transportReceiver name="sms" class="org.apache.axis2.transport.sms.SMSMessageReciever">
<parameter name="systemType">cp</parameter>
<parameter name="systemId">esb</parameter>
<parameter name="password">esb</parameter>
<parameter name="host">192.168.0.2</parameter>
<parameter name="port">2775</parameter>
<parameter name="phoneNumber">94777179968</parameter>
</transportReceiver>
Transport Sender
<transportSender name="sms" class="org.apache.axis2.transport.sms.SMSSender">
<parameter name="systemType">cp</parameter>
<parameter name="systemId">esb</parameter>
<parameter name="password">esb</parameter>
<parameter name="host">127.0.0.1</parameter>
<parameter name="port">2775</parameter>
</transportSender>
Note: 192.168.0.2 = 127.0.0.1 = localhost
Scenarios
1. Sending a message from ESME (ESB) to SMSC (Simulator)
Sequence
<sequence xmlns="http://ws.apache.org/ns/synapse" name="TEST_SMS">
<send>
<endpoint key="SMSC"/>
</send>
</sequence>
Endpoint
sms://94777179968
I exposed this sequence as a REST API. When I send a message, the message reached Simulator but there is no response in return.
2. Sending a message from SMSC (Simulator) to ESMC (ESB)
From simulator when I send message, it reaches ESB. In debug mode the message is printed in ESB log. But I am unable to handle it. How can I configure proxy service/ sequence to get that message. My goal is to get that message and initiate a process.
Thanks in advance.

SOAP-request isn't dispatched by QName of the first body child element

I have a service described with this WSDL. When its operation createService is invoked with this request everything is fine. For this service a proxy service has been made on WSO2 ESB 4.6.0. Here is WSDL generated by ESB for the proxy service. When I try to send the same request to the proxy service with soapUI the following error occurs:
The endpoint reference (EPR) for the Operation not found is
/services/test.testHttpSoap11Endpoint and the WSA Action = . If this
EPR was previously reachable, please contact the server administrator.
Sending this request's body with ESB's proxy service testing tool I have no problem. I think it's because this tool uses WS-Addressing to send it. The request is also sent smoothly with soapUI if endpoint URL is appended by ?createRequest. According to this article a cause of the problem is SOAPMessageBodyBasedDispatcher. For some reason it doesn't recognize target operation by QName of the first child of the SOAP body element. But I can't understand why SOAPMessageBodyBasedDispatcher screws up in my case. Any ideas?
The main difference among WSO2 ESB 4.6.0 and earlier versions is WSO2 ESB 4.6.0 enable Passthrough Transport (PTT) by default. PTT is used to achieve very high performance boost in WSO2 ESB you can find some numbers here http://wso2.org/library/articles/2013/01/esb-performance-65.
The main problem with your use case is it expect SOAPMessageBodyBasedDispatcher to dispatch operation name. SOAPMessageBodyBasedDispatcher build the message and use first child's local name for dispatching this operation is considered as very costly and hence for the moment not supported in PPT. For the time being you can send expected SOAPAction as a HTTP header to get rid of this issue. In this thread I have provided few other solutions Error accesing published WS proxy in WSO2 ESB 4.6: EPR not found
Changing httpGetProcessor won't help here you have to change transportSender and transportReceiver configuration. You can comment out existing PTT transportSender/transportReceiver and uncomment NHTTP transportSender/transportReceiver configurations on axis2.xml file.
This is what you have on ESB 4.6.0
<transportSender name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpSender">
<parameter name="non-blocking" locked="false">true</parameter>
</transportSender>
<transportReceiver name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpListener">
<parameter name="port" locked="false">8280</parameter>
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.PassThroughNHttpGetProcessor</parameter>
</transportReceiver>
What you need is
<transportReceiver name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener">
<parameter name="port" locked="false">8280</parameter>
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.NHttpGetProcessor</parameter>
<parameter name="disableRestServiceDispatching" locked="false">true</parameter>
</transportReceiver>
<transportSender name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">
<parameter name="non-blocking" locked="false">true</parameter>
</transportSender>