[Dev] Enabling REST to SOAP sample gives an error

2017-11-10 Thread Buddhimala Ranasinghe
Hi All,

Today I tried out "Enabling REST to SOAP" sample in ESB as per the
following wso2 document.

https://docs.wso2.com/display/ESB500/Configuring+Specific+Use+Cases#ConfiguringSpecificUseCases-EnablingRESTtoSOAP

But when I tried to invoke the API using the curl command, I got following
error.

The endpoint reference (EPR) for the Operation not found is
/services/SimpleStockQuoteService and the WSA Action = null. If this EPR
was previously reachable, please contact the server
administrator.

And the axis2 server side it gave the following error.

[2017-11-10 16:25:33,268] ERROR {org.apache.axis2.engine.AxisEngine} -  The
endpoint reference (EPR) for the Operation not found is
/services/SimpleStockQuoteService and the WSA Action = null. If this EPR
was previously reachable, please contact the server administrator.
org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation
not found is /services/SimpleStockQuoteService and the WSA Action = null.
If this EPR was previously reachable, please contact the server
administrator.
at
org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:102)
at org.apache.axis2.engine.Phase.invoke(Phase.java:329)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
at
org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144)
at
org.apache.axis2.transport.http.util.RESTUtil.processXMLRequest(RESTUtil.java:89)
at
org.apache.synapse.transport.nhttp.util.RESTUtil.processPOSTRequest(RESTUtil.java:213)
at
org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:468)
at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:291)
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:748)
[2017-11-10 16:25:33,270] ERROR
{org.apache.synapse.transport.nhttp.ServerWorker} -  Error processing POST
request
org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation
not found is /services/SimpleStockQuoteService and the WSA Action = null.
If this EPR was previously reachable, please contact the server
administrator.
at
org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:102)
at org.apache.axis2.engine.Phase.invoke(Phase.java:329)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
at
org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144)
at
org.apache.axis2.transport.http.util.RESTUtil.processXMLRequest(RESTUtil.java:89)
at
org.apache.synapse.transport.nhttp.util.RESTUtil.processPOSTRequest(RESTUtil.java:213)
at
org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:468)
at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:291)
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:748)

Please help to resolve.

Regards,
Buddhimala
-- 


