Re: [Dev] PayLoadFactory dealing with null or empty values

2018-01-09 Thread Senduran Balasubramaniyam
Hi Aditya,

Try the following payload factory (I assume you are receiving the above
mentioned input JSON as request)

 

{
"firstName": "$1",
"lastName": "$2",
"email": "$3"
}









Regards
Senduran

On Wed, Jan 10, 2018 at 12:48 PM, aditya shivankar <
shivankar.adit...@gmail.com> wrote:

> Respected Sir,
>
>  Please find attached proj zip file and Rest api files.
>
> Input :
>
>  {
> "FirstName": {
>"Type": "System.String",
> "Value": "John",
> "Original": "John"
> },
> "LastName": {
> "Type": "System.String",
> "Value": "",
> "Original": ""
> },
> "Email": {
> "Type": "System.String"
> }
> }
>
> Output of PayloadFactory :
> {
> "firstName": John,
> "lastName": {"Value":null},
> "email":
> }
>
> Expected Output :
>{
>"firstName": "John",
>"lastName": "",
> "email": "",
>
>}
>
>
>
>  With Regards,
>  Aditya
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Senduran *
Senior Software Engineer,
WSO2, Inc.;  http://wso2.com/ 
Mobile: +94 77 952 6548
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] PayLoadFactory dealing with null or empty values

2018-01-09 Thread aditya shivankar
 Respected Sir,

 Forgot to mention, I cannot use xslt or datamapper mediator here as I am
already facing issues with these mediators
1. because of the large size of json reuests in my project(datamapper)
2. and not able to configure and use xslt to transform json massages(xslt)

so request you to please guide to achieve this with payloadFactory.

 With Regards,
 Aditya



On Wed, Jan 10, 2018 at 12:48 PM, aditya shivankar <
shivankar.adit...@gmail.com> wrote:

> Respected Sir,
>
>  Please find attached proj zip file and Rest api files.
>
> Input :
>
>  {
> "FirstName": {
>"Type": "System.String",
> "Value": "John",
> "Original": "John"
> },
> "LastName": {
> "Type": "System.String",
> "Value": "",
> "Original": ""
> },
> "Email": {
> "Type": "System.String"
> }
> }
>
> Output of PayloadFactory :
> {
> "firstName": John,
> "lastName": {"Value":null},
> "email":
> }
>
> Expected Output :
>{
>"firstName": "John",
>"lastName": "",
> "email": "",
>
>}
>
>
>
>  With Regards,
>  Aditya
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [EI 6.1.1] WS-Security UsernameToken performance with large messages

2018-01-09 Thread Lahiru Sandaruwan
I see. Looks like there would be a some hit on performance then.
Thanks Azeez for the explanation.

On Tue, Jan 9, 2018 at 11:22 PM, Afkham Azeez  wrote:

> IIRC, Rampart uses WSS4J and WSS4J works with DOM. So when Rampart kicks
> in, it will convert OM (Axiom) to DOM. Actually we implemented a hybrid
> object model called DOOM (DOM-OM) which supports both models because Axis2
> knows only Axiom and WSS4J knows only OM. So we can't avoid the cost of
> creating the DOM. Even with SAX, once the events start firing, you cannot
> stop and SAX doesn't support deferred building. That is why we used the
> StAX parser in Axiom. The issue in Dennis Sosnoski's article refers to a
> bug and should have been fixed a long time ago.
>
> Thanks
> Azeez
>
> On Tue, Jan 9, 2018 at 11:55 PM, Lahiru Sandaruwan 
> wrote:
>
>> Hi Devs,
>>
>> Got a question on $subject. Concern is, if the username token is
>> retrieved by building the whole message with DOM or it is read up to
>> security header as in SAX(see [1] for difference) when parsing for
>> authentication.
>>
>> [2] says,
>> "Part of this performance hit from WS-Security is due to a flaw in the
>> Rampart handler implementation, which causes it to convert each request and
>> response message to Document Object Model (DOM) form any time Rampart is
>> engaged (even if no security processing is to be done for the message).
>> This particular issue should be fixed in time for a Rampart 1.5 release to
>> go along with Axis2 1.5. Depending on how the fix is implemented, it may
>> substantially improve the times for the UsernameToken test.".
>>
>> Difference is, when the messages get bigger, DOM model will cause more
>> latency than SAX.
>> Anyone can confirm if this was fixed in latest Rampart/Axis2 versions?
>>
>> [1] https://stackoverflow.com/questions/6828703/what-is-the-
>> difference-between-sax-and-dom
>> [2] https://www.ibm.com/developerworks/library/j-jws6/index.html
>>
>> Thanks.
>>
>> --
>> --
>>
>> Lahiru Sandaruwan
>> Associate Technical Lead,
>> WSO2 Inc., http://wso2.com
>>
>> lean.enterprise.middleware
>>
>> m: +1 901 530 2379 <+1%20901-530-2379>
>> e: lahi...@wso2.com b: https://medium.com/@lahirugmg
>> in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> *Afkham Azeez*
> Senior Director, Platform Architecture; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
> * *
> *email: **az...@wso2.com* 
> * cell: +94 77 3320919 <077%20332%200919>blog: **http://blog.afkham.org*
> 
> *twitter: **http://twitter.com/afkham_azeez*
> 
> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
> *
>
> *Lean . Enterprise . Middleware*
>



-- 
--

Lahiru Sandaruwan
Associate Technical Lead,
WSO2 Inc., http://wso2.com

lean.enterprise.middleware

m: +1 901 530 2379
e: lahi...@wso2.com b: https://medium.com/@lahirugmg
in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [EI 6.1.1] WS-Security UsernameToken performance with large messages

2018-01-09 Thread Afkham Azeez
IIRC, Rampart uses WSS4J and WSS4J works with DOM. So when Rampart kicks
in, it will convert OM (Axiom) to DOM. Actually we implemented a hybrid
object model called DOOM (DOM-OM) which supports both models because Axis2
knows only Axiom and WSS4J knows only OM. So we can't avoid the cost of
creating the DOM. Even with SAX, once the events start firing, you cannot
stop and SAX doesn't support deferred building. That is why we used the
StAX parser in Axiom. The issue in Dennis Sosnoski's article refers to a
bug and should have been fixed a long time ago.

Thanks
Azeez

On Tue, Jan 9, 2018 at 11:55 PM, Lahiru Sandaruwan  wrote:

