Re: [Dev] String to JSON in Ballerina 0.89

2017-10-30 Thread Sabeena Kumrawadu
Hello Gayan, Do you work in the carbon-apimgt or the product-apim?? If you are working in the carbon-apimgt, there is a already written native function for this, (since ballerina 0.89 does not support this operation). Here is an example, json jsonObject = util:parse(stringObject); In case if

[Dev] Bussines Rule Mediator Wso2 EI using facts values

2017-10-30 Thread Melodias
Hi All, I have a problem with rule mediator. I defined input facts in rule mediator. But when im trying to callout my java method with facts as argument i had an error like that when deploying proxy: ERROR - RuleMediatorFactory Can not create the rule engine

Re: [Dev] Have you some tips and tricks to manipulate JSON efficiently?

2017-10-30 Thread Thomas LEGRAND
Hello again, After some more test, I found out that I forgot that a sequence was called in the connector (the actual call of the Java class). In my connector, the call of the Java class was followed by a Payload Factory which used the generated JSON located in the content of the body to "cast" it

Re: [Dev] String to JSON in Ballerina 0.89

2017-10-30 Thread Suthagar Kailayapathy
Hi Gayan, Can you please take a look at here(last one), https://groups.google.com/forum/#!topic/ballerina-dev/DIWQIULUvSw string s = "somejson"; json j; Error e; j, err = s; Thanks. On Mon, Oct 30, 2017 at 4:39 PM, Gayan Chamara wrote: > Hi, > Is there a way to convert

[Dev] Rule Mediator problem with facts declaration

2017-10-30 Thread Melodias
Hi All, I have a problem with rule mediator. I defined input facts and i try to callout a java method with facts as arguments but i have an error when deploying proxy : Error during creating rule set: Rule Compilation error : [Rule name='test rule']

[Dev] Have you some tips and tricks to manipulate JSON efficiently?

2017-10-30 Thread Thomas LEGRAND
Hello everybody! I have a custom connector in which I inserted some instruction to get the time it takes to finish the execution. It is very simple and is like that : @Override public void connect(MessageContext messageContext) throws ConnectException { long start =

Re: [Dev] String to JSON in Ballerina 0.89

2017-10-30 Thread Anupama Pathirage
Hi, In earlier versions of ballerina following should work for string to json and json to string conversions. import ballerina.lang.system; import ballerina.lang.jsons; function main(string[] args) { string s1 = "{'ab':'ddd'}"; json jsonVal = s1; system:println(jsonVal); string

Re: [Dev] UserAccountAssociationService having “/permission/admin/login” permissions in some operations

2017-10-30 Thread Farasath Ahamed
Hi Rumy, If we can identify the users we want to restrict access by a particular role, Let's say 'X'. We can achieve your requirement as follows, 1. Add management console as a service provider in IS ( Ref:

Re: [Dev] String to JSON in Ballerina 0.89

2017-10-30 Thread Rajith Vitharana
Hi Gayan, You can use conversion syntax() to achieve this. Ex - function main(string[] args) { string ss = "{'ab':'ddd'}"; json jsonVal; jsonVal, _ = ss; println(jsonVal); } Thanks, On 30 October 2017 at 16:39, Gayan Chamara wrote: > Hi, >

[Dev] String to JSON in Ballerina 0.89

2017-10-30 Thread Gayan Chamara
Hi, Is there a way to convert JSON string into ballerina json type in ballerina 0.89? I couldn't find a suitable method in the docs. Thanks, Gayan. -- Regards, *Gayan Chamara* *Software Engineering Intern* *WSO2 Inc.* *Email: gaya...@wso2.com * *Mobile : **+94 71 728

Re: [Dev] [IS] How to validate users via REST api?

2017-10-30 Thread Shazni Nazeer
Hi Javier, In addition to what Maduranga has pointed out, if you are looking to check users credential validity against the userstore, you can use *RemoteUserStoreManagerService *(which is a SOAP service that we refer as admin service) which has got many user related operations you may want to

Re: [Dev] UserAccountAssociationService having “/permission/admin/login” permissions in some operations

2017-10-30 Thread Mushthaq Rumy
Thanks Farasath. I'll check on this. Thanks & Regards, Mushthaq On Mon, Oct 30, 2017 at 1:23 PM, Farasath Ahamed wrote: > Hi Rumy, > > If we can identify the users we want to restrict access by a particular > role, Let's say 'X'. We can achieve your requirement as follows,

Re: [Dev] Unit test for siddhi-io-jms

2017-10-30 Thread Kalaiyarasi Ganeshalingam
Hi all , I changed the siddhi-io-jms code as discussed above. Also I found some other issues in the siddhi-io-jms as mentioned below: Couldn't cast some variable's type to string[1]. Couldn't check the resultcontainer's content [2][3] in the unit test. I made the changes[4] to fix the above

Re: [Dev] How to call rest streaming api in WSO2

2017-10-30 Thread Malaka Silva
Hi Bala, Can you explain about your use case? Eg: when you say streaming to which service etc? +dev to add more audience to the discussion. On Mon, Oct 30, 2017 at 11:55 AM, bala.kummi...@wipro.com < bala.kummi...@wipro.com> wrote: > Hi Team, > > > > How to call streaming api in wso2

[Dev] Review the code for siddhi-io-websocket and siddhi-io-websocketservice

2017-10-30 Thread Sivaramya Sivanathan
Hi SajithAR, I'm working on siddhi-io-websocket and siddhi-io-websocketservice using the carbon transport. I've added the code in the following repo [1] https://github.com/sivaramya/siddhi-io-websocket [2] https://github.com/sivaramya/siddhi-io-websocketservice Could you please check on this