Re: [Dev] No Error Code in WSO2 ESB for nack from RabbitMQ

2018-08-23 Thread Niranjan Karunanandham
Hi Devs,

I have verified this in WSO2EI 6.3.0 and I can see the same behavior. I
have created a git issue[1] which contains the same API to test this. [2]
is the exception that occurs for the sample and in that the ERROR CODE is
0.
I have sent a PR [3] which handles this exception and sets the Error Code
as 401003 (Non-Blocking Call Failure) and com.rabbitmq.client exception
message as the Error Message.

[1] - https://github.com/wso2/wso2-synapse/issues/1157

[2] -
[-XX-XX XX:XX:XX,XXX] [EI-Core] ERROR - RabbitMQMessageSender Error
while publishing the message
java.io.IOException: nacks received
at com.rabbitmq.client.impl.ChannelN.waitForConfirmsOrDie(ChannelN.java:226)
at com.rabbitmq.client.impl.ChannelN.waitForConfirmsOrDie(ChannelN.java:214)
at
com.rabbitmq.client.impl.recovery.AutorecoveringChannel.waitForConfirmsOrDie(AutorecoveringChannel.java:533)
at
org.apache.axis2.transport.rabbitmq.RabbitMQMessageSender.publish(RabbitMQMessageSender.java:264)
at
org.apache.axis2.transport.rabbitmq.RabbitMQMessageSender.send(RabbitMQMessageSender.java:83)
at
org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendOverAMQP(RabbitMQSender.java:108)
at
org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendMessage(RabbitMQSender.java:83)
at
org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at
org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at
org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:603)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:85)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:547)
at
org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:384)
at
org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
at
org.apache.synapse.mediators.builtin.CallMediator.handleNonBlockingCall(CallMediator.java:276)
at
org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:121)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.rest.Resource.process(Resource.java:351)
at org.apache.synapse.rest.API.process(API.java:399)
at
org.apache.synapse.rest.RESTRequestHandler.apiProcess(RESTRequestHandler.java:123)
at
org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:101)
at
org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:69)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:303)
at
org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:92)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at
org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:337)
at
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:158)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[-XX-XX XX:XX:XX,XXX] [EI-Core] ERROR - RabbitMQSender Error occurred
while sending message out
org.apache.axis2.transport.rabbitmq.utils.AxisRabbitMQException: Error
while publishing the message
at
org.apache.axis2.transport.rabbitmq.RabbitMQMessageSender.handleException(RabbitMQMessageSender.java:327)
at
org.apache.axis2.transport.rabbitmq.RabbitMQMessageSender.publish(RabbitMQMessageSender.java:268)
at
org.apache.axis2.transport.rabbitmq.RabbitMQMessageSender.send(RabbitMQMessageSender.java:83)
at
org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendOverAMQP(RabbitMQSender.java:108)
at
org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendMessage(RabbitMQSender.java:83)
at
org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at
org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at
org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:603)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:85)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:547)
at
org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:384)
at

Re: [Dev] Two Way TCP in wso 2 ESB

2018-08-23 Thread Amit Gupta
Hi ,

I do agree that OUT_ONLY should not be used however if i do not use the
property OUT_ONLY then the request is not reaching to the server.I know
that's strange but the request is not landing if we are not using OUT_ONLY.
Should i modify the java code for server side program ?

Regards,

Amit Gupta

On Thu, Aug 23, 2018 at 5:02 PM Thishani Lucas  wrote:

> Hi Amit,
>
> We should not have the OUT_ONLY property if we're expecting a response
> from the backend.
>
> You can debug through TCPTransportSender [1] code and modify your server
> accordingly.
>
> [1]
> https://github.com/wso2/wso2-axis2-transports/blob/master/modules/tcp/src/org/apache/axis2/transport/tcp/TCPTransportSender.java
>
> Thanks,
> Thishani
>
> On Thu, Aug 23, 2018 at 7:49 PM, Amit Gupta 
> wrote:
>
>> HI ,
>>
>> I enabled wire logs and below are the logs.
>>
>> [2018-08-23 16:16:14,601] [] DEBUG - wire HTTP-Listener I/O dispatcher-4
>> >> "GET /scale/scale HTTP/1.1[\r][\n]"
>> [2018-08-23 16:16:14,601] [] DEBUG - wire HTTP-Listener I/O dispatcher-4
>> >> "Accept-Encoding: gzip,deflate[\r][\n]"
>> [2018-08-23 16:16:14,605] [] DEBUG - wire HTTP-Listener I/O dispatcher-4
>> >> "Host: 192.168.80.87:8280[\r][\n]"
>> [2018-08-23 16:16:14,607] [] DEBUG - wire HTTP-Listener I/O dispatcher-4
>> >> "Connection: Keep-Alive[\r][\n]"
>> [2018-08-23 16:16:14,608] [] DEBUG - wire HTTP-Listener I/O dispatcher-4
>> >> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
>> [2018-08-23 16:16:14,609] [] DEBUG - wire HTTP-Listener I/O dispatcher-4
>> >> "[\r][\n]"
>> [2018-08-23 16:16:14,610] [] DEBUG - headers http-incoming-4 >> GET
>> /scale/scale HTTP/1.1
>> [2018-08-23 16:16:14,610] [] DEBUG - headers http-incoming-4 >>
>> Accept-Encoding: gzip,deflate
>> [2018-08-23 16:16:14,611] [] DEBUG - headers http-incoming-4 >> Host:
>> 192.168.80.87:8280
>> [2018-08-23 16:16:14,611] [] DEBUG - headers http-incoming-4 >>
>> Connection: Keep-Alive
>> [2018-08-23 16:16:14,612] [] DEBUG - headers http-incoming-4 >>
>> User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
>>
>> I don't exactly know what is the problem, as i do see that the message is
>> landing on the TCP server and the TCP server is replying however the same i
>> am unable ti get in wso2 esb, is there any property which i need to set so
>> that it works in a synchronous manner.
>>
>>
>>
>> Regards,
>>
>> Amit Gupta
>>
>> On Thu, Aug 23, 2018 at 2:29 PM Amit Gupta 
>> wrote:
>>
>>> Hi ,
>>>
>>> I am working on TCP socket communcation with wso2 ESB.
>>>
>>> I was able to send message to TCP server however once the TCP server is
>>> replying back i cannot see the message in wso3 esb, could you please help
>>> me with this.
>>>
>>> API :
>>>
>>> http://ws.apache.org/ns/synapse; name="ScalesAPI"
>>> context="/scale">
>>>
>>>   
>>>  >> action="remove"/>
>>>  
>>>  
>>> lt;RNgt;
>>> 
>>>  
>>>  
>>> 
>>>
>>> 
>>>  
>>>  
>>> 
>>>  
>>>   
>>>   
>>>  
>>> 
>>>  
>>>   
>>>
>>> 
>>>
>>>
>>>
>>> JAVA Code :
>>> public class TCPServer {
>>>
>>> public static void main(String[] args) throws Exception {
>>> String clientSentence;
>>> String name = "Amit";
>>>   String capitalizedSentence = " 00 23 ";
>>>   ServerSocket welcomeSocket = new ServerSocket(8915);
>>>
>>>   while (true) {
>>>Socket connectionSocket = welcomeSocket.accept();
>>>BufferedReader inFromClient =
>>> new BufferedReader(new
>>> InputStreamReader(connectionSocket.getInputStream()));
>>>DataOutputStream outToClient = new
>>> DataOutputStream(connectionSocket.getOutputStream());
>>>clientSentence = inFromClient.readLine();
>>>System.out.println("Received: " + clientSentence);
>>>   // capitalizedSentence = clientSentence.toUpperCase() + 'n';
>>>System.out.println("Received1: " + clientSentence);
>>>   //outToClient.writeBytes(capitalizedSentence);
>>>
>>>PrintStream p = new PrintStream(connectionSocket.getOutputStream());
>>>
>>>p.println(capitalizedSentence);
>>>
>>>outToClient.close();
>>>System.out.println("Received2: " + clientSentence);
>>>inFromClient.close();
>>>connectionSocket.close();
>>>   }
>>>
>>> }
>>>
>>> }
>>>
>>>
>>>
>>> Logs :
>>>
>>> [2018-08-23 14:28:54,732] []  INFO - LogMediator After Call = >> version='1.0' encoding='utf-8'?>http://www.w3.org/2003/05/soap-envelope;>>> xmlns:axis2ns43="http://ws.apache.org/commons/ns/payload
>>> ">lt;RNgt;
>>>
>>>
>>>
>>>
>>> Regards,
>>>
>>> Amit Gupta
>>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Thishani Lucas*
> *Software Engineer*
> *WSO2 Lanka (Private) Limited**: http://wso2.com *
> *lean.enterprise.middle-ware*
>
> *Tel: +94 77 2556931 *
>
> *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
> 

Re: [Dev] Two Way TCP in wso 2 ESB

2018-08-23 Thread Thishani Lucas
Hi Amit,

We should not have the OUT_ONLY property if we're expecting a response from
the backend.

You can debug through TCPTransportSender [1] code and modify your server
accordingly.

[1]
https://github.com/wso2/wso2-axis2-transports/blob/master/modules/tcp/src/org/apache/axis2/transport/tcp/TCPTransportSender.java

Thanks,
Thishani

On Thu, Aug 23, 2018 at 7:49 PM, Amit Gupta  wrote:

> HI ,
>
> I enabled wire logs and below are the logs.
>
> [2018-08-23 16:16:14,601] [] DEBUG - wire HTTP-Listener I/O dispatcher-4
> >> "GET /scale/scale HTTP/1.1[\r][\n]"
> [2018-08-23 16:16:14,601] [] DEBUG - wire HTTP-Listener I/O dispatcher-4
> >> "Accept-Encoding: gzip,deflate[\r][\n]"
> [2018-08-23 16:16:14,605] [] DEBUG - wire HTTP-Listener I/O dispatcher-4
> >> "Host: 192.168.80.87:8280[\r][\n]"
> [2018-08-23 16:16:14,607] [] DEBUG - wire HTTP-Listener I/O dispatcher-4
> >> "Connection: Keep-Alive[\r][\n]"
> [2018-08-23 16:16:14,608] [] DEBUG - wire HTTP-Listener I/O dispatcher-4
> >> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
> [2018-08-23 16:16:14,609] [] DEBUG - wire HTTP-Listener I/O dispatcher-4
> >> "[\r][\n]"
> [2018-08-23 16:16:14,610] [] DEBUG - headers http-incoming-4 >> GET
> /scale/scale HTTP/1.1
> [2018-08-23 16:16:14,610] [] DEBUG - headers http-incoming-4 >>
> Accept-Encoding: gzip,deflate
> [2018-08-23 16:16:14,611] [] DEBUG - headers http-incoming-4 >> Host:
> 192.168.80.87:8280
> [2018-08-23 16:16:14,611] [] DEBUG - headers http-incoming-4 >>
> Connection: Keep-Alive
> [2018-08-23 16:16:14,612] [] DEBUG - headers http-incoming-4 >>
> User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
>
> I don't exactly know what is the problem, as i do see that the message is
> landing on the TCP server and the TCP server is replying however the same i
> am unable ti get in wso2 esb, is there any property which i need to set so
> that it works in a synchronous manner.
>
>
>
> Regards,
>
> Amit Gupta
>
> On Thu, Aug 23, 2018 at 2:29 PM Amit Gupta 
> wrote:
>
>> Hi ,
>>
>> I am working on TCP socket communcation with wso2 ESB.
>>
>> I was able to send message to TCP server however once the TCP server is
>> replying back i cannot see the message in wso3 esb, could you please help
>> me with this.
>>
>> API :
>>
>> http://ws.apache.org/ns/synapse; name="ScalesAPI"
>> context="/scale">
>>
>>   
>>  
>>  
>>  
>> lt;RNgt;
>> 
>>  
>>  
>> 
>>
>> 
>>  
>>  
>> 
>>  
>>   
>>   
>>  
>> 
>>  
>>   
>>
>> 
>>
>>
>>
>> JAVA Code :
>> public class TCPServer {
>>
>> public static void main(String[] args) throws Exception {
>> String clientSentence;
>> String name = "Amit";
>>   String capitalizedSentence = " 00 23 ";
>>   ServerSocket welcomeSocket = new ServerSocket(8915);
>>
>>   while (true) {
>>Socket connectionSocket = welcomeSocket.accept();
>>BufferedReader inFromClient =
>> new BufferedReader(new InputStreamReader(connectionSocket.
>> getInputStream()));
>>DataOutputStream outToClient = new DataOutputStream(connectionSocket.
>> getOutputStream());
>>clientSentence = inFromClient.readLine();
>>System.out.println("Received: " + clientSentence);
>>   // capitalizedSentence = clientSentence.toUpperCase() + 'n';
>>System.out.println("Received1: " + clientSentence);
>>   //outToClient.writeBytes(capitalizedSentence);
>>
>>PrintStream p = new PrintStream(connectionSocket.getOutputStream());
>>
>>p.println(capitalizedSentence);
>>
>>outToClient.close();
>>System.out.println("Received2: " + clientSentence);
>>inFromClient.close();
>>connectionSocket.close();
>>   }
>>
>> }
>>
>> }
>>
>>
>>
>> Logs :
>>
>> [2018-08-23 14:28:54,732] []  INFO - LogMediator After Call = > version='1.0' encoding='utf-8'?>http://www.w3.org/2003/05/soap-envelope;>> xmlns:axis2ns43="http://ws.apache.org/commons/ns/payload;
>> >lt;RNgt;
>>
>>
>>
>>
>> Regards,
>>
>> Amit Gupta
>>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Thishani Lucas*
*Software Engineer*
*WSO2 Lanka (Private) Limited**: http://wso2.com *
*lean.enterprise.middle-ware*

*Tel: +94 77 2556931 *

*LinkedIn: https://www.linkedin.com/in/thishani-lucas/
*



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


Re: [Dev] Two Way TCP in wso 2 ESB

2018-08-23 Thread Amit Gupta
HI ,

I enabled wire logs and below are the logs.

[2018-08-23 16:16:14,601] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >>
"GET /scale/scale HTTP/1.1[\r][\n]"
[2018-08-23 16:16:14,601] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >>
"Accept-Encoding: gzip,deflate[\r][\n]"
[2018-08-23 16:16:14,605] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >>
"Host: 192.168.80.87:8280[\r][\n]"
[2018-08-23 16:16:14,607] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >>
"Connection: Keep-Alive[\r][\n]"
[2018-08-23 16:16:14,608] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >>
"User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
[2018-08-23 16:16:14,609] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >>
"[\r][\n]"
[2018-08-23 16:16:14,610] [] DEBUG - headers http-incoming-4 >> GET
/scale/scale HTTP/1.1
[2018-08-23 16:16:14,610] [] DEBUG - headers http-incoming-4 >>
Accept-Encoding: gzip,deflate
[2018-08-23 16:16:14,611] [] DEBUG - headers http-incoming-4 >> Host:
192.168.80.87:8280
[2018-08-23 16:16:14,611] [] DEBUG - headers http-incoming-4 >> Connection:
Keep-Alive
[2018-08-23 16:16:14,612] [] DEBUG - headers http-incoming-4 >> User-Agent:
Apache-HttpClient/4.1.1 (java 1.5)

I don't exactly know what is the problem, as i do see that the message is
landing on the TCP server and the TCP server is replying however the same i
am unable ti get in wso2 esb, is there any property which i need to set so
that it works in a synchronous manner.



Regards,

Amit Gupta

On Thu, Aug 23, 2018 at 2:29 PM Amit Gupta  wrote:

> Hi ,
>
> I am working on TCP socket communcation with wso2 ESB.
>
> I was able to send message to TCP server however once the TCP server is
> replying back i cannot see the message in wso3 esb, could you please help
> me with this.
>
> API :
>
> http://ws.apache.org/ns/synapse; name="ScalesAPI"
> context="/scale">
>
>   
>  
>  
>  
> lt;RNgt;
> 
>  
>  
> 
>
> 
>  
>  
> 
>  
>   
>   
>  
> 
>  
>   
>
> 
>
>
>
> JAVA Code :
> public class TCPServer {
>
> public static void main(String[] args) throws Exception {
> String clientSentence;
> String name = "Amit";
>   String capitalizedSentence = " 00 23 ";
>   ServerSocket welcomeSocket = new ServerSocket(8915);
>
>   while (true) {
>Socket connectionSocket = welcomeSocket.accept();
>BufferedReader inFromClient =
> new BufferedReader(new
> InputStreamReader(connectionSocket.getInputStream()));
>DataOutputStream outToClient = new
> DataOutputStream(connectionSocket.getOutputStream());
>clientSentence = inFromClient.readLine();
>System.out.println("Received: " + clientSentence);
>   // capitalizedSentence = clientSentence.toUpperCase() + 'n';
>System.out.println("Received1: " + clientSentence);
>   //outToClient.writeBytes(capitalizedSentence);
>
>PrintStream p = new PrintStream(connectionSocket.getOutputStream());
>
>p.println(capitalizedSentence);
>
>outToClient.close();
>System.out.println("Received2: " + clientSentence);
>inFromClient.close();
>connectionSocket.close();
>   }
>
> }
>
> }
>
>
>
> Logs :
>
> [2018-08-23 14:28:54,732] []  INFO - LogMediator After Call =  version='1.0' encoding='utf-8'?>http://www.w3.org/2003/05/soap-envelope;> xmlns:axis2ns43="http://ws.apache.org/commons/ns/payload
> ">lt;RNgt;
>
>
>
>
> Regards,
>
> Amit Gupta
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Two Way TCP in wso 2 ESB

2018-08-23 Thread Amit Gupta
Hi ,

I am working on TCP socket communcation with wso2 ESB.

I was able to send message to TCP server however once the TCP server is
replying back i cannot see the message in wso3 esb, could you please help
me with this.

API :

http://ws.apache.org/ns/synapse; name="ScalesAPI"
context="/scale">
   
  
 
 
 
lt;RNgt;

 
 

   

 
 

 
  
  
 

 
  
   




JAVA Code :
public class TCPServer {

public static void main(String[] args) throws Exception {
String clientSentence;
String name = "Amit";
  String capitalizedSentence = " 00 23 ";
  ServerSocket welcomeSocket = new ServerSocket(8915);

  while (true) {
   Socket connectionSocket = welcomeSocket.accept();
   BufferedReader inFromClient =
new BufferedReader(new
InputStreamReader(connectionSocket.getInputStream()));
   DataOutputStream outToClient = new
DataOutputStream(connectionSocket.getOutputStream());
   clientSentence = inFromClient.readLine();
   System.out.println("Received: " + clientSentence);
  // capitalizedSentence = clientSentence.toUpperCase() + 'n';
   System.out.println("Received1: " + clientSentence);
  //outToClient.writeBytes(capitalizedSentence);

   PrintStream p = new PrintStream(connectionSocket.getOutputStream());

   p.println(capitalizedSentence);

   outToClient.close();
   System.out.println("Received2: " + clientSentence);
   inFromClient.close();
   connectionSocket.close();
  }

}

}



Logs :

[2018-08-23 14:28:54,732] []  INFO - LogMediator After Call = http://www.w3.org/2003/05/soap-envelope;>http://ws.apache.org/commons/ns/payload
">lt;RNgt;




Regards,

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


Re: [Dev] Error after enabling secure vault in APIM 2.2.0 (TBR) pack

2018-08-23 Thread Samitha Chathuranga
Tested. It is fixed in both APIM 2.2.0 and IS 5.5.0 vanila packs.

On Thu, Aug 23, 2018 at 1:35 PM Samitha Chathuranga 
wrote:

> Hi all,
>
> Is this issue fixed in APIM 2.2.0 WUM updated pack and IS 5.5.0 WUM
> updated packs?
>
> Regards,
> Samitha
>
> On Wed, Nov 29, 2017 at 2:31 PM Harsha Kumara  wrote:
>
>> Hi Tharindu,
>>
>> I think we need to upgrade the Kernel to get the fix to APIM 2.2.0. We
>> encounter the same issue in APIM 2.1.0 fresh pack and WUM updated one fixed
>> it.
>>
>> Thanks,
>> Harsha
>>
>> On Wed, Nov 29, 2017 at 2:23 PM, Tharindu Edirisinghe > > wrote:
>>
>>> Hi Devs,
>>>
>>> I'm trying to build the APIM 2.2.0 (to be released) pack. For that, I
>>> built the carbon-apimgt [1] and then the product-apim [2]. Build was
>>> successful and I got the *wso2am-2.2.0-SNAPSHOT* pack.
>>>
>>> Then, I need to test secure vault and for that I ran *./ciphertool.sh
>>> -Dconfigure* from bin directory without changing anything. Then I
>>> started the pack and it prints the following error and the pack doesn't
>>> startup.
>>>
>>> [2017-11-29 14:16:20,748]  INFO - TemplateDeployerServiceTrackerDS
>>> Successfully deployed the execution manager tracker service
>>>
>>> *[2017-11-29 14:16:21,528] FATAL - TomcatBundleActivator Error while
>>> starting server NOT_FOUND_ERR: An attempt is made to reference a node in a
>>> context where it does not exist.org.w3c.dom.DOMException: NOT_FOUND_ERR: An
>>> attempt is made to reference a node in a context where it does not exist.*
>>> at
>>> org.apache.xerces.dom.AttributeMap.internalRemoveNamedItem(Unknown Source)
>>> at org.apache.xerces.dom.AttributeMap.removeNamedItem(Unknown Source)
>>> at
>>> org.wso2.carbon.tomcat.internal.ServerManager.init(ServerManager.java:107)
>>> at
>>> org.wso2.carbon.tomcat.internal.TomcatBundleActivator.start(TomcatBundleActivator.java:45)
>>> at
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
>>> at java.security.AccessController.doPrivileged(Native Method)
>>> at
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
>>> at
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
>>> at
>>> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
>>> at
>>> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
>>> at
>>> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
>>> at
>>> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
>>> at
>>> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
>>> at
>>> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
>>> at
>>> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
>>> at
>>> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
>>> at
>>> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
>>> at
>>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>>>
>>> It seems this is the same issue reported in [3] (according to JIRA, it's
>>> already fixed). I tested above scenario with APIM 2.1.0 (both vanilla and
>>> WUM packs) and there was no error.
>>>
>>> So, I guess this should have been introduced in the 2.2.0 pack.
>>>
>>> Please check.
>>>
>>> [1] https://github.com/wso2/carbon-apimgt/tree/6.x
>>> [2] https://github.com/wso2/product-apim/tree/2.x
>>> [3] https://wso2.org/jira/browse/CARBON-16104
>>>
>>> Thanks,
>>> TharinduE
>>> --
>>>
>>> Tharindu Edirisinghe
>>> Senior Software Engineer | WSO2 Inc
>>> Platform Security Team
>>> Blog : http://tharindue.blogspot.com
>>> mobile : +94 775181586 <+94%2077%20518%201586>
>>>
>>
>>
>>
>> --
>> Harsha Kumara
>> Software Engineer, WSO2 Inc.
>> Mobile: +94775505618
>> Blog:harshcreationz.blogspot.com
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
> *Samitha Chathuranga*
> *Senior Software Engineer*, *WSO2 Inc.*
> lean.enterprise.middleware
> Mobile: +94715123761
>
> [image: http://wso2.com/signature] 
>


-- 
*Samitha Chathuranga*
*Senior Software Engineer*, *WSO2 Inc.*
lean.enterprise.middleware
Mobile: +94715123761 

[image: http://wso2.com/signature] 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] IS 5.3.0 as KM and APIM 2.1.0

2018-08-23 Thread Thomas LEGRAND
Hello,

I found a way. Actually, it was documented: When the cache is deactivated,
we have to define a value to JWTClaimCacheExpiry. I put 1 for one second.
And that works.

Regards,

Thomas

2018-08-22 17:45 GMT+02:00 Thomas LEGRAND :

> Hello there,
>
> I have a LDAP plugged as a secondary user store on the IS and users (from
> this same LDAP) can access to the protected resources on my APIM. So,
> everything's OK.
>
> But, because of *more* business need, I implemented a IN flow sequence for
> my API on APIM. This sequence retrieves the JWT (if I am not mistaken, sent
> by the IS) from where I retrieve the roles and do something special with
> them.
>
> However, because of the immutable state of the JWT, I cannot see the
> changes made on the user via the IS. So, is there a way to force the
> refresh of the JWT to see those changes?
>
> I made some tests (even if they can impact the performances) and that was
> not successful :
> - I deactive the cache (on both IS and APIM thanks to
> theCacheConfigurations part where I put everybody to false)
> - revoking the OAuth2 token and regenerating it (I thought it was linked
> in a way)
>
> And I don't find anything in the configuration files where I can
> manipulate the behaviour concerning this JWT.
>
> Regards,
>
> Thomas
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error after enabling secure vault in APIM 2.2.0 (TBR) pack

2018-08-23 Thread Samitha Chathuranga
Hi all,

Is this issue fixed in APIM 2.2.0 WUM updated pack and IS 5.5.0 WUM updated
packs?

Regards,
Samitha

On Wed, Nov 29, 2017 at 2:31 PM Harsha Kumara  wrote:

> Hi Tharindu,
>
> I think we need to upgrade the Kernel to get the fix to APIM 2.2.0. We
> encounter the same issue in APIM 2.1.0 fresh pack and WUM updated one fixed
> it.
>
> Thanks,
> Harsha
>
> On Wed, Nov 29, 2017 at 2:23 PM, Tharindu Edirisinghe 
> wrote:
>
>> Hi Devs,
>>
>> I'm trying to build the APIM 2.2.0 (to be released) pack. For that, I
>> built the carbon-apimgt [1] and then the product-apim [2]. Build was
>> successful and I got the *wso2am-2.2.0-SNAPSHOT* pack.
>>
>> Then, I need to test secure vault and for that I ran *./ciphertool.sh
>> -Dconfigure* from bin directory without changing anything. Then I
>> started the pack and it prints the following error and the pack doesn't
>> startup.
>>
>> [2017-11-29 14:16:20,748]  INFO - TemplateDeployerServiceTrackerDS
>> Successfully deployed the execution manager tracker service
>>
>> *[2017-11-29 14:16:21,528] FATAL - TomcatBundleActivator Error while
>> starting server NOT_FOUND_ERR: An attempt is made to reference a node in a
>> context where it does not exist.org.w3c.dom.DOMException: NOT_FOUND_ERR: An
>> attempt is made to reference a node in a context where it does not exist.*
>> at org.apache.xerces.dom.AttributeMap.internalRemoveNamedItem(Unknown
>> Source)
>> at org.apache.xerces.dom.AttributeMap.removeNamedItem(Unknown Source)
>> at
>> org.wso2.carbon.tomcat.internal.ServerManager.init(ServerManager.java:107)
>> at
>> org.wso2.carbon.tomcat.internal.TomcatBundleActivator.start(TomcatBundleActivator.java:45)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
>> at
>> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
>> at
>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>>
>> It seems this is the same issue reported in [3] (according to JIRA, it's
>> already fixed). I tested above scenario with APIM 2.1.0 (both vanilla and
>> WUM packs) and there was no error.
>>
>> So, I guess this should have been introduced in the 2.2.0 pack.
>>
>> Please check.
>>
>> [1] https://github.com/wso2/carbon-apimgt/tree/6.x
>> [2] https://github.com/wso2/product-apim/tree/2.x
>> [3] https://wso2.org/jira/browse/CARBON-16104
>>
>> Thanks,
>> TharinduE
>> --
>>
>> Tharindu Edirisinghe
>> Senior Software Engineer | WSO2 Inc
>> Platform Security Team
>> Blog : http://tharindue.blogspot.com
>> mobile : +94 775181586 <+94%2077%20518%201586>
>>
>
>
>
> --
> Harsha Kumara
> Software Engineer, WSO2 Inc.
> Mobile: +94775505618
> Blog:harshcreationz.blogspot.com
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 
*Samitha Chathuranga*
*Senior Software Engineer*, *WSO2 Inc.*
lean.enterprise.middleware
Mobile: +94715123761 

[image: http://wso2.com/signature] 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Sending Data Over TCP

2018-08-23 Thread Amit Gupta
Below are the logs.

[2018-08-23 09:32:59,279] []  INFO - LogMediator To:
/services/TestProxy.TestProxyHttpSoap11Endpoint, WSAction: urn:mediate,
SOAPAction: urn:mediate, MessageID:
urn:uuid:04f974ac-5825-4743-b674-54a3d9060f9f, Direction: request,
Envelope: http://schemas.xmlsoap.org/soap/envelope/;>

   Amit
   
[2018-08-23 09:33:00,284] [] ERROR - TCPTransportSender Error while opening
TCP connection to : tcp://192.168.80.87:8092
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at
java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at
org.apache.axis2.transport.tcp.TCPTransportSender.openTCPConnection(TCPTransportSender.java:167)
at
org.apache.axis2.transport.tcp.TCPTransportSender.sendMessage(TCPTransportSender.java:52)
at
org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at
org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at
org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:595)
at
org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:83)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:548)
at
org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:382)
at
org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
at
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:234)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at
org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
at
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[2018-08-23 09:33:00,288] [] ERROR - Axis2Sender Unexpected error during
sending message out
org.apache.axis2.AxisFault: Error while opening TCP connection to : tcp://
192.168.80.87:8092
at
org.apache.axis2.transport.base.AbstractTransportSender.handleException(AbstractTransportSender.java:226)
at
org.apache.axis2.transport.tcp.TCPTransportSender.openTCPConnection(TCPTransportSender.java:170)
at
org.apache.axis2.transport.tcp.TCPTransportSender.sendMessage(TCPTransportSender.java:52)
at
org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at
org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at
org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:595)
at
org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:83)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:548)
at
org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:382)
at
org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
at
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:234)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at
org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
at
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at 

Re: [Dev] Sending Data Over TCP

2018-08-23 Thread Amit Gupta
Hi Thishani ,

Untill yesterday things were working fine however today i am getting
connection refused error, Could you please help me with this, below is my
proxy and sample java code.


Proxy service :


http://ws.apache.org/ns/synapse;
   name="TestProxy"
   startOnLoad="true"
   statistics="disable"
   trace="disable"
   transports="http">
   
  
 
 
  
  
 
  
   
   




Sample TCP Server JAVA Code:

public class TCPServer {

public static void main(String[] args) throws Exception {
String clientSentence;
  String capitalizedSentence;
  ServerSocket welcomeSocket = new ServerSocket(8902);

  while (true) {
   Socket connectionSocket = welcomeSocket.accept();
   BufferedReader inFromClient =
new BufferedReader(new
InputStreamReader(connectionSocket.getInputStream()));
   DataOutputStream outToClient = new
DataOutputStream(connectionSocket.getOutputStream());
   clientSentence = inFromClient.readLine();
   System.out.println("Received: " + clientSentence);
  // capitalizedSentence = clientSentence.toUpperCase() + 'n';
   System.out.println("Received1: " + clientSentence);
  // outToClient.writeBytes(capitalizedSentence);


   outToClient.close();
   System.out.println("Received2: " + clientSentence);
   inFromClient.close();
   connectionSocket.close();
  }

}

}



Regards,

Amit Gupta

On Tue, Aug 21, 2018 at 5:30 PM Amit Gupta  wrote:

> Thank you Thishani ,
>
> I updated the proxy with the example and tried however i am getting same
> issue.
>
> 
> http://ws.apache.org/ns/synapse;
>name="TestProxy"
>startOnLoad="true"
>statistics="disable"
>trace="disable"
>transports="http">
>
>   
>  
>  
>   
>   
>  
>   
>
>
> 
>
>
> Below are the logs
>
> [2018-08-21 17:26:35,672] []  INFO - DeploymentInterceptor Deploying Axis2
> service: TestProxy {super-tenant}
> [2018-08-21 17:26:35,673] []  INFO - ProxyService Successfully created the
> Axis2 service for Proxy service : TestProxy
> [2018-08-21 17:26:45,484] []  WARN - JavaLogger potential cross-site
> request forgery (CSRF) attack thwarted (user:,
> ip:192.168.80.106, method:POST,
> uri:/carbon/admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp, error:required
> token is missing from the request)
> [2018-08-21 17:27:09,121] []  WARN - JavaLogger potential cross-site
> request forgery (CSRF) attack thwarted (user:,
> ip:192.168.80.106, method:POST,
> uri:/carbon/admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp, error:required
> token is missing from the request)
> [2018-08-21 17:27:12,305] []  WARN - JavaLogger potential cross-site
> request forgery (CSRF) attack thwarted (user:,
> ip:192.168.80.106, method:POST,
> uri:/carbon/admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp, error:required
> token is missing from the request)
>
>
>
> The IP 192.168.80.106 is my system.Can you let me know what is going wrong
>
> On Tue, Aug 21, 2018 at 5:25 PM Thishani Lucas  wrote:
>
>> Hi Amit,
>>
>> As I have answered in [1], we need a TCP endpoint in the send mediator.
>>
>> [1]
>> https://stackoverflow.com/questions/51947933/sending-data-over-tcp-on-wso2-esb
>>
>> Thanks,
>> Thishani
>>
>> On Tue, Aug 21, 2018 at 7:53 PM, Amit Gupta 
>> wrote:
>>
>>> Hi Lahirumadu ,
>>>
>>> Thank you for the response .
>>>
>>> I had gone through the documentation and  was little confused, Like when
>>> ESB needs to send data over TCP then IP and port of the TCP server is
>>> required however here we just mention Port, So my scenario is that ESB
>>> should be able to send data over TCP to another server and once the server
>>> responds with a message then ESB should further do the enrich the response.
>>>
>>> Regards,
>>>
>>> Amit Gupta
>>>
>>> On Tue, Aug 21, 2018 at 4:18 PM Lahiru Madushanka 
>>> wrote:
>>>
 Hi Amit,

 Please refer to this [1] documentation. ( contains a sample )

 [1] https://docs.wso2.com/display/ESB500/TCP+Transport

 Thanks,
 Lahiru

 On Tue, Aug 21, 2018 at 5:28 PM Amit Gupta 
 wrote:

> Hi ,
>
> I have created a proxy in wso2 esb wherin i can receive data over TCP
> from external parties.
> However my requirement is that i need to develop a proxy wherein esb
> sends request over TCP and then receives a response and then process the
> response further.
>
> Any leads on this or any example will be helpful for me.
>
> Thanks,
>
> Amit Gupta
> ___
> 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
>>>
>>>
>>
>>
>> --
>> *Thishani Lucas*
>> *Software Engineer*
>> *WSO2 Lanka (Private) Limited**: http://wso2.com *
>> *lean.enterprise.middle-ware*
>>
>> *Tel: +94 77 

Re: [Dev] HTTP Verb PATCH support for MSF4J

2018-08-23 Thread Malintha Amarasinghe
Hi Thusitha,

Thank you very much for the info.

Hi Azeez,

I am afraid I can check this ATM as I am tied with support work. I will
check with someone with the team and ask to verify this.

Thanks!

On Wed, Aug 22, 2018 at 8:16 AM, Afkham Azeez  wrote:

> Malintha can you please look into that PR?
>
> On Wed, Aug 22, 2018, 6:34 AM Thusitha Thilina Dayaratne <
> thusithathil...@gmail.com> wrote:
>
>> Hi Malintha,
>>
>> AFAIK this was not implemented.
>> It seems like there is an open PR relate to this. IMHO that can be merged
>> to get the PATCH support if the PR looks good.
>>
>> [1] - https://github.com/wso2/msf4j/pull/546
>>
>> On Wed, Aug 8, 2018 at 3:29 AM Malintha Amarasinghe 
>> wrote:
>>
>>> Hi all,
>>>
>>> Just wanted to check whether we were able to implement this? Looking at
>>> the code I guess we do not support PATCH in msf4j yet [1]. We have some
>>> requirements to implement partial update operations in SCIM2 API via msf4j:
>>> Eg: Adding a user to an existing group without updating the whole group at
>>> once [2]
>>>
>>> [1] https://github.com/wso2/msf4j/blob/master/core/src/
>>> main/java/org/wso2/msf4j/internal/router/MicroserviceMetadata.java#
>>> L120-L127
>>> [2] https://tools.ietf.org/html/rfc7644#page-32
>>>
>>> Thanks!
>>> Malintha
>>>
>>>
>>> On Mon, Feb 27, 2017 at 9:01 AM, Thusitha Thilina Dayaratne <
>>> thusit...@wso2.com> wrote:
>>>
 Created issue[1] to track this.

 [1] - https://github.com/wso2/msf4j/issues/357

 Thanks
 Thusitha

 On Mon, Feb 27, 2017 at 8:41 AM, Afkham Azeez  wrote:

>
>
> On Mon, Feb 27, 2017 at 6:21 AM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Azeez,
>>
>> Since we restructured swagger support as a separate dependency, if we
>> use swagger PATCH annotation then we have to bring swagger dependency 
>> again
>> to the core. That will increase the minimum jar size. Therefore IMHO it
>> would be better if we implement the PATCH annotation without depending on
>> Swagger.
>> WDYT?
>>
>
> Yeah since it is a simple annotation we may add that to the msf4j core
> itself.
>
>>
>> Thanks
>> Thusitha
>>
>> On Mon, Feb 27, 2017 at 12:00 AM, Gayan Gunawardana 
>> wrote:
>>
>>>
>>>
>>> On Sun, Feb 26, 2017 at 11:48 PM, Afkham Azeez 
>>> wrote:
>>>
 Someone suggested on SO to use the PATCH annotation from
 io.swagger.jaxrs

 That may be a good alternative since we already support Swagger.

>>> Thanks for the alternative so we can go with io.swagger.jaxrs.PATCH.
>>>

 On Sun, Feb 26, 2017 at 11:46 PM, Afkham Azeez 
 wrote:

> We can add that annotation to MSF4J itself.
>
> On Sun, Feb 26, 2017 at 11:28 PM, Gayan Gunawardana <
> ga...@wso2.com> wrote:
>
>> Hi All,
>>
>> Since javax.ws.rs does not provide http verb PATCH we have to
>> have custom Patch annotation as below.
>>
>> @Target({ElementType.METHOD})@Retention(RetentionPolicy.RUNTIME)@HttpMethod("PATCH")public
>>  @interface PATCH {}
>>
>> Is it ok to have this annotation in component level or is there
>> any common place we can put this annotation ?
>>
>> Alternatively we can use "X-HTTP-Method-Override" header too.
>>
>> WDYT ?
>>
>> Thanks,
>> Gayan
>>
>> --
>>
>> Gayan Gunawardana
>> Software Engineer; WSO2 Inc.; http://wso2.com/
>> Email: ga...@wso2.com
>> Mobile: +94 (71) 8020933
>>
>
>
>
> --
> *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*
>



 --
 *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 <+94%2077%20332%200919>blog: *
 *http://blog.afkham.org* 
 *twitter: **http://twitter.com/afkham_azeez*
 
 *linked-in: **http://lk.linkedin.com/in/afkhamazeez