> Hi Devs,
>
> Got a question on $subject. Concern is, if the username token is retrieved
> by building the whole message with DOM or it is read up to security header
> as in SAX(see [1] for difference) when parsing for authentication.
>
> [2] says,
> "Part of this performance hit from WS-Security is due to a flaw in the
> Rampart handler implementation, which causes it to convert each request and
> response message to Document Object Model (DOM) form any time Rampart is
> engaged (even if no security processing is to be done for the message).
> This particular issue should be fixed in time for a Rampart 1.5 release to
> go along with Axis2 1.5. Depending on how the fix is implemented, it may
> substantially improve the times for the UsernameToken test.".
>
> Difference is, when the messages get bigger, DOM model will cause more
> latency than SAX.
> Anyone can confirm if this was fixed in latest Rampart/Axis2 versions?
>
> [1] https://stackoverflow.com/questions/6828703/what-is-the-
> difference-between-sax-and-dom
> [2] https://www.ibm.com/developerworks/library/j-jws6/index.html
>
> Thanks.
>
> --
> --
>
> Lahiru Sandaruwan
> Associate Technical Lead,
> WSO2 Inc., http://wso2.com
>
> lean.enterprise.middleware
>
> m: +1 901 530 2379 <+1%20901-530-2379>
> e: lahi...@wso2.com b: https://medium.com/@lahirugmg
> in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
*Afkham Azeez*
Senior Director, Platform Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* *
*email: **az...@wso2.com* 
* cell: +94 77 3320919blog: **http://blog.afkham.org*

*twitter: **http://twitter.com/afkham_azeez*

*linked-in: **http://lk.linkedin.com/in/afkhamazeez
*

*Lean . Enterprise . Middleware*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MSF4J] Running multiple MicroserviceRunners in a single JVM.

2018-01-09 Thread Irshad Nilam
Hi Azeez and Thusitha,

I must have had problems because of starting separate threads. Thanks for
pointing that out, I'll follow this approach and will update this thread.

Thanks and Regards.

On Wed, Jan 10, 2018 at 1:27 AM, Thusitha Thilina Dayaratne <
thusithathil...@gmail.com> wrote:

> Hi Irshad,
>
> As Azeez mentioned this should work out of the box. We are doing same
> thing in our test cases as well[1]. You don't have to create a separate
> thread since MicroserveRunner internals will do that for you.
>
> [1] - https://github.com/wso2/msf4j/blob/master/core/src/test/
> java/org/wso2/msf4j/HttpServerTest.java#L125
>
> Thanks
> Thusitha
>
> On Tue, Jan 9, 2018 at 8:40 PM, Afkham Azeez  wrote:
>
>> I tried the following and things worked as expected.
>>
>> @Path("/hello")
>> public class HelloService {
>>
>> private String id;
>>
>> public HelloService(String id) {
>> this.id = id;
>> }
>>
>> @GET
>> @Path("/{name}")
>> public String hello(@PathParam("name") String name) {
>> System.out.println("Hello");
>> return "Hello " + name + " from " + id;
>> }
>> }
>>
>> -
>>
>> public class Application {
>> public static void main(String[] args) {
>> new MicroservicesRunner(8080)
>> .deploy(new HelloService("1"))
>> .start();
>> new MicroservicesRunner(8081)
>> .deploy(new HelloService("2"))
>> .start();
>> new MicroservicesRunner(8082)
>> .deploy(new HelloService("3"))
>> .start();
>> new MicroservicesRunner(8083)
>> .deploy(new HelloService("4"))
>> .start();
>>}
>> }
>> ---
>>
>> Is that not working for you as expected?
>>
>> On Tue, Jan 9, 2018 at 12:26 PM, Irshad Nilam  wrote:
>>
>>> Hi all,
>>>
>>> I am working on integration test for 4 microservices written in MSF4J.
>>>
>>> 1 - A Microservice
>>> 2 - B Microservice
>>> 3 - C Microservice
>>> 4 - D Microservice
>>>
>>> These are implemented in a way to deploy them separately.
>>>
>>> Application code (where we deploy the microservice using microservice
>>> runner) will look similar to this.
>>>
>>>
>>> public class Application {
>>>
>>>
>>> public static void main(String[] args) {
>>>
>>> Application application = new Application();
>>> application.runMS(8081);
>>>
>>> }
>>>
>>> public void runMS(int port) {
>>>
>>> MicroservicesRunner msRunner = new MicroservicesRunner(port);
>>>
>>> msRunner.deploy(new AService())
>>>
>>> .addExceptionMapper(
>>> new AKeyExceptionMapper(),
>>> new AExceptionMapper(),
>>> new NotFoundExceptionMapper())
>>> .start();
>>>
>>> }
>>> }
>>>
>>>
>>> For the integration test, I want to start these four microservices with
>>> the exception mappers. To achieve this, I tried to start this microservice
>>> in separate threads as bellow. (in TestNG Suite)
>>>
>>> //Run A microservice
>>> new Thread(() -> new pathtoA.Application().runMS(8081)).start();
>>>
>>> //Run B microservice
>>> new Thread(() -> new pathtoB.Application().runMs(8082)).start();
>>>
>>> //Run C microservice
>>> new Thread(() -> new pathtoC.Application().runMs(8083)).start();
>>>
>>> //Run D microservice
>>> new Thread(() -> new pathtoD.Application().runMs(8084)).start();
>>>
>>>
>>> *But I'm having a problem wherein all the four ports, only DService is
>>> getting deployed.   AFAIU this is because having multiple *
>>> org.wso2.msf4j.MicroserviceRunner* classes in the same JVM and only one
>>> getting loaded. *
>>>
>>> *I have a requirement where I need to run all 4 microservice in one JVM
>>> because of resource issues. ** Is there a way to achieve this without
>>> going to separate JVM for each service?*
>>>
>>>
>>> Please note those Exception mappers belong to each of the microservice
>>> packages. And should also be tested with integration test. So that I cannot
>>> run these service like this.
>>>
>>> MicroservicesRunner msRunner = new MicroservicesRunner(port1,port2, port3);
>>> microservicesRunner.deploy(serviceA, serviceB, 
>>> serivice3).addExceptionMapper(Amapper, Bmapper, cMapper).start();
>>>
>>>
>>> Thanks and regards.
>>> --
>>> Irshad Nilam
>>> Software Engineering Intern
>>> WSO2
>>>
>>> Email  : irsh...@wso2.com
>>> Mobile :  +94 77 3669262 <077%20366%209262>
>>> 
>>>
>>>
>>
>>
>> --
>> *Afkham Azeez*
>> Senior Director, Platform Architecture; WSO2, Inc.; http://wso2.com
>> Member; Apache Software Foundation; http://www.apache.org/
>> * *
>> *email: **az...@wso2.com* 
>> * cell: +94 77 3320919 <077%20332%200919>blog: **http://blog.afkham.org*
>> 
>> *twitter: **http://twitter.com/afkham_azeez*
>> 
>> *linked-in: 

Re: [Dev] Correct formats of x-www-form-urlencoded

2018-01-09 Thread Keerthika Mahendralingam
Hi Vijitha,

What if the backend expects the x-www-form-urlencoded type payload? In that
case, we can't use multipart/form-data.

Thanks,
Keerthika.

On Thu, Jan 4, 2018 at 1:18 PM, Vijitha Ekanayake  wrote:

> Hi Senduran,
>
> AFAIK, There is no standard documentation on how to convert JSON to
> x-www-form-urlencoded format as key-value pairs. As mentioned by Thusitha,
> When the JSON is getting complicated converting it to the
> x-www-form-urlencoded will also become complicated and may lead to
> inconsistencies over different payloads. Therefore I too think, we should
> use multipart/form-data in such situations.
>
>
> Thanks.
>
> On Thu, Jan 4, 2018 at 11:02 AM, Thusitha Thilina Dayaratne <
> thusithathil...@gmail.com> wrote:
>
>> Hi Senduran,
>>
>> IMHO x-www-form-urlencodedis for simple key value pairs. When the payload
>> is complicated, we should use multipart/form-data instead of
>> x-www-form-urlencoded content type. It can handle any complex complex
>> scenarios that you mentioned.
>>
>> Thanks
>> Thusitha
>>
>> On Wed, Jan 3, 2018 at 4:50 PM, Senduran Balasubramaniyam <
>> sendu...@wso2.com> wrote:
>>
>>> Hi all,
>>>
>>> When an XML or a JSON is converted to  x-www-form-urlencoded format the
>>> key value pair is created.
>>> i.e
>>>
>>> 
>>>   value1
>>>   value2
>>> 
>>>
>>> will be converted to key1=value=value2
>>>
>>> similarly
>>>
>>> {"key1" : "value1", "key2" : "value2"} also get converted to
>>> key1=value=value2
>>>
>>> But what if the XML or JSON is not only having simple key value i.e
>>> having an array or a child element
>>>
>>> for example,
>>> 
>>>   value1
>>>   
>>> subvalue1
>>> subvalue2
>>>   
>>> 
>>>
>>> similarly for JSON like
>>> {"key1" : "value1", "key2" : {"subkey1" : "subvalue1"}} or
>>>
>>> JSON with array
>>> {"key1" : "value1", "key2" : ["arrayvalue1", "arrayvalue2"]}
>>>
>>>
>>> Kindly let me know the available correct formats for
>>> application/x-www-form-urlencoded content type.
>>> Further it will be really helpful if you could point to a specification
>>> or a standard document
>>>
>>> Thanks
>>> Senduran
>>>
>>>
>>> --
>>> *Senduran *
>>> Senior Software Engineer,
>>> WSO2, Inc.;  http://wso2.com/ 
>>> Mobile: +94 77 952 6548 <077%20952%206548>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Vijitha Ekanayake
> Senior Software Engineer*, *WSO2, Inc.; http://wso2.com/
> Mobile : +94 777 24 73 39 | +94 718 74 44 08
> lean.enterprise.middleware
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

Keerthika Mahendralingam
Software Engineer
Mobile :+94 (0) 776 121144
keerth...@wso2.com
WSO2, Inc.
lean . enterprise . middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Separately Using WSO2 as a war File

2018-01-09 Thread Thusitha Thilina Dayaratne
Hi Amin,

AFAIU you want to do something like deploy WSO2 ESB functionality as a
webapp in Tomcat. Is there any specific requirement for do that?
I think WSO2 had a separate webapp mode prior to 4.x kernel but now this is
not continue.
AFAIS main concerns would be

   - Most of the functionalities are coming from jar/bundles inside
   repository/components/plugin directory. So you need to think how to pack
   them if you gonna make it a webapp
   - Directory structure and deployment locations are specific to WSO2
   server

Thanks
Thusitha

On Tue, Jan 9, 2018 at 9:39 PM, Amin, Fakabbir 
wrote:

> Hi Team,
>
>
>
> I wanted to contribute to the open source project and also experiment with
> WSO2 ESB. The structure of projects is not like simple war files.
>
>
>
> More specifically, If I want to experiment with the source code but not
> use the default server deployment method what are the challenges would
> arise.
>
> As deployment on local server by running ./wso2server.sh is good but not
> easy to go on server and already implemented projects.
>
>
>
> Regards,
>
> Amin, Fakabbir
>
> Associate Software Developer
>
> CGI, India
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


--
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MSF4J] Running multiple MicroserviceRunners in a single JVM.

2018-01-09 Thread Thusitha Thilina Dayaratne
Hi Irshad,

As Azeez mentioned this should work out of the box. We are doing same thing
in our test cases as well[1]. You don't have to create a separate thread
since MicroserveRunner internals will do that for you.

[1] -
https://github.com/wso2/msf4j/blob/master/core/src/test/java/org/wso2/msf4j/HttpServerTest.java#L125

Thanks
Thusitha

On Tue, Jan 9, 2018 at 8:40 PM, Afkham Azeez  wrote:

> I tried the following and things worked as expected.
>
> @Path("/hello")
> public class HelloService {
>
> private String id;
>
> public HelloService(String id) {
> this.id = id;
> }
>
> @GET
> @Path("/{name}")
> public String hello(@PathParam("name") String name) {
> System.out.println("Hello");
> return "Hello " + name + " from " + id;
> }
> }
>
> -
>
> public class Application {
> public static void main(String[] args) {
> new MicroservicesRunner(8080)
> .deploy(new HelloService("1"))
> .start();
> new MicroservicesRunner(8081)
> .deploy(new HelloService("2"))
> .start();
> new MicroservicesRunner(8082)
> .deploy(new HelloService("3"))
> .start();
> new MicroservicesRunner(8083)
> .deploy(new HelloService("4"))
> .start();
>}
> }
> ---
>
> Is that not working for you as expected?
>
> On Tue, Jan 9, 2018 at 12:26 PM, Irshad Nilam  wrote:
>
>> Hi all,
>>
>> I am working on integration test for 4 microservices written in MSF4J.
>>
>> 1 - A Microservice
>> 2 - B Microservice
>> 3 - C Microservice
>> 4 - D Microservice
>>
>> These are implemented in a way to deploy them separately.
>>
>> Application code (where we deploy the microservice using microservice
>> runner) will look similar to this.
>>
>>
>> public class Application {
>>
>>
>> public static void main(String[] args) {
>>
>> Application application = new Application();
>> application.runMS(8081);
>>
>> }
>>
>> public void runMS(int port) {
>>
>> MicroservicesRunner msRunner = new MicroservicesRunner(port);
>>
>> msRunner.deploy(new AService())
>>
>> .addExceptionMapper(
>> new AKeyExceptionMapper(),
>> new AExceptionMapper(),
>> new NotFoundExceptionMapper())
>> .start();
>>
>> }
>> }
>>
>>
>> For the integration test, I want to start these four microservices with
>> the exception mappers. To achieve this, I tried to start this microservice
>> in separate threads as bellow. (in TestNG Suite)
>>
>> //Run A microservice
>> new Thread(() -> new pathtoA.Application().runMS(8081)).start();
>>
>> //Run B microservice
>> new Thread(() -> new pathtoB.Application().runMs(8082)).start();
>>
>> //Run C microservice
>> new Thread(() -> new pathtoC.Application().runMs(8083)).start();
>>
>> //Run D microservice
>> new Thread(() -> new pathtoD.Application().runMs(8084)).start();
>>
>>
>> *But I'm having a problem wherein all the four ports, only DService is
>> getting deployed.   AFAIU this is because having multiple *
>> org.wso2.msf4j.MicroserviceRunner* classes in the same JVM and only one
>> getting loaded. *
>>
>> *I have a requirement where I need to run all 4 microservice in one JVM
>> because of resource issues. ** Is there a way to achieve this without
>> going to separate JVM for each service?*
>>
>>
>> Please note those Exception mappers belong to each of the microservice
>> packages. And should also be tested with integration test. So that I cannot
>> run these service like this.
>>
>> MicroservicesRunner msRunner = new MicroservicesRunner(port1,port2, port3);
>> microservicesRunner.deploy(serviceA, serviceB, 
>> serivice3).addExceptionMapper(Amapper, Bmapper, cMapper).start();
>>
>>
>> Thanks and regards.
>> --
>> Irshad Nilam
>> Software Engineering Intern
>> WSO2
>>
>> Email  : irsh...@wso2.com
>> Mobile :  +94 77 3669262 <077%20366%209262>
>> 
>>
>>
>
>
> --
> *Afkham Azeez*
> Senior Director, Platform Architecture; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
> * *
> *email: **az...@wso2.com* 
> * cell: +94 77 3320919 <077%20332%200919>blog: **http://blog.afkham.org*
> 
> *twitter: **http://twitter.com/afkham_azeez*
> 
> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
> *
>
> *Lean . Enterprise . Middleware*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


--
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [EI 6.1.1] WS-Security UsernameToken performance with large messages

2018-01-09 Thread Lahiru Sandaruwan
Hi Devs,

Got a question on $subject. Concern is, if the username token is retrieved
by building the whole message with DOM or it is read up to security header
as in SAX(see [1] for difference) when parsing for authentication.

[2] says,
"Part of this performance hit from WS-Security is due to a flaw in the
Rampart handler implementation, which causes it to convert each request and
response message to Document Object Model (DOM) form any time Rampart is
engaged (even if no security processing is to be done for the message).
This particular issue should be fixed in time for a Rampart 1.5 release to
go along with Axis2 1.5. Depending on how the fix is implemented, it may
substantially improve the times for the UsernameToken test.".

Difference is, when the messages get bigger, DOM model will cause more
latency than SAX.
Anyone can confirm if this was fixed in latest Rampart/Axis2 versions?

[1]
https://stackoverflow.com/questions/6828703/what-is-the-difference-between-sax-and-dom
[2] https://www.ibm.com/developerworks/library/j-jws6/index.html

Thanks.

-- 
--

Lahiru Sandaruwan
Associate Technical Lead,
WSO2 Inc., http://wso2.com

lean.enterprise.middleware

m: +1 901 530 2379
e: lahi...@wso2.com b: https://medium.com/@lahirugmg
in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] IDENTITY-6724 Tests and Documentation

2018-01-09 Thread Omindu Rathnaweera
Hi Isuranga,

Can you also include an example on evaluating a XACML request with the new
policy. Adding the requests and expected responses for authorized and
unauthorized scenarios will make the doc complete.

Thanks,
Omindu.

On Sun, Jan 7, 2018 at 7:25 PM, Darshana Gunawardana 
wrote:

> Thanks Isuranga.
>
> @Ishara: Can we get this merge and included in the next weekly release?
>
> Regards,
>
> On Sat, Jan 6, 2018 at 12:22 PM, Isuranga Perera <
> isurangamper...@gmail.com> wrote:
>
>> Hi,
>>
>> Please find unit tests [2] and documentation [3] related to JIRA [1]
>>
>> [1] https://wso2.org/jira/browse/IDENTITY-6724
>> [2] https://github.com/wso2/balana/pull/83
>> [3] https://docs.google.com/document/d/1s2OFakY6vkcEjyOctY_D
>> TYa5GqAPVr7cHyq2uk2vlM4/edit?usp=sharing
>> 
>>
>>
>> Best Regards
>> Isuranga Perera
>>
>
>
>
> --
> Regards,
>
>
> *Darshana Gunawardana*Technical Lead
> WSO2 Inc.; http://wso2.com
>
> *E-mail: darsh...@wso2.com *
> *Mobile: +94718566859 <+94%2071%20856%206859>*Lean . Enterprise .
> Middleware
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Omindu Rathnaweera
Senior Software Engineer, WSO2 Inc.
Mobile: +94 771 197 211
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Json Array transformation using payloadfactory or enrich mediator. Please guide.

2018-01-09 Thread aditya shivankar
Respected Sir,

Thanks for the reply.
If I select "Source URL Entry", then against Source Url field there is
browse button, which browses my local machine files.
Should I selecting the transform.xslt using it from my local file system.
(i.e. source url is path of xslt on my local machine like
"file:\C:\Users\shivaadi\Desktop\wso2\transform.xslt")
Or Source url should be path in registry project where I uploaded
transform.xslt.
(i.e. like "file:repository/conf/XSL/transform.xsl").

[image: Inline image 1]

If it has to be path in registry, have I mentioned the path correctly "file:
repository/conf/XSL/transform.xsl"  ?

With Regards,
Aditya

On Tue, Jan 9, 2018 at 8:20 PM, Vinod Kavinda  wrote:

> Hi,
> Select the "Source URL Entry" for the "Local entry Type" field's value.
>
> Thanks,
> Vinod
>
> On Tue, Jan 9, 2018 at 7:04 PM, aditya shivankar <
> shivankar.adit...@gmail.com> wrote:
>
>> Respected Sir,
>>
>> I think the screenshots in the mail are not appearing . Please check
>> attachment ( Local entry of xslt ).
>>
>> With Regards,
>> Aditya
>>
>> On Tue, Jan 9, 2018 at 5:04 PM, aditya shivankar <
>> shivankar.adit...@gmail.com> wrote:
>>
>>> Respected Sir,
>>>
>>>
>>> I went through the online docs.
>>>
>>> My xslt is placed in registry project in below structure :
>>>
>>>
>>>
>>>
>>>
>>>  So I think, if not wrong, I need to create local entry like below
>>>
>>>
>>>
>>> >> />
>>>
>>>
>>>
>>> I right clicked on my App project(TestXsltApp)ànewàlocalentry
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Selected “create a new local entry”
>>>
>>>
>>>
>>>
>>>
>>> But here I find no option to configure the local entry like below:
>>>
>>>
>>>
>>> >> />
>>>
>>>  Please find attached file (Local entry of xslt).
>>>
>>> Thanks please guide.
>>>
>>> On Mon, Jan 8, 2018 at 4:42 PM, Vinod Kavinda  wrote:
>>>
 Hi Aditya,
 You need to add the local entry declaration in the registry inside your
 API config. Without that, synapse does not know the location of your xsl.
 Refer [1] for more details.

 

 [1] - https://docs.wso2.com/display/EI611/Working+with+Local+Reg
 istry+Entries

 Regards,
 Vinod

 On Mon, Jan 8, 2018 at 3:36 PM, aditya shivankar <
 shivankar.adit...@gmail.com> wrote:

> Hi,
>
> Thanks for the reply. But I am getting below error trying it. I think
> i am not able to configure xslt properly. followed online docs for
> configuring xslt in wso2 but still not able to. Could you please check my
> steps (attachment named "xsltTest_stepsFollowed.docx" )and correct me.
> Thanks.
>
>
> Error :
>
> [2018-01-08 15:19:35,020] [EI-Core]  WARN - SynapseConfigUtils Cannot
> convert null to a StreamSource
>
> [2018-01-08 15:19:35,020] [EI-Core] ERROR - XSLTMediator Error
> creating XSLT transformer using : Value {name ='null', keyValue
> ='transform'}
>
> *org.apache.synapse.SynapseException*: Cannot convert null to a
> StreamSource
>
>
>
> With Regards,
> Aditya
>
>
>
>
> On Sun, Jan 7, 2018 at 11:49 PM, Eranda Rajapakshe 
> wrote:
>
>> Hi Aditya,
>>
>> You can use XSLT mediator to achieve this, following is a sample
>> configuration I created.
>>
>> 
>>> http://ws.apache.org/ns/synapse;
>>>name="sample"
>>>startOnLoad="true"
>>>statistics="disable"
>>>trace="disable"
>>>transports="http,https">
>>>
>>>   
>>>  >> value="application/json"/>
>>>  
>>>  
>>>   
>>>
>>>
>>> 
>>
>>
>>
>>
>>> http://www.w3.org/1
>>> 999/XSL/Transform">
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>
>>
>>
>> Input will be following,
>>
>>
>>> {
>>> "Children": [
>>> {
>>> "Name": {
>>> "Type": "System.String",
>>> "Value": "Gayle"
>>> },
>>> "Education":{
>>> "Type": "System.String",
>>> "Value": "PostGraduate"
>>> }
>>> },
>>> {
>>> "Name": {
>>> "Type": "System.String",
>>> "Value": "Chris"
>>> },
>>> "Education":{
>>> "Type": "System.String",
>>> "Value": "Graduate"
>>> }
>>> },
>>> {
>>> "Name": {
>>> "Type": "System.String",
>>> "Value": "Steve"
>>> },
>>> "Education":{
>>> "Type": "System.String",
>>> "Value": "PostGraduate"
>>> }
>>> },
>>> {
>>> "Name": {
>>> "Type": "System.String",
>>> "Value": "Stephen"
>>> },
>>> "Education":{
>>> "Type": "System.String",
>>> "Value": 

Re: [Dev] JSON payload being null inside script message context

2018-01-09 Thread Sameera Gunarathne
Hi Milinda,

I have tried the suggestion and that way I can access the message payload.
I can see in the axis2.xml in apim 2.2.0 this configuration is commented
and uses JsonBuilder instead.





Is there any specific reason to use JsonBuilder and what would be the
impact of using JsonStreamBuilder?

Thanks and Regards,

On Tue, Jan 9, 2018 at 8:49 PM, Milinda Perera  wrote:

> Hi Sameera,
>
> Please add JsonStreamBuilder instead of JsonBuilder and try
>
>  class="org.wso2.carbon.integrator.core.json.
> JsonStreamBuilder"/>
>
> Thanks,
> Milinda
>
> On Tue, Jan 9, 2018 at 8:44 PM, Sameera Gunarathne 
> wrote:
>
>> Hi,
>>
>> I'm using a script mediator to get JSON payload inside an API sequence.
>> I'm using a payload as follows.
>>
>> curl -X POST --header 'Content-Type: application/json' --header 'Accept: 
>> application/xml' --header 'Authorization: Bearer 
>> c4f97c6e-60fc-3c26-97ad-48b9c9fa4566' -d '{ \
>>"PhoneNumbers": ["123456789"] \
>>  }' 'https://10.100.7.133:8243/phoneVerify/1.0.0/checkPhoneNumbers
>>
>> I'm accessing the payload inside the script mediator as follows.
>>
>>  
>>  var payload = mc.getPayloadJSON();
>>  
>>
>> There I get following exception at the script mediator on the
>> json payload being null.
>>
>> [2018-01-09 20:37:55,454] ERROR - ScriptMessageContext JSON object is
>> null.
>> [2018-01-09 20:37:55,458] ERROR - ScriptMediator The script engine
>> returned an error executing the inlined js script function mediate
>>
>> but I have looked into the wirelogs and the json message comes to the
>> sequence.
>>
>> [2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
>> "Accept-Language: en-US,en;q=0.9,nl;q=0.8[\r][\n]"
>> [2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
>> "[\r][\n]"
>> [2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
>> "{[\n]"
>> [2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
>> "  *"PhoneNumbers": ["123456789"][\n]"*
>> [2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
>> "}"
>>
>> What could be the reason for this? Any other suggestions to access
>> message context inside a script mediator.
>>
>> Thanks and Regards,
>> Sameera.
>> --
>> Sameera Gunarathne
>> Software Engineer, WSO2 Inc. http://wso2.com
>> 
>> Email: samee...@wso2.com
>> Mobile: +94714155561
>>
>
>
>
> --
> Milinda Perera
> Senior Software Engineer;
> WSO2 Inc. http://wso2.com ,
> Mobile: (+94) 714 115 032 <+94%2071%20411%205032>
>
>


-- 
Sameera Gunarathne
Software Engineer, WSO2 Inc. http://wso2.com

Email: samee...@wso2.com
Mobile: +94714155561
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] JSON payload being null inside script message context

2018-01-09 Thread Milinda Perera
Hi Sameera,

Please add JsonStreamBuilder instead of JsonBuilder and try



Thanks,
Milinda

On Tue, Jan 9, 2018 at 8:44 PM, Sameera Gunarathne 
wrote:

> Hi,
>
> I'm using a script mediator to get JSON payload inside an API sequence.
> I'm using a payload as follows.
>
> curl -X POST --header 'Content-Type: application/json' --header 'Accept: 
> application/xml' --header 'Authorization: Bearer 
> c4f97c6e-60fc-3c26-97ad-48b9c9fa4566' -d '{ \
>"PhoneNumbers": ["123456789"] \
>  }' 'https://10.100.7.133:8243/phoneVerify/1.0.0/checkPhoneNumbers
>
> I'm accessing the payload inside the script mediator as follows.
>
>  
>  var payload = mc.getPayloadJSON();
>  
>
> There I get following exception at the script mediator on the json payload
> being null.
>
> [2018-01-09 20:37:55,454] ERROR - ScriptMessageContext JSON object is null.
> [2018-01-09 20:37:55,458] ERROR - ScriptMediator The script engine
> returned an error executing the inlined js script function mediate
>
> but I have looked into the wirelogs and the json message comes to the
> sequence.
>
> [2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
> "Accept-Language: en-US,en;q=0.9,nl;q=0.8[\r][\n]"
> [2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
> "[\r][\n]"
> [2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
> "{[\n]"
> [2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
> "  *"PhoneNumbers": ["123456789"][\n]"*
> [2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
> "}"
>
> What could be the reason for this? Any other suggestions to access message
> context inside a script mediator.
>
> Thanks and Regards,
> Sameera.
> --
> Sameera Gunarathne
> Software Engineer, WSO2 Inc. http://wso2.com
> 
> Email: samee...@wso2.com
> Mobile: +94714155561
>



-- 
Milinda Perera
Senior Software Engineer;
WSO2 Inc. http://wso2.com ,
Mobile: (+94) 714 115 032
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] JSON payload being null inside script message context

2018-01-09 Thread Sameera Gunarathne
Hi,

I'm using a script mediator to get JSON payload inside an API sequence. I'm
using a payload as follows.

curl -X POST --header 'Content-Type: application/json' --header
'Accept: application/xml' --header 'Authorization: Bearer
c4f97c6e-60fc-3c26-97ad-48b9c9fa4566' -d '{ \
   "PhoneNumbers": ["123456789"] \
 }' 'https://10.100.7.133:8243/phoneVerify/1.0.0/checkPhoneNumbers

I'm accessing the payload inside the script mediator as follows.

 
 var payload = mc.getPayloadJSON();
 

There I get following exception at the script mediator on the json payload
being null.

[2018-01-09 20:37:55,454] ERROR - ScriptMessageContext JSON object is null.
[2018-01-09 20:37:55,458] ERROR - ScriptMediator The script engine returned
an error executing the inlined js script function mediate

but I have looked into the wirelogs and the json message comes to the
sequence.

[2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
"Accept-Language: en-US,en;q=0.9,nl;q=0.8[\r][\n]"
[2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
"[\r][\n]"
[2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
"{[\n]"
[2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
"  *"PhoneNumbers": ["123456789"][\n]"*
[2018-01-09 20:37:55,445] DEBUG - wire HTTPS-Listener I/O dispatcher-6 >>
"}"

What could be the reason for this? Any other suggestions to access message
context inside a script mediator.

Thanks and Regards,
Sameera.
-- 
Sameera Gunarathne
Software Engineer, WSO2 Inc. http://wso2.com

Email: samee...@wso2.com
Mobile: +94714155561
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Json Array transformation using payloadfactory or enrich mediator. Please guide.

2018-01-09 Thread Vinod Kavinda
Hi,
Select the "Source URL Entry" for the "Local entry Type" field's value.

Thanks,
Vinod

On Tue, Jan 9, 2018 at 7:04 PM, aditya shivankar <
shivankar.adit...@gmail.com> wrote:

> Respected Sir,
>
> I think the screenshots in the mail are not appearing . Please check
> attachment ( Local entry of xslt ).
>
> With Regards,
> Aditya
>
> On Tue, Jan 9, 2018 at 5:04 PM, aditya shivankar <
> shivankar.adit...@gmail.com> wrote:
>
>> Respected Sir,
>>
>>
>> I went through the online docs.
>>
>> My xslt is placed in registry project in below structure :
>>
>>
>>
>>
>>
>>  So I think, if not wrong, I need to create local entry like below
>>
>>
>>
>> > />
>>
>>
>>
>> I right clicked on my App project(TestXsltApp)ànewàlocalentry
>>
>>
>>
>>
>>
>>
>>
>> Selected “create a new local entry”
>>
>>
>>
>>
>>
>> But here I find no option to configure the local entry like below:
>>
>>
>>
>> > />
>>
>>  Please find attached file (Local entry of xslt).
>>
>> Thanks please guide.
>>
>> On Mon, Jan 8, 2018 at 4:42 PM, Vinod Kavinda  wrote:
>>
>>> Hi Aditya,
>>> You need to add the local entry declaration in the registry inside your
>>> API config. Without that, synapse does not know the location of your xsl.
>>> Refer [1] for more details.
>>>
>>> 
>>>
>>> [1] - https://docs.wso2.com/display/EI611/Working+with+Local+Reg
>>> istry+Entries
>>>
>>> Regards,
>>> Vinod
>>>
>>> On Mon, Jan 8, 2018 at 3:36 PM, aditya shivankar <
>>> shivankar.adit...@gmail.com> wrote:
>>>
 Hi,

 Thanks for the reply. But I am getting below error trying it. I think i
 am not able to configure xslt properly. followed online docs for
 configuring xslt in wso2 but still not able to. Could you please check my
 steps (attachment named "xsltTest_stepsFollowed.docx" )and correct me.
 Thanks.


 Error :

 [2018-01-08 15:19:35,020] [EI-Core]  WARN - SynapseConfigUtils Cannot
 convert null to a StreamSource

 [2018-01-08 15:19:35,020] [EI-Core] ERROR - XSLTMediator Error creating
 XSLT transformer using : Value {name ='null', keyValue ='transform'}

 *org.apache.synapse.SynapseException*: Cannot convert null to a
 StreamSource



 With Regards,
 Aditya




 On Sun, Jan 7, 2018 at 11:49 PM, Eranda Rajapakshe 
 wrote:

> Hi Aditya,
>
> You can use XSLT mediator to achieve this, following is a sample
> configuration I created.
>
> 
>> http://ws.apache.org/ns/synapse;
>>name="sample"
>>startOnLoad="true"
>>statistics="disable"
>>trace="disable"
>>transports="http,https">
>>
>>   
>>  > value="application/json"/>
>>  
>>  
>>   
>>
>>
>> 
>
>
>
>
>> http://www.w3.org/1
>> 999/XSL/Transform">
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>
>
>
> Input will be following,
>
>
>> {
>> "Children": [
>> {
>> "Name": {
>> "Type": "System.String",
>> "Value": "Gayle"
>> },
>> "Education":{
>> "Type": "System.String",
>> "Value": "PostGraduate"
>> }
>> },
>> {
>> "Name": {
>> "Type": "System.String",
>> "Value": "Chris"
>> },
>> "Education":{
>> "Type": "System.String",
>> "Value": "Graduate"
>> }
>> },
>> {
>> "Name": {
>> "Type": "System.String",
>> "Value": "Steve"
>> },
>> "Education":{
>> "Type": "System.String",
>> "Value": "PostGraduate"
>> }
>> },
>> {
>> "Name": {
>> "Type": "System.String",
>> "Value": "Stephen"
>> },
>> "Education":{
>> "Type": "System.String",
>> "Value": "Graduate"
>> }
>> }
>> ]
>> }
>
>
>
> Output:
>
> {
>> "Childern": {
>> "Gayle": "PostGraduate",
>> "Chris": "Graduate",
>> "Steve": "PostGraduate",
>> "Stephen": "Graduate"
>> }
>> }
>
>
>
> Thanks,
>
>
> On Sun, Jan 7, 2018 at 6:23 PM, aditya shivankar <
> shivankar.adit...@gmail.com> wrote:
>
>> Respected Sir,
>>
>> I have response from one external service something like below,
>> indicating children name and education.
>> Each time i call this service with different input, it returns me few
>> children( number of children returned could be different each time
>> depending on my request data ).
>>
>>
>> Service Response(which needs to be transformed)
>> {
>> "Children": [
>> {
>> "Name": {
>> "Type": 

[Dev] Separately Using WSO2 as a war File

2018-01-09 Thread Amin, Fakabbir
Hi Team,

I wanted to contribute to the open source project and also experiment with WSO2 
ESB. The structure of projects is not like simple war files.

More specifically, If I want to experiment with the source code but not use the 
default server deployment method what are the challenges would arise.
As deployment on local server by running ./wso2server.sh is good but not easy 
to go on server and already implemented projects.

Regards,
Amin, Fakabbir
Associate Software Developer
CGI, India
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MSF4J] Running multiple MicroserviceRunners in a single JVM.

2018-01-09 Thread Afkham Azeez
I tried the following and things worked as expected.

@Path("/hello")
public class HelloService {

private String id;

public HelloService(String id) {
this.id = id;
}

@GET
@Path("/{name}")
public String hello(@PathParam("name") String name) {
System.out.println("Hello");
return "Hello " + name + " from " + id;
}
}

-

public class Application {
public static void main(String[] args) {
new MicroservicesRunner(8080)
.deploy(new HelloService("1"))
.start();
new MicroservicesRunner(8081)
.deploy(new HelloService("2"))
.start();
new MicroservicesRunner(8082)
.deploy(new HelloService("3"))
.start();
new MicroservicesRunner(8083)
.deploy(new HelloService("4"))
.start();
   }
}
---

Is that not working for you as expected?

On Tue, Jan 9, 2018 at 12:26 PM, Irshad Nilam  wrote:

> Hi all,
>
> I am working on integration test for 4 microservices written in MSF4J.
>
> 1 - A Microservice
> 2 - B Microservice
> 3 - C Microservice
> 4 - D Microservice
>
> These are implemented in a way to deploy them separately.
>
> Application code (where we deploy the microservice using microservice
> runner) will look similar to this.
>
>
> public class Application {
>
>
> public static void main(String[] args) {
>
> Application application = new Application();
> application.runMS(8081);
>
> }
>
> public void runMS(int port) {
>
> MicroservicesRunner msRunner = new MicroservicesRunner(port);
>
> msRunner.deploy(new AService())
>
> .addExceptionMapper(
> new AKeyExceptionMapper(),
> new AExceptionMapper(),
> new NotFoundExceptionMapper())
> .start();
>
> }
> }
>
>
> For the integration test, I want to start these four microservices with
> the exception mappers. To achieve this, I tried to start this microservice
> in separate threads as bellow. (in TestNG Suite)
>
> //Run A microservice
> new Thread(() -> new pathtoA.Application().runMS(8081)).start();
>
> //Run B microservice
> new Thread(() -> new pathtoB.Application().runMs(8082)).start();
>
> //Run C microservice
> new Thread(() -> new pathtoC.Application().runMs(8083)).start();
>
> //Run D microservice
> new Thread(() -> new pathtoD.Application().runMs(8084)).start();
>
>
> *But I'm having a problem wherein all the four ports, only DService is
> getting deployed.   AFAIU this is because having multiple *org.wso2.msf4j.
> MicroserviceRunner* classes in the same JVM and only one getting loaded. *
>
> *I have a requirement where I need to run all 4 microservice in one JVM
> because of resource issues. ** Is there a way to achieve this without
> going to separate JVM for each service?*
>
>
> Please note those Exception mappers belong to each of the microservice
> packages. And should also be tested with integration test. So that I cannot
> run these service like this.
>
> MicroservicesRunner msRunner = new MicroservicesRunner(port1,port2, port3);
> microservicesRunner.deploy(serviceA, serviceB, 
> serivice3).addExceptionMapper(Amapper, Bmapper, cMapper).start();
>
>
> Thanks and regards.
> --
> Irshad Nilam
> Software Engineering Intern
> WSO2
>
> Email  : irsh...@wso2.com
> Mobile :  +94 77 3669262 <077%20366%209262>
> 
>
>


-- 
*Afkham Azeez*
Senior Director, Platform Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* *
*email: **az...@wso2.com* 
* cell: +94 77 3320919blog: **http://blog.afkham.org*

*twitter: **http://twitter.com/afkham_azeez*

*linked-in: **http://lk.linkedin.com/in/afkhamazeez
*

*Lean . Enterprise . Middleware*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [C5] Setting TrustStore and KeyStore as Java System properties

2018-01-09 Thread Malintha Amarasinghe
Hi All,

Have we decided a way forward for this?

Is it possible to introduce a new config to read it and set this globally
from java level as system properties via carbon-transport as Niranjan
suggested?

Thanks!


On Tue, Dec 5, 2017 at 3:24 PM, Bhathiya Jayasekara 
wrote:

> Hi Dulanja,
>
> C5 kernel does have a keystore, but not a truststore. So we're using a
> temporary trustmanager[1] to trust all certificates at the moment until a
> platform-wide solution is implemented. We raised the concern in [2].
>
> [1] https://github.com/wso2/carbon-apimgt/blob/master/compon
> ents/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/
> wso2/carbon/apimgt/core/util/AMSSLSocketFactory.java#L108
> [2] "[C5] SSLSocketFactory and HostnameVerifier implementations"
>
> Thanks,
> Bhathiya
>
> On Tue, Dec 5, 2017 at 3:10 PM, Dulanja Liyanage  wrote:
>
>> Thanks Niranjan.
>>
>> We need to decide this soon, because Stream Processor will get released
>> in this month, and they will have to write their own module if this is not
>> coming from a common place. This will be same for all the C5 based
>> products. IMO that's unnecessary duplication.
>>
>> How is AM 3.0.0 doing this right now?
>>
>>
>> On Mon, Dec 4, 2017 at 11:31 AM, Niranjan Karunanandham <
>> niran...@wso2.com> wrote:
>>
>>> Hi Dulanja,
>>>
>>> On Wed, Nov 29, 2017 at 8:29 PM, Dulanja Liyanage 
>>> wrote:
>>>
 Hi Abimaran,

 I'm actually talking about the following two System properties. They
 are used only for SSL:

- javax.net.ssl.keyStore
- javax.net.ssl.trustStore

 IIRC these were set during the bootstrap time in C4.

 Thanks,
 Dulanja


 On Wed, Nov 29, 2017 at 5:18 PM, Abimaran Kugathasan  wrote:

> Hi Dulanja,
>
> If we set these keystores through system properties, we will be losing
> the flexibility of having different keystore for different purposes like
> SSL, JWT signing, etc.
>
> On Wed, Nov 29, 2017 at 4:09 PM, Dulanja Liyanage 
> wrote:
>
>> Hi All,
>>
>> From the conversations I had with some of the developers, it seems
>> $subject is not done from the kernel level. Is my understanding correct?
>>
>> If so, any particular reason for not doing this from the kernel
>> level?
>>
>
>>> As I remember there was a mail thread on this. In C5, the kernel does
>>> not have transports in it. IMO this should be from the component which is
>>> bringing in keystores. If am not mistaken, this should come from the
>>> carbon-transports.
>>>
>>>

>> Thanks,
>> Dulanja
>>
>> --
>> Thanks & Regards,
>> Dulanja Liyanage
>> Lead, Platform Security Team
>> WSO2 Inc.
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thanks
> Abimaran Kugathasan
> Senior Software Engineer - API Technologies
>
> Email : abima...@wso2.com
> Mobile : +94 773922820 <077%20392%202820>
>
> 
> 
>   
> 
>
>


 --
 Thanks & Regards,
 Dulanja Liyanage
 Lead, Platform Security Team
 WSO2 Inc.

>>>
>>> Regards,
>>> Nira
>>>
>>> --
>>>
>>>
>>> *Niranjan Karunanandham*
>>> Associate Technical Lead - WSO2 Inc.
>>> WSO2 Inc.: http://www.wso2.com
>>>
>>>
>>
>>
>> --
>> Thanks & Regards,
>> Dulanja Liyanage
>> Lead, Platform Security Team
>> WSO2 Inc.
>>
>
>
>
> --
> *Bhathiya Jayasekara*
> *Associate Technical Lead,*
> *WSO2 inc., http://wso2.com *
>
> *Phone: +94715478185 <+94%2071%20547%208185>*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
> *
> *Twitter: https://twitter.com/bhathiyax *
> *Blog: http://movingaheadblog.blogspot.com
> *
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Malintha Amarasinghe
*WSO2, Inc. - lean | enterprise | middleware*
http://wso2.com/

Mobile : +94 712383306 <+94%2071%20238%203306>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 Stream Processor 4.0.0 RC2

2018-01-09 Thread SajithAR Ariyarathna
Hi All,

PR https://github.com/wso2/carbon-kernel/pull/1668 has been raised to fix
this issue in Carbon Kernel.

Thanks.

On Mon, Jan 8, 2018 at 11:01 AM, Rukshani Weerasinha 
wrote:

> Hello Raveen,
>
> Thank you for the feedback. Now I have updated the link as you specified.
>
> Best Regards,
> Rukshani.
>
> On Fri, Jan 5, 2018 at 12:43 PM, Raveen Rathnayake 
> wrote:
>
>> Hi Rukshani,
>>
>> It would be idle if you can remove windows central link and point to [1]
>> as the reference for bash installation since [1] is from Microsoft. Others
>> details are fine.
>>
>> [1] https://docs.microsoft.com/en-us/windows/wsl/install-win10
>>
>> Thanks.
>> Raveen.
>>
>> On Fri, Jan 5, 2018 at 12:30 PM, Rukshani Weerasinha 
>> wrote:
>>
>>> Hello Raveen,
>>>
>>> I made a change to this documentation correction. I added a sub-section
>>> named "Installing the Bash Command Line features" and added the following
>>> text.
>>>
>>> "When you install the *Windows sub system for Linux(beta)* feature in
>>> Windows 10, it results in a partial installation of *bash Shell Command
>>> Line*. When all the bash features are not available, you may be unable
>>> to run WSO2 SP on Windows. To complete the installation, you can issue the
>>> bash command from the Command Prompt. For detailed instructions to do
>>> this, see Windows Central documentation -How to install Bash shell
>>> command-line tool on Windows 10
>>> 
>>> . "
>>>
>>> Please verify whether this is correct.
>>>
>>> Best Regards,
>>> Rukshani.
>>>
>>> On Fri, Jan 5, 2018 at 12:15 PM, Rukshani Weerasinha 
>>> wrote:
>>>
 Hello Raveen,

 I added this information note to [1]. Can you please verify it?

 When you install the *Windows sub system for Linux(beta)* feature in
 Windows 10, it results in a partial installation of *bash Shell
 Command Line*. When all the bash features are not available, you may
 be unable to run WSO2 SP on Windows. Therefore, you are required to
 uninstall the *Windows sub system for Linux(beta)* feature, and then
 re-install the *bash Shell Command Line*. For detailed instructions to
 do this, see Windows Central documentation -How to install Bash shell
 command-line tool on Windows 10
 
 .


 [1] https://docs.wso2.com/display/SP400/Installing+on+Windows

 Best Regards,
 Rukshani.

 On Thu, Jan 4, 2018 at 10:49 AM, Raveen Rathnayake 
 wrote:

> Hi all,
>
> Sorry for sending the same mail again and again. This was happened due
> to a failure in the public mailing lists. All the mails sent to public
> mailing lists were blocked(even though directly ccd person got the mail).
> So I have sent the same mail multiple times by the request of the infra
> team so that they can test the situation. Now they have recovered the
> system so that all the sent mails are delivered.
>
> Sorry for the inconvenience caused.
>
> Thank you.
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 Rukshani Weerasinha

 WSO2 Inc.
 Web:http://wso2.com
 Mobile: 0777 683 738


>>>
>>>
>>> --
>>> Rukshani Weerasinha
>>>
>>> WSO2 Inc.
>>> Web:http://wso2.com
>>> Mobile: 0777 683 738
>>>
>>>
>>
>>
>> --
>> Raveen Savinda Rathnayake,
>> Software Engineering Intern,
>> WSO2 Inc.
>>
>> *lean. enterprise. middleware  *
>> Web: www.WSO2.com Mobile : +94771144549  Blog : https://blog.raveen.me
>>
>> 
>>
>> 
>>
>
>
>
> --
> Rukshani Weerasinha
>
> WSO2 Inc.
> Web:http://wso2.com
> Mobile: 0777 683 738
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Sajith Janaprasad Ariyarathna
Senior Software Engineer; WSO2, Inc.;  http://wso2.com/

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev