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
Related
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
I created a proxy service with WSO2 ESB 4.8.1 using a complex WSDL using a WSDL import and a lot of schema imports. I can import the original WSDL to SoapUI but not the one generated from the proxy service. WSDL validation gives error
ERROR - RPCMessageReceiver WSDLException (at
/wsdl:definitions/wsdl:message1/wsdl:part):
faultCode=UNBOUND_PREFIX: Unable to determine namespace of
'null:UpdateConsumerByDMS_v1'.
I found similar problem from https://wso2.org/jira/browse/CARBON-12030. How to solve the problem? Any help appreciated.
Best regards,
Teemu
I think I could get over this by using the original WSDL with proxy parameters
<parameter name="useOriginalwsdl">true</parameter>
<parameter name="modifyUserWSDLPortAddress">true</parameter>
WSO2 ESB alters the wsdl
Keep the original wsdl file in registry, lets say in conf/myresources folder and then use the below after target.
<publishWSDL key="conf:myresources/<wsdl_file>.wsdl"/>
<parameter name="useOriginalwsdl">true</parameter>
<parameter name="modifyUserWSDLPortAddress">true</parameter>
<parameter name="serviceType">proxy</parameter>
Thanks.
I've got the same problem. I solved it by doing two things:
1) Add all schema in the registry like: /_system/governance/services and add your wsdl there too.
2) In your proxy service, use pick from registry and add in Reference Key something like
gov:/services/xxx.wsdl
In the resources, under WSDL resource, add all your schema like
schema1.xsd gov:/services/schema1.xsd
It will probably works.
I'm new to WSO2.
I'm using the ESB Console, and I'm trying to add a WSDL-Based Proxy
After entering the WSDL URL if I then try to Test URI, I receive the following error:
Invalid WSDL URI (Unable to establish a connection)
I'm not certain was the issue is, but I'm guessing that there is a problem with the issuer of the certificate. I would like to disable certificate validation to test that theory. So far, the only setting I can find is the following in the wso2esb-4.8.1/repository/conf/axis2/axis2.xml file:
<transportSender name="https class="org.apache.synapse.transport.passthru.PassThroughHttpSSLSender">
...
<parameter name="HostnameVerifier">AllowAll</parameter>
</transportSender>
However, this setting doesn't help. (And it really shouldn't help since the actual host name matches the certificate CN)
Any ideas on what I can look for to fix this?
Thanks!
Can you see the WSDL using your internet Browser (with the same URI) ?
Don't you have a corporate proxy ?
In this case, configure it in WSO2 adding thoses properties in your transportSender conf :
<parameter name="http.proxyHost" locked="false">localhost</parameter>
<parameter name="http.proxyPort" locked="false">8080</parameter>
(update hostname and port...)
Have a look at wso2carbon.log
If you can access this URI and wonder if AllowAll works, you can try to configure WSO2 to trust this certificate :
download it from your internet browser and
install it in ESB_HOME/repository/resources/security/client-truststore.jks with keytool
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.
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>