*Buddhimala Ranasinghe*
Software Engineer-Support Team | WSO2
Emil: buddhim...@wso2.com
Mobile:+94771563138
Web:http://wso2.com
[image: https://wso2.com/signature] <https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] API gives "SOAP Envelope can not have children other than SOAP Header and Body" Exception

2017-11-11 Thread Buddhimala Ranasinghe
Hi All,

I have create an API in ESB 5.0.0 for accessing a secured  SOAP BE service.
Attached is the sysnapse configuraion for my API.

http://ws.apache.org/ns/synapse"; name="NawalokaPatientAPI"
context="/nawaloka">
   
  
 
 

   http://service.sample.nawaloka.com";>
  123
   


   

 
 
 
 
 
 

   https://192.168.55.160:9443/services/NawalokaPatientService";
format="soap11"/>

 
  
  
 
 
  
   


The WSDL for my BE service can be found in following URL location.

http://192.168.55.160:9763/services/NawalokaPatientService?wsdl


My problem is, when I tried to invoke the API using SOAPUI, the following
error message prompt with 500 error code.

{"Exception": "SOAP Envelope can not have children other than SOAP Header
and Body"}

Attached what is logged in ESB, enabled wirelogs and debug logs.

How can I resolve this issue? Appreciate your support.
-- 


*Buddhimala Ranasinghe*
Software Engineer-Support Team | WSO2
Emil: buddhim...@wso2.com
Mobile:+94771563138
Web:http://wso2.com
[image: https://wso2.com/signature] <https://wso2.com/signature>


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


Re: [Dev] API gives "SOAP Envelope can not have children other than SOAP Header and Body" Exception

2017-11-12 Thread Buddhimala Ranasinghe
Hi Bhathiya,

I could resolve the problem by adding a dummy header in the payload. Thank
you for your prompt response.

Regards,
Buddhimala

On Sun, Nov 12, 2017 at 1:08 PM, Bhathiya Jayasekara 
wrote:

> Looks like you're facing the same error mentioned here[1]. It seems the
> backend is expecting at least a dummy header. Try that.
>
> [1] "[Dev] Exception with header"
>
> Thanks,
> Bhathiya
>
> On Sun, Nov 12, 2017 at 12:34 PM, Buddhimala Ranasinghe <
> buddhim...@wso2.com> wrote:
>
>> Hi All,
>>
>> I have create an API in ESB 5.0.0 for accessing a secured  SOAP BE
>> service. Attached is the sysnapse configuraion for my API.
>>
>> http://ws.apache.org/ns/synapse"; name="NawalokaPatientAPI"
>> context="/nawaloka">
>>
>>   
>>  
>>  
>> 
>>http://service.sample.nawaloka.com";>
>>   123
>>
>> 
>> 
>>
>> 
>>  
>>  
>>  
>>  
>>  
>>  
>> 
>>https://192.168.55.160:94
>> 43/services/NawalokaPatientService" format="soap11"/>
>> 
>>  
>>   
>>   
>>  > scope="axis2"/>
>>  
>>   
>>
>> 
>>
>> The WSDL for my BE service can be found in following URL location.
>>
>> http://192.168.55.160:9763/services/NawalokaPatientService?wsdl
>>
>>
>> My problem is, when I tried to invoke the API using SOAPUI, the following
>> error message prompt with 500 error code.
>>
>> {"Exception": "SOAP Envelope can not have children other than SOAP Header
>> and Body"}
>>
>> Attached what is logged in ESB, enabled wirelogs and debug logs.
>>
>> How can I resolve this issue? Appreciate your support.
>> --
>>
>>
>> *Buddhimala Ranasinghe*
>> Software Engineer-Support Team | WSO2
>> Emil: buddhim...@wso2.com
>> Mobile:+94771563138 <077%20156%203138>
>> Web:http://wso2.com
>> [image: https://wso2.com/signature] <https://wso2.com/signature>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Bhathiya Jayasekara*
> *Associate Technical Lead,*
> *WSO2 inc., http://wso2.com <http://wso2.com>*
>
> *Phone: +94715478185 <+94%2071%20547%208185>*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
> <http://www.linkedin.com/in/bhathiyaj>*
> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
> *Blog: http://movingaheadblog.blogspot.com
> <http://movingaheadblog.blogspot.com/>*
>



-- 


*Buddhimala Ranasinghe*
Software Engineer-Support Team | WSO2
Emil: buddhim...@wso2.com
Mobile:+94771563138
Web:http://wso2.com
[image: https://wso2.com/signature] <https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] No response when sending patientId as an argument

2017-11-12 Thread Buddhimala Ranasinghe
Hi All,

I have created an API in ESB 5.0.0 to access a secured SOAP BE service. As
per [1] I have added a dummy header into the paylaod so that my payload
will be as follows.



   http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ser="
http://service.sample.nawaloka.com";>
  
 12
  
  
 
$1
 
  
   


   

 

My problem now is, when I tried to invoke the API using SOAPUI, it doen't
show any response and the server side, it logs an error as below.

[2017-11-13 09:30:21,678] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
"GET /nawaloka/read/a...@abc.com HTTP/1.1[\r][\n]"
[2017-11-13 09:30:21,678] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
"Accept-Encoding: gzip,deflate[\r][\n]"
[2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
"Host: 172.17.0.1:8280[\r][\n]"
[2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
"Connection: Keep-Alive[\r][\n]"
[2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
"User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
[2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
"[\r][\n]"
[2017-11-13 09:30:21,682] DEBUG - SynapseMessageReceiver Synapse received a
new message for message mediation...
[2017-11-13 09:30:21,683] DEBUG - SynapseMessageReceiver Received To:
/nawaloka/read/a...@abc.com
[2017-11-13 09:30:21,683] DEBUG - SynapseMessageReceiver SOAPAction: null
[2017-11-13 09:30:21,683] DEBUG - SynapseMessageReceiver WSA-Action: null
[2017-11-13 09:30:21,683] DEBUG - Axis2SynapseEnvironment Injecting
MessageContext
[2017-11-13 09:30:21,683] DEBUG - RESTRequestHandler Located specific API:
NawalokaPatientAPI for processing message
[2017-11-13 09:30:21,684] DEBUG - API Processing message with ID:
urn:uuid:9a9121dd-2025-489b-bba7-c4fba5a2eb95 through the API:
NawalokaPatientAPI
[2017-11-13 09:30:21,684] DEBUG - API No matching resource was found for
the request: urn:uuid:9a9121dd-2025-489b-bba7-c4fba5a2eb95
[2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
"HTTP/1.1 404 Not Found[\r][\n]"
[2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
"Date: Mon, 13 Nov 2017 04:00:21 GMT[\r][\n]"
[2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
"Transfer-Encoding: chunked[\r][\n]"
[2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
"Connection: Keep-Alive[\r][\n]"
[2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
"[\r][\n]"
[2017-11-13 09:30:21,688] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
"0[\r][\n]"
[2017-11-13 09:30:21,688] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
"[\r][\n]"


But it shows a response when I enter a value for patientId parameter as
follows.

 a...@abc.com

FYI: patientId should be the patient's e-mail address.

[1] "API gives "SOAP Envelope can not have children other than SOAP Header
and Body" Exception"
-- 


*Buddhimala Ranasinghe *
Software Engineer-Support Team | WSO2
Emil: buddhim...@wso2.com
Mobile:+94771563138
Web:http://wso2.com
[image: https://wso2.com/signature] <https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] No response when sending patientId as an argument

2017-11-12 Thread Buddhimala Ranasinghe
Here is my API configuartion.

http://ws.apache.org/ns/synapse"; name="NawalokaPatientAPI"
context="/nawaloka">
   
  
 
 

   http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ser="
http://service.sample.nawaloka.com";>
  
 12
  
  
 
$1
 
  
   


   

 
 
 
 
 
 

   https://192.168.55.160:9443/services/NawalokaPatientService";
format="soap11"/>

 
  
  
 
 
  
   


On Mon, Nov 13, 2017 at 10:14 AM, Sam Sivayogam  wrote:

> Seems like your synapse api context and resource definition doesn't match
> with the URL you invoke.Thats why you are getting a error like No
> matching resource. Can you please send your api configurations ?
>
> Thanks,
> Sam
>
> On Mon, Nov 13, 2017 at 9:46 AM, Buddhimala Ranasinghe <
> buddhim...@wso2.com> wrote:
>
>> Hi All,
>>
>> I have created an API in ESB 5.0.0 to access a secured SOAP BE service.
>> As per [1] I have added a dummy header into the paylaod so that my payload
>> will be as follows.
>>
>> 
>> 
>>http://schemas.
>> xmlsoap.org/soap/envelope/" xmlns:ser="http://service.sample.nawaloka.com
>> ">
>>   
>>  12
>>   
>>   
>>  
>> $1
>>  
>>   
>>
>> 
>> 
>>
>> 
>>  
>>
>> My problem now is, when I tried to invoke the API using SOAPUI, it doen't
>> show any response and the server side, it logs an error as below.
>>
>> [2017-11-13 09:30:21,678] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
>> "GET /nawaloka/read/a...@abc.com HTTP/1.1[\r][\n]"
>> [2017-11-13 09:30:21,678] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
>> "Accept-Encoding: gzip,deflate[\r][\n]"
>> [2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
>> "Host: 172.17.0.1:8280[\r][\n]"
>> [2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
>> "Connection: Keep-Alive[\r][\n]"
>> [2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
>> [2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
>> "[\r][\n]"
>> [2017-11-13 09:30:21,682] DEBUG - SynapseMessageReceiver Synapse received
>> a new message for message mediation...
>> [2017-11-13 09:30:21,683] DEBUG - SynapseMessageReceiver Received To:
>> /nawaloka/read/a...@abc.com
>> [2017-11-13 09:30:21,683] DEBUG - SynapseMessageReceiver SOAPAction: null
>> [2017-11-13 09:30:21,683] DEBUG - SynapseMessageReceiver WSA-Action: null
>> [2017-11-13 09:30:21,683] DEBUG - Axis2SynapseEnvironment Injecting
>> MessageContext
>> [2017-11-13 09:30:21,683] DEBUG - RESTRequestHandler Located specific
>> API: NawalokaPatientAPI for processing message
>> [2017-11-13 09:30:21,684] DEBUG - API Processing message with ID:
>> urn:uuid:9a9121dd-2025-489b-bba7-c4fba5a2eb95 through the API:
>> NawalokaPatientAPI
>> [2017-11-13 09:30:21,684] DEBUG - API No matching resource was found for
>> the request: urn:uuid:9a9121dd-2025-489b-bba7-c4fba5a2eb95
>> [2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
>> "HTTP/1.1 404 Not Found[\r][\n]"
>> [2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
>> "Date: Mon, 13 Nov 2017 04:00:21 GMT[\r][\n]"
>> [2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
>> "Transfer-Encoding: chunked[\r][\n]"
>> [2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
>> "Connection: Keep-Alive[\r][\n]"
>> [2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
>> "[\r][\n]"
>> [2017-11-13 09:30:21,688] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
>> "0[\r][\n]"
>> [2017-11-13 09:30:21,688] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
>> "[\r][\n]"
>>
>>
>&

Re: [Dev] Enabling REST to SOAP sample gives an error

2017-11-12 Thread Buddhimala Ranasinghe
Hi Praneesha,

I have checked the update done in [1].

However, the line "Therefore, when you uncomment this property, WSO2 ESB
does not apply this default content type when sending the message." seems
like confusing the readers with the line "Comment out the
http.headers.preserve=Content-Type parameter in the
/conf/passthru-http.properties file.".

Therefore, shall we simply say the reader to comment out the relevant
parameter?

Regards,
Buddhimala

On Fri, Nov 10, 2017 at 7:53 PM, Praneesha Chandrasiri 
wrote:

> This is applicable only to WSO2 ESB 5.0.0 and is fixed in WSO2 EI.
> Therefore, updated [1] accordingly.
>
> Thanks for the support Vijitha and Milinda!
>
> [1] https://docs.wso2.com/display/ESB500/Configuring+Specific+Use+Cases
>
> On Fri, Nov 10, 2017 at 5:21 PM, Vijitha Ekanayake 
> wrote:
>
>> [++ documentation]
>>
>> The reason for the issue seems to be, ESB is preserving the Content-Type
>> header as the default behavior. Since GET request doesn't have a
>> Content-Type, ESB sends application/x-www-form-urlencoded as the
>> Content-Type to the backend which is the reason for this failure. To
>> overcome this issue you can comment out the following parameter in the
>> passthru-http.properties.
>>
>> http.headers.preserve=Content-Type
>>
>> Thanks,
>> Vijitha.
>>
>> On Fri, Nov 10, 2017 at 5:04 PM, Vijitha Ekanayake 
>> wrote:
>>
>>> Hi Buddhimala,
>>>
>>> The reason for the issue seems to be, ESB is preserving the Content-Type
>>> header as the default behavior. Since GET request doesn't have a
>>> Content-Type, ESB sends application/x-www-form-urlencoded as the
>>> Content-Type to the backend which is the reason for this failure. To
>>> overcome this issue you can comment out the following parameter in the
>>> passthru-http.properties.
>>>
>>> http.headers.preserve=Content-Type
>>>
>>> Thanks,
>>> Vijitha.
>>>
>>>
>>> On Fri, Nov 10, 2017 at 4:29 PM, Buddhimala Ranasinghe <
>>> buddhim...@wso2.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> Today I tried out "Enabling REST to SOAP" sample in ESB as per the
>>>> following wso2 document.
>>>>
>>>> https://docs.wso2.com/display/ESB500/Configuring+Specific+Us
>>>> e+Cases#ConfiguringSpecificUseCases-EnablingRESTtoSOAP
>>>>
>>>> But when I tried to invoke the API using the curl command, I got
>>>> following error.
>>>>
>>>> The endpoint reference (EPR) for the Operation not found
>>>> is /services/SimpleStockQuoteService and the WSA Action = null. If
>>>> this EPR was previously reachable, please contact the server
>>>> administrator.
>>>>
>>>> And the axis2 server side it gave the following error.
>>>>
>>>> [2017-11-10 16:25:33,268] ERROR {org.apache.axis2.engine.AxisEngine}
>>>> -  The endpoint reference (EPR) for the Operation not found is
>>>> /services/SimpleStockQuoteService and the WSA Action = null. If this
>>>> EPR was previously reachable, please contact the server administrator.
>>>> org.apache.axis2.AxisFault: The endpoint reference (EPR) for the
>>>> Operation not found is /services/SimpleStockQuoteService and the WSA
>>>> Action = null. If this EPR was previously reachable, please contact the
>>>> server administrator.
>>>> at org.apache.axis2.engine.DispatchPhase.checkPostConditions(Di
>>>> spatchPhase.java:102)
>>>> at org.apache.axis2.engine.Phase.invoke(Phase.java:329)
>>>> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
>>>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
>>>> at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngi
>>>> ne(RESTUtil.java:144)
>>>> at org.apache.axis2.transport.http.util.RESTUtil.processXMLRequ
>>>> est(RESTUtil.java:89)
>>>> at org.apache.synapse.transport.nhttp.util.RESTUtil.processPOST
>>>> Request(RESTUtil.java:213)
>>>> at org.apache.synapse.transport.nhttp.ServerWorker.processEntit
>>>> yEnclosingMethod(ServerWorker.java:468)
>>>> at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWo
>>>> rker.java:291)
>>>> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.r
>>>> un(NativeWorkerPool.java:172)
>>>> at java.util.con

Re: [Dev] Enabling REST to SOAP sample gives an error

2017-11-12 Thread Buddhimala Ranasinghe
Hi Praneesha,

I have checked the update done in [1].

However, the line "Therefore, when you uncomment this property, WSO2 ESB
does not apply this default content type when sending the message." seems
like confusing the readers with the line "Comment out the
http.headers.preserve=Content-Type parameter in the
/conf/passthru-http.properties file.".

Therefore, shall we simply say the reader to comment out the relevant
parameter?

[1]
https://docs.wso2.com/display/ESB500/Configuring+Specific+Use+Cases#ConfiguringSpecificUseCases-EnablingRESTtoSOAP

Regards,
Buddhimala

On Mon, Nov 13, 2017 at 10:33 AM, Buddhimala Ranasinghe  wrote:

> Hi Praneesha,
>
> I have checked the update done in [1].
>
> However, the line "Therefore, when you uncomment this property, WSO2 ESB
> does not apply this default content type when sending the message." seems
> like confusing the readers with the line "Comment out the
> http.headers.preserve=Content-Type parameter in the
> /conf/passthru-http.properties file.".
>
> Therefore, shall we simply say the reader to comment out the relevant
> parameter?
>
> Regards,
> Buddhimala
>
> On Fri, Nov 10, 2017 at 7:53 PM, Praneesha Chandrasiri  > wrote:
>
>> This is applicable only to WSO2 ESB 5.0.0 and is fixed in WSO2 EI.
>> Therefore, updated [1] accordingly.
>>
>> Thanks for the support Vijitha and Milinda!
>>
>> [1] https://docs.wso2.com/display/ESB500/Configuring+Specific+Use+Cases
>>
>> On Fri, Nov 10, 2017 at 5:21 PM, Vijitha Ekanayake 
>> wrote:
>>
>>> [++ documentation]
>>>
>>> The reason for the issue seems to be, ESB is preserving the Content-Type
>>> header as the default behavior. Since GET request doesn't have a
>>> Content-Type, ESB sends application/x-www-form-urlencoded as the
>>> Content-Type to the backend which is the reason for this failure. To
>>> overcome this issue you can comment out the following parameter in the
>>> passthru-http.properties.
>>>
>>> http.headers.preserve=Content-Type
>>>
>>> Thanks,
>>> Vijitha.
>>>
>>> On Fri, Nov 10, 2017 at 5:04 PM, Vijitha Ekanayake 
>>> wrote:
>>>
>>>> Hi Buddhimala,
>>>>
>>>> The reason for the issue seems to be, ESB is preserving the
>>>> Content-Type header as the default behavior. Since GET request doesn't have
>>>> a Content-Type, ESB sends application/x-www-form-urlencoded as the
>>>> Content-Type to the backend which is the reason for this failure. To
>>>> overcome this issue you can comment out the following parameter in the
>>>> passthru-http.properties.
>>>>
>>>> http.headers.preserve=Content-Type
>>>>
>>>> Thanks,
>>>> Vijitha.
>>>>
>>>>
>>>> On Fri, Nov 10, 2017 at 4:29 PM, Buddhimala Ranasinghe <
>>>> buddhim...@wso2.com> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> Today I tried out "Enabling REST to SOAP" sample in ESB as per the
>>>>> following wso2 document.
>>>>>
>>>>> https://docs.wso2.com/display/ESB500/Configuring+Specific+Us
>>>>> e+Cases#ConfiguringSpecificUseCases-EnablingRESTtoSOAP
>>>>>
>>>>> But when I tried to invoke the API using the curl command, I got
>>>>> following error.
>>>>>
>>>>> The endpoint reference (EPR) for the Operation not found
>>>>> is /services/SimpleStockQuoteService and the WSA Action = null. If
>>>>> this EPR was previously reachable, please contact the server
>>>>> administrator.
>>>>>
>>>>> And the axis2 server side it gave the following error.
>>>>>
>>>>> [2017-11-10 16:25:33,268] ERROR {org.apache.axis2.engine.AxisEngine}
>>>>> -  The endpoint reference (EPR) for the Operation not found is
>>>>> /services/SimpleStockQuoteService and the WSA Action = null. If this
>>>>> EPR was previously reachable, please contact the server administrator.
>>>>> org.apache.axis2.AxisFault: The endpoint reference (EPR) for the
>>>>> Operation not found is /services/SimpleStockQuoteService and the WSA
>>>>> Action = null. If this EPR was previously reachable, please contact the
>>>>> server administrator.
>>>>> at org.apache.axis2.engine.DispatchPhase.checkPostConditions(Di
>>>>> spatchPhase.java:102)
>>>>> at org.apa

Re: [Dev] No response when sending patientId as an argument

2017-11-12 Thread Buddhimala Ranasinghe
Hi Thivya,

Still it doesn't work. I'm getting the same error.

Regards,
Buddhimala

On Mon, Nov 13, 2017 at 11:19 AM, Thivya Mahenthirarasa 
wrote:

> Hi Budhimala,
>
> Apologies for the above. I think the GET method you are having is in the
> name read. Can you try by adding
>  
>
> On Mon, Nov 13, 2017 at 11:12 AM, Thivya Mahenthirarasa 
> wrote:
>
>> Hi Budhimala,
>>
>>  Instead of  
>> you need to refine your uri-template as follows since you are sending the
>> parameter via uri.
>>
>>   
>>
>>
>> Hope it would be helpful.
>>
>> Thanks,
>> Thivya
>>
>> On Mon, Nov 13, 2017 at 10:24 AM, Buddhimala Ranasinghe <
>> buddhim...@wso2.com> wrote:
>>
>>> Here is my API configuartion.
>>>
>>> http://ws.apache.org/ns/synapse"; name="NawalokaPatientAPI"
>>> context="/nawaloka">
>>>
>>>   
>>>  
>>>  
>>> 
>>>http://schemas.
>>> xmlsoap.org/soap/envelope/" xmlns:ser="http://service.samp
>>> le.nawaloka.com">
>>>   
>>>  12
>>>   
>>>   
>>>  
>>> $1
>>>  
>>>   
>>>
>>> 
>>> 
>>>
>>> 
>>>  
>>>  
>>>  
>>>  
>>>  
>>>  
>>> 
>>>https://192.168.55.160:94
>>> 43/services/NawalokaPatientService" format="soap11"/>
>>> 
>>>  
>>>   
>>>   
>>>  >> scope="axis2"/>
>>>  
>>>   
>>>
>>> 
>>>
>>> On Mon, Nov 13, 2017 at 10:14 AM, Sam Sivayogam  wrote:
>>>
>>>> Seems like your synapse api context and resource definition doesn't
>>>> match with the URL you invoke.Thats why you are getting a error like No
>>>> matching resource. Can you please send your api configurations ?
>>>>
>>>> Thanks,
>>>> Sam
>>>>
>>>> On Mon, Nov 13, 2017 at 9:46 AM, Buddhimala Ranasinghe <
>>>> buddhim...@wso2.com> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> I have created an API in ESB 5.0.0 to access a secured SOAP BE
>>>>> service. As per [1] I have added a dummy header into the paylaod so that 
>>>>> my
>>>>> payload will be as follows.
>>>>>
>>>>> 
>>>>> 
>>>>>http://schemas.
>>>>> xmlsoap.org/soap/envelope/" xmlns:ser="http://service.samp
>>>>> le.nawaloka.com">
>>>>>   
>>>>>  12
>>>>>   
>>>>>   
>>>>>  
>>>>> $1
>>>>>  
>>>>>   
>>>>>
>>>>> 
>>>>> 
>>>>>
>>>>> 
>>>>>  
>>>>>
>>>>> My problem now is, when I tried to invoke the API using SOAPUI, it
>>>>> doen't show any response and the server side, it logs an error as below.
>>>>>
>>>>> [2017-11-13 09:30:21,678] DEBUG - wire HTTP-Listener I/O dispatcher-3
>>>>> >> "GET /nawaloka/read/a...@abc.com HTTP/1.1[\r][\n]"
>>>>> [2017-11-13 09:30:21,678] DEBUG - wire HTTP-Listener I/O dispatcher-3
>>>>> >> "Accept-Encoding: gzip,deflate[\r][\n]"
>>>>> [2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3
>>>>> >> "Host: 172.17.0.1:8280[\r][\n]"
>>>>> [2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3
>>>>> >> "Connection: Keep-Alive[\r][\n]"
>>>>> [2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3
>>>>> >> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
>&

Re: [Dev] No response when sending patientId as an argument

2017-11-12 Thread Buddhimala Ranasinghe
changing the URL template to "/read/{*+*patientid}" resolved the issue.

Thanks for the support.

Regards,
Buddhimala

On Mon, Nov 13, 2017 at 11:25 AM, Buddhimala Ranasinghe  wrote:

> Hi Thivya,
>
> Still it doesn't work. I'm getting the same error.
>
> Regards,
> Buddhimala
>
> On Mon, Nov 13, 2017 at 11:19 AM, Thivya Mahenthirarasa 
> wrote:
>
>> Hi Budhimala,
>>
>> Apologies for the above. I think the GET method you are having is in the
>> name read. Can you try by adding
>>  
>>
>> On Mon, Nov 13, 2017 at 11:12 AM, Thivya Mahenthirarasa 
>> wrote:
>>
>>> Hi Budhimala,
>>>
>>>  Instead of  
>>> you need to refine your uri-template as follows since you are sending the
>>> parameter via uri.
>>>
>>>   
>>>
>>>
>>> Hope it would be helpful.
>>>
>>> Thanks,
>>> Thivya
>>>
>>> On Mon, Nov 13, 2017 at 10:24 AM, Buddhimala Ranasinghe <
>>> buddhim...@wso2.com> wrote:
>>>
>>>> Here is my API configuartion.
>>>>
>>>> http://ws.apache.org/ns/synapse"; name="NawalokaPatientAPI"
>>>> context="/nawaloka">
>>>>
>>>>   
>>>>  
>>>>  
>>>> 
>>>>http://schemas.
>>>> xmlsoap.org/soap/envelope/" xmlns:ser="http://service.samp
>>>> le.nawaloka.com">
>>>>   
>>>>  12
>>>>   
>>>>   
>>>>  
>>>> $1
>>>>  
>>>>   
>>>>
>>>> 
>>>> 
>>>>
>>>> 
>>>>  
>>>>  
>>>>  >>> scope="transport"/>
>>>>  
>>>>  
>>>>  
>>>> 
>>>>https://192.168.55.160:94
>>>> 43/services/NawalokaPatientService" format="soap11"/>
>>>> 
>>>>  
>>>>   
>>>>   
>>>>  >>> scope="axis2"/>
>>>>  
>>>>   
>>>>
>>>> 
>>>>
>>>> On Mon, Nov 13, 2017 at 10:14 AM, Sam Sivayogam  wrote:
>>>>
>>>>> Seems like your synapse api context and resource definition doesn't
>>>>> match with the URL you invoke.Thats why you are getting a error like No
>>>>> matching resource. Can you please send your api configurations ?
>>>>>
>>>>> Thanks,
>>>>> Sam
>>>>>
>>>>> On Mon, Nov 13, 2017 at 9:46 AM, Buddhimala Ranasinghe <
>>>>> buddhim...@wso2.com> wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I have created an API in ESB 5.0.0 to access a secured SOAP BE
>>>>>> service. As per [1] I have added a dummy header into the paylaod so that 
>>>>>> my
>>>>>> payload will be as follows.
>>>>>>
>>>>>> 
>>>>>> 
>>>>>>http://schemas.
>>>>>> xmlsoap.org/soap/envelope/" xmlns:ser="http://service.samp
>>>>>> le.nawaloka.com">
>>>>>>   
>>>>>>  12
>>>>>>   
>>>>>>   
>>>>>>  
>>>>>> $1
>>>>>>  
>>>>>>   
>>>>>>
>>>>>> 
>>>>>> 
>>>>>>
>>>>>> 
>>>>>>  
>>>>>>
>>>>>> My problem now is, when I tried to invoke the API using SOAPUI, it
>>>>>> doen't show any response and the server side, it logs an error as below.
>>>>>>
>>>>>> [2017-11-13 09:30:21,678] DEBUG - wire HTTP-Listener I/O dispatcher-3
>>>>>> >> &quo

Re: [Dev] Exception while invoking proxy service in ESB 5.0.0

2017-11-13 Thread Buddhimala Ranasinghe
 "   [\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "   ?[\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "[\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "[\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "abc[\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "[\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "80[\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "[\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "[\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "   [\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "   ?[\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "   [\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "   ?[\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "   [\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "   ?[\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "[\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> " [\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "  [\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "   [\n]"
>>> [2017-11-13 12:48:06,511] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "[\r][\n]"
>>> [2017-11-13 12:48:06,512] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "0[\r][\n]"
>>> [2017-11-13 12:48:06,512] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
>>> "[\r][\n]"
>>> [2017-11-13 12:48:06,537] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
>>> "HTTP/1.1 202 Accepted[\r][\n]"
>>> [2017-11-13 12:48:06,537] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
>>> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
>>> [2017-11-13 12:48:06,537] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
>>> "Transfer-Encoding: chunked[\r][\n]"
>>> [2017-11-13 12:48:06,537] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
>>> "Date: Mon, 13 Nov 2017 07:18:06 GMT[\r][\n]"
>>> [2017-11-13 12:48:06,537] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
>>> "Server: WSO2 Carbon Server[\r][\n]"
>>> [2017-11-13 12:48:06,537] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
>>> "[\r][\n]"
>>> [2017-11-13 12:48:06,537] DEBUG - headers http-outgoing-2 << HTTP/1.1
>>> 202 Accepted
>>> [2017-11-13 12:48:06,537] DEBUG - headers http-outgoing-2 <<
>>> Content-Type: text/xml;charset=UTF-8
>>> [2017-11-13 12:48:06,537] DEBUG - headers http-outgoing-2 <<
>>> Transfer-Encoding: chunked
>>> [2017-11-13 12:48:06,537] DEBUG - headers http-outgoing-2 << Date: Mon,
>>> 13 Nov 2017 07:18:06 GMT
>>> [2017-11-13 12:48:06,537] DEBUG - headers http-outgoing-2 << Server:
>>> WSO2 Carbon Server
>>> [2017-11-13 12:48:06,538] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
>>> "0[\r][\n]"
>>> [2017-11-13 12:48:06,538] ERROR - NativeWorkerPool Uncaught exception
>>> java.lang.UnsupportedOperationException: An access occurred that is not
>>> valid.
>>> at org.apache.axis2.description.InOnlyAxisOperation.getMessage(
>>> InOnlyAxisOperation.java:117)
>>> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handle
>>> Message(SynapseCallbackReceiver.java:324)
>>> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receiv
>>> e(SynapseCallback

[Dev] Passing payloads from API to ESB

2017-11-15 Thread Buddhimala Ranasinghe
Hi All,

I need to pass a json payload from an API to ESB proxy service. In ESB, I'm
using parameters in the passed JSON payload inside payloadFactory mediator
in my ESB which will be sent towards a secured SOAP BE. Can you please
guide me on this? I need to know how could those parameters can be
addressed inside my proxy service.

Regards,
Buddhimala

-- 


*Buddhimala Ranasinghe*
Software Engineer-Support Team | WSO2
Emil: buddhim...@wso2.com
Mobile:+94771563138
Web:http://wso2.com
[image: https://wso2.com/signature] <https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Pass user details into the out sequence.

2017-11-22 Thread Buddhimala Ranasinghe
Hi Senuwan,

In order to pass the value of a property from insequence to outsequence,
you can try with the property scope as "default/synapse".

So that you can modify your insequence and outsequence as follows.



  
   
   
   





So that you can use "get-property('transport','myPropertyInTransport')" to
retrieve the value in outsequence.

Please refer https://stackoverflow.com/a/13378163 for further convenience.

Regards,
Buddhimala


On Wed, Nov 22, 2017 at 10:42 AM, Rukshan Premathunga 
wrote:

> Hi Senuwan,
>
> You can add required property to message context inside the class
> mediator. So that you can read them back in out-sequence.
>
> Thanks and Regards
>
> On Wed, Nov 22, 2017 at 10:09 AM, Senuwan Withana 
> wrote:
>
>> Hi Team,
>>
>>
>> I have created the below class mediator to call my JWTRoleReder, in
>> Sequence .
>>
>> 
>>   
>>
>>
>>
>> However I could not able to pass above details into the outSequence .
>> Kindly suggest solutions?
>>
>> Thanks.
>> *Senuwan Withana*
>> Software Engineer - Support Team | WSO2
>>
>> Email : senu...@wso2.com
>> Mobile: 94773212853
>> Web: http://www.wso2.com
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Rukshan Chathuranga.
> Software Engineer.
> WSO2, Inc.
> +94711822074 <+94%2071%20182%202074>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 


*Buddhimala Ranasinghe*
Software Engineer-Support Team | WSO2
Emil: buddhim...@wso2.com
Mobile:+94771563138
Web:http://wso2.com
[image: https://wso2.com/signature] <https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] API with Ip based throttling gives an error

2017-11-23 Thread Buddhimala Ranasinghe
(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.jms.JMSException: Error creating connection: Could not
open connection
at
org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:361)
at
org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:40)
at
org.wso2.carbon.event.output.adapter.jms.internal.util.JMSUtils.createConnection(JMSUtils.java:387)
at
org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory.createConnection(JMSConnectionFactory.java:268)
... 10 more
Caused by: org.wso2.andes.AMQConnectionFailureException: Could not open
connection
at org.wso2.andes.client.AMQConnection.(AMQConnection.java:486)
at
org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:351)
... 13 more
Caused by: org.wso2.andes.transport.TransportException: Could not open
connection
at
org.wso2.andes.transport.network.mina.MinaNetworkTransport$IoConnectorCreator.connect(MinaNetworkTransport.java:216)
at
org.wso2.andes.transport.network.mina.MinaNetworkTransport.connect(MinaNetworkTransport.java:74)
at
org.wso2.andes.client.AMQConnectionDelegate_8_0.makeBrokerConnection(AMQConnectionDelegate_8_0.java:130)
at org.wso2.andes.client.AMQConnection$2.run(AMQConnection.java:631)
at org.wso2.andes.client.AMQConnection$2.run(AMQConnection.java:628)
at java.security.AccessController.doPrivileged(Native Method)
at
org.wso2.andes.client.AMQConnection.makeBrokerConnection(AMQConnection.java:628)
at org.wso2.andes.client.AMQConnection.(AMQConnection.java:409)
... 14 more
[2017-11-23 12:45:48,041] ERROR - JMSMessageSender
java.lang.NullPointerException
at
org.wso2.carbon.event.output.adapter.jms.internal.util.JMSMessageSender.send(JMSMessageSender.java:88)
at
org.wso2.carbon.event.output.adapter.jms.JMSEventAdapter$JMSSender.run(JMSEventAdapter.java:284)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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:748)

How can I resolve this problem? Your support is highly appreciated.

Thanks
-- 


*Buddhimala Ranasinghe*
Software Engineer-Support Team | WSO2
Emil: buddhim...@wso2.com
Mobile:+94771563138
Web:http://wso2.com
[image: https://wso2.com/signature] <https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API with Ip based throttling gives an error

2017-11-23 Thread Buddhimala Ranasinghe
Hi Sam,Abimaran,

Thank you for the information. It got sorted.

Regards,
Buddhimala

On Thu, Nov 23, 2017 at 2:08 PM, Sam Sivayogam  wrote:

> This is happening because the JMS publisher couldn't establish a
> connection with throttling topic. please check your 
> /repository/conf/jndi.properties
> file whether you have pointed it to the TM node.
>
> Thanks,
> Sam
>
> On Thu, Nov 23, 2017 at 1:23 PM, Buddhimala Ranasinghe <
> buddhim...@wso2.com> wrote:
>
>> Hi All,
>>
>> I followed the link https://wso2.com/library/demon
>> strations/2016/11/screencast-defining-advanced-throttling-
>> policies-in-wso2-api-manager/ to perform IP based throttling for my API.
>> But when I invoke the service, I get the following error in APIM logs.
>>
>> INFO - JMSConnectionFactory JMS ConnectionFactory : jmsEventPublisher
>> initialized
>> [2017-11-23 12:45:48,036]  INFO - AMQConnection Unable to connect to
>> broker at tcp://localhost:5672
>> org.wso2.andes.transport.TransportException: Could not open connection
>> at org.wso2.andes.transport.network.mina.MinaNetworkTransport$I
>> oConnectorCreator.connect(MinaNetworkTransport.java:216)
>> at org.wso2.andes.transport.network.mina.MinaNetworkTransport.
>> connect(MinaNetworkTransport.java:74)
>> at org.wso2.andes.client.AMQConnectionDelegate_8_0.makeBrokerCo
>> nnection(AMQConnectionDelegate_8_0.java:130)
>> at org.wso2.andes.client.AMQConnection$2.run(AMQConnection.java:631)
>> at org.wso2.andes.client.AMQConnection$2.run(AMQConnection.java:628)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at org.wso2.andes.client.AMQConnection.makeBrokerConnection(AMQ
>> Connection.java:628)
>> at org.wso2.andes.client.AMQConnection.(AMQConnection.java:409)
>> at org.wso2.andes.client.AMQConnectionFactory.createConnection(
>> AMQConnectionFactory.java:351)
>> at org.wso2.andes.client.AMQConnectionFactory.createConnection(
>> AMQConnectionFactory.java:40)
>> at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSUt
>> ils.createConnection(JMSUtils.java:387)
>> at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSCo
>> nnectionFactory.createConnection(JMSConnectionFactory.java:268)
>> at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSCo
>> nnectionFactory$PoolableJMSConnectionFactory.makeObject(JMSC
>> onnectionFactory.java:356)
>> at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(
>> GenericObjectPool.java:1181)
>> at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSCo
>> nnectionFactory.getConnectionFromPool(JMSConnectionFactory.java:286)
>> at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSMe
>> ssageSender.send(JMSMessageSender.java:86)
>> at org.wso2.carbon.event.output.adapter.jms.JMSEventAdapter$JMS
>> Sender.run(JMSEventAdapter.java:284)
>> at java.util.concurrent.Executors$RunnableAdapter.call(
>> Executors.java:511)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>> Executor.java:1142)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>> lExecutor.java:617)
>> at java.lang.Thread.run(Thread.java:748)
>> org.wso2.andes.AMQConnectionFailureException: Could not open connection
>> at org.wso2.andes.client.AMQConnection.(AMQConnection.java:486)
>> at org.wso2.andes.client.AMQConnectionFactory.createConnection(
>> AMQConnectionFactory.java:351)
>> at org.wso2.andes.client.AMQConnectionFactory.createConnection(
>> AMQConnectionFactory.java:40)
>> at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSUt
>> ils.createConnection(JMSUtils.java:387)
>> at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSCo
>> nnectionFactory.createConnection(JMSConnectionFactory.java:268)
>> at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSCo
>> nnectionFactory$PoolableJMSConnectionFactory.makeObject(JMSC
>> onnectionFactory.java:356)
>> at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(
>> GenericObjectPool.java:1181)
>> at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSCo
>> nnectionFactory.getConnectionFromPool(JMSConnectionFactory.java:286)
>> at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSMe
>> ssageSender.send(JMSMessageSender.java:86)
>> at org.wso2.carbon.event.output.adapter.jms.JMSEventAdapter$JMS
>> Sender.run(JMSEventAdapter.java:284)
>> at jav

[Dev] Error occurs with Response caching enabled.

2017-11-24 Thread Buddhimala Ranasinghe
or$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.axis2.AxisFault: Payload could not be written as JSON.
at
org.apache.synapse.commons.json.JsonUtil.writeAsJson(JsonUtil.java:276)
at
org.apache.synapse.commons.json.JsonFormatter.writeTo(JsonFormatter.java:62)
at
org.apache.synapse.transport.passthru.PassThroughHttpSender.submitResponse(PassThroughHttpSender.java:573)
at
org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:264)

Can you please help me to solve this problem?

Thanks

-- 


*Buddhimala Ranasinghe*
Software Engineer-Support Team | WSO2
Emil: buddhim...@wso2.com
Mobile:+94771563138 <+94%2077%20156%203138>
Web:http://wso2.com
[image: https://wso2.com/signature] <https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Problem with IP level throttling in distributed setup

2017-11-28 Thread Buddhimala Ranasinghe
Hi All,

I have a distributed deployment in API Manager which contains

1GW
Pub+Store+TM
Is as KM

I tried to implement IP level throttling for my API in this setup. I have
put 20 as my default equest limit and under IP condition I gave request
count as 5. I gave my local IP address as the IP condition to thrttle out.
But when I invoked the API, it throttles out at the 21st request and not at
6th request.

I also tried the same with another pack where only IS was configured as KM
(Pub,Store,GW,TM+IS as KM). There I could successfully throttle out at the
6th request.

What can be the reason for this behaviour? Can you please help me to
resolve this problem?


Thanks
-- 


*Buddhimala Ranasinghe*
Software Engineer-Support Team | WSO2
Emil: buddhim...@wso2.com
Mobile:+94771563138
Web:http://wso2.com
[image: https://wso2.com/signature] <https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Problem with IP level throttling in distributed setup

2017-11-28 Thread Buddhimala Ranasinghe
Hi Dinusha,Irham,

I tried header condition throttling as well. The same behavior can be
observed in there also. Throttling out occurs after the default limit and
not after the condition request limit.

Thanks

On Wed, Nov 29, 2017 at 12:18 PM, Dinusha Dissanayake 
wrote:

> Hi Buddhimala,
>
> Did you observe this behavior only for IP based throttle condition or with
> other conditions as well (eg. header condition, IP range condition )?
>
> Thanks,
> DinushaD.
>
> On Wed, Nov 29, 2017 at 11:47 AM, Buddhimala Ranasinghe <
> buddhim...@wso2.com> wrote:
>
>> Hi All,
>>
>> I have a distributed deployment in API Manager which contains
>>
>> 1GW
>> Pub+Store+TM
>> Is as KM
>>
>> I tried to implement IP level throttling for my API in this setup. I have
>> put 20 as my default equest limit and under IP condition I gave request
>> count as 5. I gave my local IP address as the IP condition to thrttle out.
>> But when I invoked the API, it throttles out at the 21st request and not
>> at 6th request.
>>
>> I also tried the same with another pack where only IS was configured as
>> KM (Pub,Store,GW,TM+IS as KM). There I could successfully throttle out at
>> the 6th request.
>>
>> What can be the reason for this behaviour? Can you please help me to
>> resolve this problem?
>>
>>
>> Thanks
>> --
>>
>>
>> *Buddhimala Ranasinghe*
>> Software Engineer-Support Team | WSO2
>> Emil: buddhim...@wso2.com
>> Mobile:+94771563138 <+94%2077%20156%203138>
>> Web:http://wso2.com
>> [image: https://wso2.com/signature] <https://wso2.com/signature>
>>
>> _______
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Dinusha Dissanayake
> Software Engineer
> WSO2 Inc
> Mobile: +94712939439 <+94%2071%20293%209439>
> <https://wso2.com/signature>
>



-- 


*Buddhimala Ranasinghe*
Software Engineer-Support Team | WSO2
Emil: buddhim...@wso2.com
Mobile:+94771563138
Web:http://wso2.com
[image: https://wso2.com/signature] <https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Problem with IP level throttling in distributed setup

2017-11-29 Thread Buddhimala Ranasinghe
Hi Prasanna,

I checked the throttle policy file in the given location and it is updated.

Thanks

On Wed, Nov 29, 2017 at 12:41 PM, Prasanna Dangalla 
wrote:

> Hi Buddhimala,
>
> Can you check the throttle policy file whether the policy is updated or
> not. Ex: repository/deployment/server/executionplans/carbon.super_
> resource_100KKBPerMin_default.siddhiql and repository/deployment/server/
> executionplans/carbon.super_resource_100KKBPerMin_condition_1.siddhiql
>
> Thanks
>
> *Prasanna Dangalla*
> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
> lean.enterprise.middleware
>
>
> *cell: +94 718 11 27 51*
> *twitter: @prasa77*
>
> On Wed, Nov 29, 2017 at 12:34 PM, Buddhimala Ranasinghe <
> buddhim...@wso2.com> wrote:
>
>> Hi Dinusha,Irham,
>>
>> I tried header condition throttling as well. The same behavior can be
>> observed in there also. Throttling out occurs after the default limit and
>> not after the condition request limit.
>>
>> Thanks
>>
>> On Wed, Nov 29, 2017 at 12:18 PM, Dinusha Dissanayake 
>> wrote:
>>
>>> Hi Buddhimala,
>>>
>>> Did you observe this behavior only for IP based throttle condition or
>>> with other conditions as well (eg. header condition, IP range condition )?
>>>
>>> Thanks,
>>> DinushaD.
>>>
>>> On Wed, Nov 29, 2017 at 11:47 AM, Buddhimala Ranasinghe <
>>> buddhim...@wso2.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I have a distributed deployment in API Manager which contains
>>>>
>>>> 1GW
>>>> Pub+Store+TM
>>>> Is as KM
>>>>
>>>> I tried to implement IP level throttling for my API in this setup. I
>>>> have put 20 as my default equest limit and under IP condition I gave
>>>> request count as 5. I gave my local IP address as the IP condition to
>>>> thrttle out.
>>>> But when I invoked the API, it throttles out at the 21st request and
>>>> not at 6th request.
>>>>
>>>> I also tried the same with another pack where only IS was configured as
>>>> KM (Pub,Store,GW,TM+IS as KM). There I could successfully throttle out at
>>>> the 6th request.
>>>>
>>>> What can be the reason for this behaviour? Can you please help me to
>>>> resolve this problem?
>>>>
>>>>
>>>> Thanks
>>>> --
>>>>
>>>>
>>>> *Buddhimala Ranasinghe*
>>>> Software Engineer-Support Team | WSO2
>>>> Emil: buddhim...@wso2.com
>>>> Mobile:+94771563138 <+94%2077%20156%203138>
>>>> Web:http://wso2.com
>>>> [image: https://wso2.com/signature] <https://wso2.com/signature>
>>>>
>>>> ___
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> Dinusha Dissanayake
>>> Software Engineer
>>> WSO2 Inc
>>> Mobile: +94712939439 <+94%2071%20293%209439>
>>> <https://wso2.com/signature>
>>>
>>
>>
>>
>> --
>>
>>
>> *Buddhimala Ranasinghe*
>> Software Engineer-Support Team | WSO2
>> Emil: buddhim...@wso2.com
>> Mobile:+94771563138 <+94%2077%20156%203138>
>> Web:http://wso2.com
>> [image: https://wso2.com/signature] <https://wso2.com/signature>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>


-- 


*Buddhimala Ranasinghe*
Software Engineer-Support Team | WSO2
Emil: buddhim...@wso2.com
Mobile:+94771563138
Web:http://wso2.com
[image: https://wso2.com/signature] <https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Giving proxy service as API End point causes an error

2017-12-12 Thread Buddhimala Ranasinghe
ag)
at
org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)
at
org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at
org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:588)
at
org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:508)
at
org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:377)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
at
org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter.doFilter(ContentTypeBasedCachePreventionFilter.java:53)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:120)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at
org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
at
org.wso2.carbon.event.receiver.core.internal.tenantmgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:48)
at
org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at
org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:958)
at
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1756)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1715)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

Can you please help me in resolving this problem.

Thanks

-- 


*Buddhimala Ranasinghe*
Software Engineer-Support Team | WSO2
Emil: buddhim...@wso2.com
Mobile:+94771563138
Web:http://wso2.com
[image: https://wso2.com/signature] <https://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev