Filter message in event receiver WSO2 - wso2

I have recently started with WSO2 CEP. connected to a topic where many messages pass, but suppose I just want to get the messages of a type, for example all messages that have type TT -> {"name": " hello "," type ":" TT "}, I have seen that the messageSelector can be used but I do not know how to use it. An example-> type: 'TT'
I do not know if I'm treating him well since the ones are json.
Sorry for the English ;).

Have you tried to set the messageSelector parameter as follows in the receiver configurations?
<property name="transport.jms.MessageSelector">type='TT'</property>

Related

Correlation Id and Message Id in IBM MQ

For a c++ and c program, I am trying to set a value for msgId or CorrelId for a particular message in IBM MQ, that will be later put to a topic. But there's an error of "Expression must be a modifiable L-value" for both the ids.
I defined the ids as
MQBYTE24 MsgId;
MQBYTE24 CorrelId;
and the MQMD is defined as default:
MQMD md = {MQMD_DEFAULT};
I cannot use the #define directive as I am trying to single out a message to be put to a topic from the publisher's end. Receive all the messages for subscriber and check for the particular message.
Is my approach of using correlIds or MsgIds correct or is there a better way for doing this?
I would expect you to have some code that looks like the following:-
memcpy(md.CorrelId, CorrelId, MQ_MSG_ID_LENGTH);
Please also remember that the message ID that you MQPUT to a topic does not end up at the subscribers. A new message ID is created for each copy of the published message that is given to each subscriber. You should use the Correlation ID instead to have it flow through to the subscriber, and ensure the subscribers are made correctly to receive the publishers correlation ID.
Read IBM MQ Little Gem #31: Publisher's CorrelId for more information about this.

WSO2 Enterprise Integrator registry value returned in base64

My dev conf : Win2010, WSO2 EI 6.4.0, linux for data store.
I defined a registry entry, named "sourcefileURI" for storing source filepath. The media type I chose is "text/plain" and I store a path like : "/home/wso2/data/in"
When accessing this registry value from a inbound endpoint vfs config, I'm using the following code :
<parameter key="conf:/repository/transports/vfs/telco1/sourcefileURI" name="transport.vfs.FileURI"/>
This is working - almost - fine. I mean the value is returned but in base64.
I was expecting, since I chose media = "text/plain", to have the normal string returned.
The string is well returne - in plain text and not encoded - when I swap media to nothing/void. But this is not something I want to last in my project.
Can you please tell me what I'm doing wrong / don't understand here ?
Many thanks for your help.
1).Check the message builder and formatter you are using in conf/axis2.xml.Try to change the message builder and formatter for text/plain.
2) Otherwise simple solution is to use the xpath function base64Decode(string encodedValue).
3) Otherwise Use script mediator to decode the string or use class mediator.
4) Otherwise use the following link https://ajanthane.blogspot.com/2017/05/accessing-modifying-payload-in.html, in which explains how to create a custom synapse handlers.

Facebook Graph API : mark notification as read, does it work?

I'm trying facebook Graph API calls into the Graph API Explorer ( https://developers.facebook.com/tools/explorer?method=GET&path=me/notifications ).
I can get notifications with this call " me/notifications ".
Then, I want to mark notifications as read, but it doesn't seem to work. I choose a notification id and I tried several ways :
notif_100007738631831_980288?unread=0
notif_100007738631831_980288/?unread=0
notif_100007738631831_980288?unread=false
notif_100007738631831_980288/?unread=false
notif_100007738631831_980288/?read=1
I get the notification informations, but the unread value is always " 1 " and the " unseen_count " when I get back all notifications has always the same value.
Any idea ?
What do I make wrong ?
Thanks for your help ! :)
(Sorry for my bad english... :( )

Webport Issus with webmessage and multippart messages

I'm having an issue while creating orchestration by consuming webservice
Web message response variable name - msgReponse.webserviceResponse
multipart message response variable name - msgResponse.multipartresponse
I'm receiving the webmessage type(msgwebserviceResponse.Respone) from the webport.
Then after receive shape, I'm trying to map that response with another message.
So, here when I try map them by using the transfer shape, When I want to select msgResponse.multipartresponse as input schema for the map, I'm seeing msgResponse.multipartresponse(I can't see this, as I'm recieving msgReponse.webserviceResponse at receive shape)
could you please help me on this?
Thank You,
I had similar problems with yours. Asked a question and got an answer. Check this.

How to call Soap\WSDL Service through a login required webpage using matlab?

I am new to the wsdl\soapmessage query\reply world( if i can put it in this way), and I am facing some difficulties using the following wsdl( which I really really hope, one will be so kind to look at at least one of the services described there)
http://almdemo.polarion.com/polarion/ws/services/TrackerWebService?wsdl
which was provided to me to develop a matlab webinterface. Right now my matlab code looks like this:
targetNamespace = 'http://ws.polarion.com/TrackerWebService';
method = 'queryWorkItems';
values= {'Query','Sort'}
names = {'query', 'sort'}
types ={'xsd:string','xsd:string'}
message = createSoapMessage( targetNamespace, method, values, names, types)
response = callSoapService('http://almdemo.polarion.com/polarion/ws/services',...
% Service's endpoint
'http://almdemo.polarion.com/polarion/#/workitems',...
% Server method to run
message)
% SOAP message created using createSoapMessage
author = parseSoapResponse(response)
Herewith to save you time I will just enonce my two problems:
Is the code correct?
Could someone tell me if such a wsdl link is just a definition of webservices or it is also a service's endpoint?
Normally to execute manually\per clicks this services on the weppage
http://almdemo.polarion.com/polarion, you have to login!
So how do I send a message in matlab which first log me in? Or must such a service be introduced into that wsdl for me to do it?? Could you be kind enough to write how it must be defined, because I don't really
write wsdl files, but I shall learn!**
I will be really thankful for your help and I wish you a happy week(-end) guys(& girls)!!!
Regards
Chrysmac
ps: I tried to use Soapui and gave that webpage as endpoint, but the toool crashes each time I enter my credentials! Maybe because of the dataload!??