Re: [Dev] Connection Timeout issue

2020-01-21 Thread Thivya Mahenthirarasa
Hi Priya,

So I'm seeing you are trying to set time out to lower value about 9 seconds.

Sometimes you may notice setting the timeout to be very low value and
configure back end to always return in after time out value, you still get
from time to time the response from the back end service even though you
should always get the timeout. The reason for that is according to current
implementation timeout handler runs in every 15 seconds. Which means
through there is endpoints timeouts, the TimeoutHandler executes every 15
seconds and real timeout happens after that.

As a solution to this, Since this is because timeout handler runs every
15sec thus roughly 20sec would take the process to take over to fault
handlers if its timeout. Since you configured your endpoint with 9sec
timeout, then you can capture error more closer if we quicker the handler
iteration.
Edit synapse.properties file and add the following parameter and add a
small value.

*synapse.timeout_handler_interval *

Important: Specifying a lower value for this parameter might results in a
higher overhead on the system.


Thanks,
Thivya

On Thu, Nov 7, 2019 at 3:37 PM Priyadarshini Punjabi <
priyadarshinipunj...@gmail.com> wrote:

> Hii team,
>
> I want that if my target service  doesnt give response within 10 seconds
> the api manager should give response connection timeout error or
> execute fault sequence.
> so i have done the following settings in api manger screen shot attached.
> But even the api manager wits for response and the response comes in 12 or
> 13 seconds.
> Please tell how to achieve.  Please revert asap.
>
> Many thanks,
> Priyadarshini
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 
*M. Thivya* | Software Engineer | WSO2 Inc. 
(M)+94 766461966 | (E) thi...@wso2.com
Blog: https://medium.com/@thivyamahen.1992
LinkedIn: https://www.linkedin.com/in/thivya-mahen/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Printing payload of Payload Factory using Log Mediator

2018-09-17 Thread Thivya Mahenthirarasa
Hi Aman,

You can have log level full as like below in order to view the payload
before and after hitting the payload factory mediator.


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

 
 

   
  
 

   value
   value
   value

 
  
   


 
 

 
 

 
 
  
  
  
   
   



Also get more information on how to set arguments in payload factory
mediator by following the doc[1]



[1] https://docs.wso2.com/display/ESB500/PayloadFactory+Mediator


Regards,
Thivya

On Sat, Sep 15, 2018 at 2:44 PM, Amit Gupta  wrote:

> Use a custom log, and in expression put as .
> . Will print entire envelope
>
> On Sat, 15 Sep 2018, 14:42 Aman Singh,  wrote:
>
>> Hi Guys,
>>
>> I am very new to WSO2.
>> I Have used a Payload Factory and I have inserted a simple XML as payload
>> in it. How do I print the payload of Payload Factory and view it in console
>> using Log Mediator?
>>
>> My sample code is below:-
>>
>> http://ws.apache.org/ns/synapse;>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>  
>> value
>>  value
>>   value
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> Thank you,
>> Aman
>> ___
>> 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
>
>


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com *

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Changing levels of APIs didn't help

2018-07-26 Thread Thivya Mahenthirarasa
On Wed, Jul 25, 2018 at 10:57 AM, Thivya Mahenthirarasa 
wrote:

> Hi All,
>
> I'm having three APIs(PizzaShackAPI, MyAPI, NewAPI) in my set up and when
> i navigate to configure>>logging under "Configure Log4J Loggers" section in
> carbon management console of APIM, i can see the below loggers at level
> "ERROR". I suspect by using this we can view the per API information at
> diffent level. I changed the level of API_LOGGER.admin--MyAPI from "ERROR"
> to "DEBUG". But i couldnt't get any debug level logs even after enabling
> it. Im getting only ERROR level logs for that perticular API.
>
> Loggers Level
>
> API_LOGGER.admin--PizzaShackAPIERROR
> API_LOGGER.admin--MyAPI  ERROR
> API_LOGGER.admin--NewAPIERROR
>
> What is the purpose of having this loggers in management console. Did i
> miss any configuration to make it work?
>
> You responses on this are highly welocmed.
>
> Regards,
> Thivya
>
> --
>
> *Thivya Mahenthirarasa*
>
> *Software Engineer -Support Team | WSO2*
>
>
> *Email: thi...@wso2.com *
>
> *Mobile: +94766461966 <http://wso2.com/signature>*
> *Web: http://wso2.com <http://wso2.com>*
>



-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com *

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Changing levels of APIs didn't help

2018-07-24 Thread Thivya Mahenthirarasa
Hi All,

I'm having three APIs(PizzaShackAPI, MyAPI, NewAPI) in my set up and when i
navigate to configure>>logging under "Configure Log4J Loggers" section in
carbon management console of APIM, i can see the below loggers at level
"ERROR". I suspect by using this we can view the per API information at
diffent level. I changed the level of API_LOGGER.admin--MyAPI from "ERROR"
to "DEBUG". But i couldnt't get any debug level logs even after enabling
it. Im getting only ERROR level logs for that perticular API.

Loggers Level

API_LOGGER.admin--PizzaShackAPIERROR
API_LOGGER.admin--MyAPI  ERROR
API_LOGGER.admin--NewAPIERROR

What is the purpose of having this loggers in management console. Did i
miss any configuration to make it work?

You responses on this are highly welocmed.

Regards,
Thivya

-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com *

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API for getting list of published APIs restricted by roles

2018-07-20 Thread Thivya Mahenthirarasa
Hi,

Hope following the steps stated in WSO2 documentation on Enabling Access
Control Support for API Publisher[1] in order to restrict/view only the
APIs created by the logged in user in API Publisher will cater you
requiremnent.

Try out this and see

[1]
https://docs.wso2.com/display/AM210/Enabling+Access+Control+Support+for+API+Publisher

Regards,
Thivya

On Fri, Jul 20, 2018 at 10:39 AM, HellFire 
wrote:

> Is there any WSO2 AM in-built API which lets you get the list of API that
> are
> restricted by a particular role?
> For example I have created a custom role.
>
> In the WSO2 store page, if you have not logged in, you can only see the
> public APIs published. But as soon as you sign in, you can  also see the
> APIs that are restricted by roles, if you have that role.
>
>
> If we use
> GET https://apis.wso2.com/api/am/store/v0.11/apis
>
> we only get a list of public APIs. I want to get a list of APIs that will
> be
> visible to a particular user once he logs in.
>
>
>
>
>
>
> --
> Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-
> Development-f3.html
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com *

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [dev] Purge specific message from the MB queue

2018-06-06 Thread Thivya Mahenthirarasa
Hi Anusha,

Currently we are not having any methods/properties to purge *one specific
message* from the Message Broker queue. But we can purge all messages in
the queue that it will set the queue count to zero. Refer the WSO2
documentation[1] on purging all messages for more details.

[1]
https://docs.wso2.com/display/MB300/Managing+Queues#ManagingQueues-Purgingqueues

On Tue, Jun 5, 2018 at 3:52 PM, Anusha Ruwanpathirana <
ruwanpathir...@gmail.com> wrote:

> Hi All,
>
> Is there any method to purge specific message from the Message Broker
> queue? If there is an approach, what are the properties need to require for
> purging. Any custom Java implementation is also fine.
>
> Thanks
>
> Best Regards
>
> Anusha
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com *

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Cache mediator not working good for storing json responses.

2018-04-04 Thread Thivya Mahenthirarasa
Hi Adiya,

According to the logs, you are receiving 202 accepted success code, that
means  the response cached for the Endpoint might returning an empty body.

 Could you please add the following property before cache mediator in order
to return the body from the cache to the Endpoint.


 


Try out the solution and let us know whether you could able to sort
out the exception



Regards,

Thivya


On Wed, Apr 4, 2018 at 3:58 PM, aditya shivankar <
shivankar.adit...@gmail.com> wrote:

> Respected Sir/Madam,
>
> Below is my api :
>
> 
> http://ws.apache.org/
> ns/synapse">
> 
> 
> 
> 
> 
>
>  maxMessageSize="1" scope="per-host" timeout="5000">
> 
> 
> 
>
> 
> 
> 
>  type="STRING" value="1392"/>
> 
> 
> 
> 
> 
> 
>  value="true"/>
> 
> 
> 
>
> 
>
> 
> 
> 
> 
> 
> 
>
> and my endpoint :
>
> 
> http://ws.apache.org/ns/synapse;>
> 
> 
>
>
> Getting below error :
>
> ERROR - CacheMediator Error setting response envelope from cache :
> mediation.cache_key
> javax.xml.soap.SOAPException: org.apache.axiom.om.OMException: SOAP
> message MUST NOT contain Processing Instructions(PI)
>
> Please find logs attached.
>
> With Regards,
> Aditya
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error consuming messages from IBM MQ using wso2 proxy service

2018-04-03 Thread Thivya Mahenthirarasa
Hi Aditya,

Could you please compare your configuration with the blog post[1] attached.
I was able to configure successfully with the below blog.

[1]
http://nandikajayawardana.blogspot.com/2015/03/configuring-ibm-mq-with-wso2-esb.html


Regards,
Thivya

On Mon, Apr 2, 2018 at 7:35 PM, aditya shivankar <
shivankar.adit...@gmail.com> wrote:

> Respected Sir/Madam,
>
>
>
> Using IBM MQ 8.0.0.4
>
> WSO2EI 6.1.1
>
>
>
> I followed below document for consuming messages from IBM MQ using wso2
> proxy service.
>
>
>
> https://docs.wso2.com/display/EI611/Configure+with+IBM+WebSphere+MQ#
> ConfigurewithIBMWebSphereMQ-generate.
>
>
>
> Only line I did not understand is , under heading "Copying IBM Websphere
> MQ libraries", point number 10, which states
>
>
>
> "Regenerate .bindings file with the Provider Version : 8 property (if you
> already generated one before), and replace the existing .bindings file (if
> you have one) with the new .bindings file you generated."
>
>
>
> Here I did not understand the meaning of "with the Provider Version : 8
> property". But I tried to regenerate .bindings file in the same folder
> where i created it before two headings under heading "Generating the
> .bindings file".
>
> But when I am adding Initial context , it says " A context with the
> nickname 'file:/C:/jndidirectory' already exists. (AMQ4409)
>
>
>
>
>
>
>
> So I did not regenerate .bindings file and continued with same .bindings
> file which I created under headings "Generating the .bindings file".
>
>
>
> While deploying the MyJMSProxy.xml, I am getting below error. Please guide
>
>
>
> [2018-04-02 19:03:32,672] [EI-Core]  INFO - DeploymentInterceptor
> Deploying Axis2 service: MyJMSProxy {super-tenant}
>
> [2018-04-02 19:03:34,047] [EI-Core]  WARN - JMSListener Error connecting
> to JMS.
>
> com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode
> '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').
>
> at com.ibm.msg.client.wmq.common.internal.Reason.
> createException(Reason.java:203)
>
>
>
> Please find attached  wso2ei error logs and axis2.xml in attachment.
>
>
>
> Thanks and Regards,
>
> Aditya
>
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Car file deployment order

2018-04-02 Thread Thivya Mahenthirarasa
On Mon, Apr 2, 2018 at 6:02 PM, Thivya Mahenthirarasa <thi...@wso2.com>
wrote:

> Hi,
>
> The deployment order follows the order of dependency artifacts added to
> the artifacts.xml file of your car app. Normally by default, it will follow
> the order.
>
> Did you make any changes there? Could you please update your artifacts.xml
> according to your dependency order manually, update the car app, upload it
> again to the server.
>
>
> Example:
>
> If you want to modify the order  as 
> sequence1>>>Sequence2>>Api1>>Proxy1>>>Proxy2,
> just edit the artifacts.xml file of your cap and update the changes and
> upload it to the server.
>
> 
>  type="carbon/application">
>  serverRole="EnterpriseServiceBus"/>
>  serverRole="EnterpriseServiceBus"/>
>  serverRole="EnterpriseServiceBus"/>
>  serverRole="EnterpriseServiceBus"/>
>  serverRole="EnterpriseServiceBus"/>
> 
> 
>
>
> Regards,
>
> Thivya
>
>
> On Sun, Apr 1, 2018 at 8:43 AM, Gayan Dhanushka <gay...@wso2.com> wrote:
>
>> Hi Junior,
>>
>> After the deployment of your car file which consists of the connector,
>> can you please check whether it is is enabled mode from the carbon console ?
>>
>> Regards
>> Gayan
>>
>> On Thu, Mar 29, 2018 at 11:56 PM, Shakila Sasikaran <shak...@wso2.com>
>> wrote:
>>
>>> Hi Junior,
>>>
>>> You can manually edit the dependency order in the source view.
>>>
>>> But we can't change the deployment order of the artifact types.
>>> It will pick up the artifacts in this order Local entries --> Endpoints
>>> --> Sequences --> Message stores --> Templates --> Proxy services -->
>>> Tasks --> Events --> Message processors --> APIs --> Inbound endpoints
>>> --> Other types.
>>>
>>> For example, if we define the dependencies like this
>>>
>>>   
>>> 
>>>   com.example.A1.sequence
>>>   *BtestSequence*
>>>   1.0.0
>>>   xml
>>> 
>>> 
>>>   com.example.A1.sequence
>>>   *AtestSequence*
>>>   1.0.0
>>>   xml
>>> 
>>> 
>>>   com.example.A1.proxy-service
>>>   *AtestProxy*
>>>   1.0.0
>>>   xml
>>> 
>>> 
>>>   com.example.A1.proxy-service
>>>   *testProxy*
>>>   1.0.0
>>>   xml
>>> 
>>>   
>>>
>>> The deployment order would be this:
>>>
>>> 1. BtestSequence
>>> 2. AtestSequence
>>> 3. AtestProxy
>>> 4. testProxy
>>>
>>>
>>> Thanks
>>>
>>> On Thu, Mar 29, 2018 at 8:05 PM, Júnior <fjunio...@gmail.com> wrote:
>>>
>>>> Hi Gayan,
>>>>
>>>> That is weird. That is not working. Don't know the why. We tried that
>>>> as well.
>>>>
>>>> Thanks,
>>>>
>>>> 2018-03-29 10:48 GMT-03:00 Gayan Dhanushka <gay...@wso2.com>:
>>>>
>>>>> Hi Junior,
>>>>>
>>>>> The car files are deployed in alphabetical order. So if you have a car
>>>>> project which depends on another car project in order to make sure that 
>>>>> the
>>>>> dependent project being deployed earlier you may have to prefix it with a
>>>>> name which has a higher alphabetical precedence.
>>>>>
>>>>> Regards
>>>>> Gayan
>>>>>
>>>>> On Wed, Mar 28, 2018 at 1:33 PM, Júnior <fjunio...@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am facing an issue with car file order deployment:
>>>>>>
>>>>>> https://stackoverflow.com/questions/49541746/wso2-car-file-d
>>>>>> eployment-order
>>>>>>
>>>>>> Could someone help us on this?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> --
>>>>>> Francisco Ribeiro
>>>>>> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>>>>>>
>>>>>> ___
>>>>>> Dev mailing list
>>>>>> Dev@wso2.org
>&g

Re: [Dev] Car file deployment order

2018-04-02 Thread Thivya Mahenthirarasa
Hi,

The deployment order follows the order of dependency artifacts added to the
artifacts.xml file of your car app. Normally by default, it will follow the
order.

Did you make any changes there? Could you please update your artifacts.xml
according to your dependency order manually, update the car app, upload it
again to the server.


Example:

If you want to modify the order  as
sequence1>>>Sequence2>>Api1>>Proxy1>>>Proxy2, just edit the artifacts.xml
file of your cap and update the changes and upload it to the server.












Regards,

Thivya


On Sun, Apr 1, 2018 at 8:43 AM, Gayan Dhanushka <gay...@wso2.com> wrote:

> Hi Junior,
>
> After the deployment of your car file which consists of the connector, can
> you please check whether it is is enabled mode from the carbon console ?
>
> Regards
> Gayan
>
> On Thu, Mar 29, 2018 at 11:56 PM, Shakila Sasikaran <shak...@wso2.com>
> wrote:
>
>> Hi Junior,
>>
>> You can manually edit the dependency order in the source view.
>>
>> But we can't change the deployment order of the artifact types.
>> It will pick up the artifacts in this order Local entries --> Endpoints
>> --> Sequences --> Message stores --> Templates --> Proxy services -->
>> Tasks --> Events --> Message processors --> APIs --> Inbound endpoints
>> --> Other types.
>>
>> For example, if we define the dependencies like this
>>
>>   
>> 
>>   com.example.A1.sequence
>>   *BtestSequence*
>>   1.0.0
>>   xml
>> 
>> 
>>   com.example.A1.sequence
>>   *AtestSequence*
>>   1.0.0
>>   xml
>> 
>> 
>>   com.example.A1.proxy-service
>>   *AtestProxy*
>>   1.0.0
>>   xml
>> 
>> 
>>   com.example.A1.proxy-service
>>   *testProxy*
>>   1.0.0
>>   xml
>> 
>>   
>>
>> The deployment order would be this:
>>
>> 1. BtestSequence
>> 2. AtestSequence
>> 3. AtestProxy
>> 4. testProxy
>>
>>
>> Thanks
>>
>> On Thu, Mar 29, 2018 at 8:05 PM, Júnior <fjunio...@gmail.com> wrote:
>>
>>> Hi Gayan,
>>>
>>> That is weird. That is not working. Don't know the why. We tried that as
>>> well.
>>>
>>> Thanks,
>>>
>>> 2018-03-29 10:48 GMT-03:00 Gayan Dhanushka <gay...@wso2.com>:
>>>
>>>> Hi Junior,
>>>>
>>>> The car files are deployed in alphabetical order. So if you have a car
>>>> project which depends on another car project in order to make sure that the
>>>> dependent project being deployed earlier you may have to prefix it with a
>>>> name which has a higher alphabetical precedence.
>>>>
>>>> Regards
>>>> Gayan
>>>>
>>>> On Wed, Mar 28, 2018 at 1:33 PM, Júnior <fjunio...@gmail.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am facing an issue with car file order deployment:
>>>>>
>>>>> https://stackoverflow.com/questions/49541746/wso2-car-file-d
>>>>> eployment-order
>>>>>
>>>>> Could someone help us on this?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> --
>>>>> Francisco Ribeiro
>>>>> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>>>>>
>>>>> ___
>>>>> Dev mailing list
>>>>> Dev@wso2.org
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Gayan Dhanushka
>>>> Associate Technical Lead
>>>> http://wso2.com/
>>>> Lean Enterprise Middleware
>>>>
>>>> Mobile - LK- 071 666 2327
>>>> Mobile USA - 612-244-4873 <(612)%20244-4873>
>>>>
>>>>
>>>> Office
>>>> Tel   : 94 11 214 5345
>>>> Fax  : 94 11 214 5300
>>>>
>>>
>>>
>>>
>>> --
>>> Francisco Ribeiro
>>> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Shakila Sasikaran
>> Software Engineer
>> Mobile :+94 (0) 77 526 6848 <+94%2077%20526%206848>
>> shak...@wso2.com
>> WSO2, Inc.
>> lean . enterprise . middleware
>> http://www.wso2.com/
>>
>
>
>
> --
> Gayan Dhanushka
> Associate Technical Lead
> http://wso2.com/
> Lean Enterprise Middleware
>
> Mobile - LK- 071 666 2327
> Mobile USA - 612-244-4873 <(612)%20244-4873>
>
>
> Office
> Tel   : 94 11 214 5345
> Fax  : 94 11 214 5300
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Store page is not responding when Add-API call using Jaggery APP.

2017-12-18 Thread Thivya Mahenthirarasa
Hi Team,

Please find the git Jira[1],

[1] https://github.com/wso2/product-apim/issues/2011

Regards,
Thivya


On Mon, Dec 18, 2017 at 2:16 PM, Thivya Mahenthirarasa <thi...@wso2.com>
wrote:

> Hi Chamalee,
>
> Your findings are correct. I have used the REST API for the ticket and it
> works fine. But I'm not sure what the customers are using whether the
> jaggary app or REST API.
>
>
> Sure I will create the git jira. Thank you for the input on this
>
>
> Thanks,
> Thivya
>
> On Mon, Dec 18, 2017 at 2:09 PM, Chamalee De Silva <chama...@wso2.com>
> wrote:
>
>> Hi Thivya,
>>
>> Yes, it is reproducible when you have created an API with using jaggery
>> API [1] and then publish it (I used UI operations to publish) and even
>> after login to the API store
>>
>> And this happens only for the APIs created through Jaggery API directly.
>> (not for the APIs created through UI or new REST API).
>>
>> Since we have deprecated  the old REST APIs (Jaggery APIs) [2] in 2.1.0,
>> can you use the new REST API [3] to continue your task ?
>>
>> And you can open up a git issue in [4] to get this fixed.
>>
>>
>>
>> [1]https://docs.wso2.com/display/AM210/publisher+APIs#Publis
>> herAPIs-AddAPI
>> [2] https://docs.wso2.com/display/AM210/Deprecated+APIs
>> [3] https://docs.wso2.com/display/AM210/RESTful+APIs
>> [4] https://github.com/wso2/product-apim/issues
>>
>>
>> Thanks,
>> Chamalee
>>
>> On Mon, Dec 18, 2017 at 1:57 PM, Chamalee De Silva <chama...@wso2.com>
>> wrote:
>>
>>> Hi Thivya,
>>> How did you publish the API ?
>>> (Since the doc[1] creates an API which is in the created state)
>>>
>>>
>>>
>>>
>>>
>>> [1]https://docs.wso2.com/display/AM210/publisher+APIs#Publis
>>> herAPIs-AddAPI
>>>
>>> On Mon, Dec 18, 2017 at 1:36 PM, Thivya Mahenthirarasa <thi...@wso2.com>
>>> wrote:
>>>
>>>> Hi Chamalee,
>>>>
>>>> This is reproducible even after login to the API Store when you are
>>>> trying to open the API Console.
>>>>
>>>>
>>>>
>>>> *Regards,*
>>>> *THivya*
>>>>
>>>> On Mon, Dec 18, 2017 at 1:33 PM, Thivya Mahenthirarasa <thi...@wso2.com
>>>> > wrote:
>>>>
>>>>> Hi Irham,
>>>>>
>>>>>
>>>>>
>>>>> *Add API [1] is showing the mentioned issue.**Add API with Path
>>>>> Parameter[2] works fine.*
>>>>>
>>>>> The only difference in both is resource
>>>>>
>>>>>
>>>>>- In Add API the resources are added directly.
>>>>>
>>>>>
>>>>> resourceCount=0=GET
>>>>> 0=Application=Unlimited
>>>>>
>>>>>
>>>>>- In AddAPIWith Parameter the resources are added as swagger
>>>>>
>>>>> eg:-
>>>>> swagger={"paths" : {"/CheckPhoneNumber" : {"post" : {"x-auth-type" :
>>>>> "Application%20%26%20Application%20User", "x-scope" : "read_number",
>>>>> "x-throttling-tier" : "Unlimited", "responses" : {"200" : {}}}, "get" :
>>>>> {"x-auth-type" : "Application%20%26%20Application%20User",
>>>>> "x-throttling-tier" : "Unlimited", "responses" : {"200" : {}},
>>>>> "parameters" : [{"name" : "PhoneNumber", "paramType" : "query",
>>>>> "required" : false, "type" : "string", "description" : "Phone Number",
>>>>> "in" : "query"}, {"name" : "LicenseKey", "paramType" : "query",
>>>>> "required" : false, "type" : "string", "description" : "License Key",
>>>>> "in" : "query"}]}}, "/" : {"put" : {"responses" : {"200" : {}}}, "get" :
>>>>> {"responses" : {"200" : {}, "swagger" : "2.0", "x-wso2-security" :
>>>>> {"apim" : {"x-wso2-scopes" : [{"description" : "", "name" :
>>>>> "read_number",

Re: [Dev] Store page is not responding when Add-API call using Jaggery APP.

2017-12-18 Thread Thivya Mahenthirarasa
Hi Chamalee,

Your findings are correct. I have used the REST API for the ticket and it
works fine. But I'm not sure what the customers are using whether the
jaggary app or REST API.


Sure I will create the git jira. Thank you for the input on this


Thanks,
Thivya

On Mon, Dec 18, 2017 at 2:09 PM, Chamalee De Silva <chama...@wso2.com>
wrote:

> Hi Thivya,
>
> Yes, it is reproducible when you have created an API with using jaggery
> API [1] and then publish it (I used UI operations to publish) and even
> after login to the API store
>
> And this happens only for the APIs created through Jaggery API directly.
> (not for the APIs created through UI or new REST API).
>
> Since we have deprecated  the old REST APIs (Jaggery APIs) [2] in 2.1.0,
> can you use the new REST API [3] to continue your task ?
>
> And you can open up a git issue in [4] to get this fixed.
>
>
>
> [1]https://docs.wso2.com/display/AM210/publisher+APIs#PublisherAPIs-AddAPI
> [2] https://docs.wso2.com/display/AM210/Deprecated+APIs
> [3] https://docs.wso2.com/display/AM210/RESTful+APIs
> [4] https://github.com/wso2/product-apim/issues
>
>
> Thanks,
> Chamalee
>
> On Mon, Dec 18, 2017 at 1:57 PM, Chamalee De Silva <chama...@wso2.com>
> wrote:
>
>> Hi Thivya,
>> How did you publish the API ?
>> (Since the doc[1] creates an API which is in the created state)
>>
>>
>>
>>
>>
>> [1]https://docs.wso2.com/display/AM210/publisher+APIs#Publis
>> herAPIs-AddAPI
>>
>> On Mon, Dec 18, 2017 at 1:36 PM, Thivya Mahenthirarasa <thi...@wso2.com>
>> wrote:
>>
>>> Hi Chamalee,
>>>
>>> This is reproducible even after login to the API Store when you are
>>> trying to open the API Console.
>>>
>>>
>>>
>>> *Regards,*
>>> *THivya*
>>>
>>> On Mon, Dec 18, 2017 at 1:33 PM, Thivya Mahenthirarasa <thi...@wso2.com>
>>> wrote:
>>>
>>>> Hi Irham,
>>>>
>>>>
>>>>
>>>> *Add API [1] is showing the mentioned issue.**Add API with Path
>>>> Parameter[2] works fine.*
>>>>
>>>> The only difference in both is resource
>>>>
>>>>
>>>>- In Add API the resources are added directly.
>>>>
>>>>
>>>> resourceCount=0=GET
>>>> 0=Application=Unlimited
>>>>
>>>>
>>>>- In AddAPIWith Parameter the resources are added as swagger
>>>>
>>>> eg:-
>>>> swagger={"paths" : {"/CheckPhoneNumber" : {"post" : {"x-auth-type" :
>>>> "Application%20%26%20Application%20User", "x-scope" : "read_number",
>>>> "x-throttling-tier" : "Unlimited", "responses" : {"200" : {}}}, "get" :
>>>> {"x-auth-type" : "Application%20%26%20Application%20User",
>>>> "x-throttling-tier" : "Unlimited", "responses" : {"200" : {}},
>>>> "parameters" : [{"name" : "PhoneNumber", "paramType" : "query",
>>>> "required" : false, "type" : "string", "description" : "Phone Number",
>>>> "in" : "query"}, {"name" : "LicenseKey", "paramType" : "query",
>>>> "required" : false, "type" : "string", "description" : "License Key",
>>>> "in" : "query"}]}}, "/" : {"put" : {"responses" : {"200" : {}}}, "get" :
>>>> {"responses" : {"200" : {}, "swagger" : "2.0", "x-wso2-security" :
>>>> {"apim" : {"x-wso2-scopes" : [{"description" : "", "name" :
>>>> "read_number", "roles" : "admin", "key" : "read_number"}]}}, "info" : {
>>>> "title" : "PhoneVerification", "version" : "1.0.0"}}
>>>>
>>>>
>>>>
>>>>
>>>> [1]https://docs.wso2.com/display/AM210/publisher+APIs#Publis
>>>> herAPIs-AddAPI
>>>>
>>>> [2] https://docs.wso2.com/display/AM210/publisher+APIs#Publisher
>>>> APIs-AddAPIwithPathParameter
>>>>
>>>> *Regards,*
>>>> *Thivya*
>>>>
>&

Re: [Dev] Store page is not responding when Add-API call using Jaggery APP.

2017-12-18 Thread Thivya Mahenthirarasa
Hi Chamalee,

This is reproducible even after login to the API Store when you are trying
to open the API Console.



*Regards,*
*THivya*

On Mon, Dec 18, 2017 at 1:33 PM, Thivya Mahenthirarasa <thi...@wso2.com>
wrote:

> Hi Irham,
>
>
>
> *Add API [1] is showing the mentioned issue.**Add API with Path
> Parameter[2] works fine.*
>
> The only difference in both is resource
>
>
>- In Add API the resources are added directly.
>
>
> resourceCount=0=GET=Application&
> resourceMethodThrottlingTier-0=Unlimited
>
>
>- In AddAPIWith Parameter the resources are added as swagger
>
> eg:-
> swagger={"paths" : {"/CheckPhoneNumber" : {"post" : {"x-auth-type" :
> "Application%20%26%20Application%20User", "x-scope" : "read_number",
> "x-throttling-tier" : "Unlimited", "responses" : {"200" : {}}}, "get" : {
> "x-auth-type" : "Application%20%26%20Application%20User",
> "x-throttling-tier" : "Unlimited", "responses" : {"200" : {}},
> "parameters" : [{"name" : "PhoneNumber", "paramType" : "query", "required" :
> false, "type" : "string", "description" : "Phone Number", "in" : "query"},
> {"name" : "LicenseKey", "paramType" : "query", "required" : false, "type" :
> "string", "description" : "License Key", "in" : "query"}]}}, "/" : {"put" :
> {"responses" : {"200" : {}}}, "get" : {"responses" : {"200" : {},
> "swagger" : "2.0", "x-wso2-security" : {"apim" : {"x-wso2-scopes" : [{
> "description" : "", "name" : "read_number", "roles" : "admin", "key" :
> "read_number"}]}}, "info" : {"title" : "PhoneVerification", "version" :
> "1.0.0"}}
>
>
>
>
> [1]https://docs.wso2.com/display/AM210/publisher+APIs#PublisherAPIs-AddAPI
>
> [2] https://docs.wso2.com/display/AM210/publisher+APIs#PublisherAPIs-
> AddAPIwithPathParameter
>
> *Regards,*
> *Thivya*
>
> On Mon, Dec 18, 2017 at 12:01 PM, Chamalee De Silva <chama...@wso2.com>
> wrote:
>
>> Hi Thivya,
>>
>> This is reproducible when you are trying to open the API Console without
>> login to the API Store.
>> Login to the API so that this "fetching resource list:
>> https://10.100.5.39:9443/store/api-docs/admin/PhoneVer
>> ification/1.0.0?envName=undefined; Please wait." will go out.
>>
>>
>>
>> Thanks,
>> Chamalee
>>
>> On Mon, Dec 18, 2017 at 11:53 AM, Irham Iqbal <iq...@wso2.com> wrote:
>>
>>> Hi Thivya,
>>>
>>> Please share the API request you're sending to add API.
>>> In addition to that you can create another API from the UI and compare
>>> the swagger.json and api.json in the registry and find out whats wrong with
>>> your request.
>>> Also if your using the sample API request as it is in the doc, which one
>>> your trying "Add API" or "Add API with Path Parameter"
>>>
>>> Thanks,
>>> Iqbal
>>>
>>> On Mon, Dec 18, 2017 at 11:18 AM, Thivya Mahenthirarasa <thi...@wso2.com
>>> > wrote:
>>>
>>>> Hi Team,
>>>>
>>>> I'm observing the below line in store only when I created API by using
>>>> jaggery app in APIM210. I have followed the publicherAPIs Documentaion[1].
>>>>
>>>> "fetching resource list: https://10.100.5.39:9443/store
>>>> /api-docs/admin/PhoneVerification/1.0.0?envName=undefined; Please
>>>> wait."
>>>>
>>>> Steps to reproduce
>>>> 1. Add an API using jaggery app.
>>>> 2. Log in to store and click API console
>>>>
>>>> Attaching the screenshot.
>>>>
>>>>
>>>> *Highly appreciate your suggestions and responses on this.*
>>>>
>>>>
>>>> [1] https://docs.wso2.com/display/AM210/publisher+APIs#Publisher
>>>> APIs-AddAPI
>>>>
>>>>
>>>> *Regards,*
>>>> *Thivya*
>>>> --
>>>>
>>>> *Thivya Mahenthirarasa*
>>>>
>>>> *Software Engineer -Suppo

Re: [Dev] Store page is not responding when Add-API call using Jaggery APP.

2017-12-18 Thread Thivya Mahenthirarasa
Hi Irham,



*Add API [1] is showing the mentioned issue.**Add API with Path
Parameter[2] works fine.*

The only difference in both is resource


   - In Add API the resources are added directly.


resourceCount=0=GET=Application=Unlimited


   - In AddAPIWith Parameter the resources are added as swagger

eg:-
swagger={"paths" : {"/CheckPhoneNumber" : {"post" : {"x-auth-type" :
"Application%20%26%20Application%20User", "x-scope" : "read_number",
"x-throttling-tier" : "Unlimited", "responses" : {"200" : {}}}, "get" : {
"x-auth-type" : "Application%20%26%20Application%20User",
"x-throttling-tier" : "Unlimited", "responses" : {"200" : {}}, "parameters" :
[{"name" : "PhoneNumber", "paramType" : "query", "required" : false, "type" :
"string", "description" : "Phone Number", "in" : "query"}, {"name" :
"LicenseKey", "paramType" : "query", "required" : false, "type" : "string",
"description" : "License Key", "in" : "query"}]}}, "/" : {"put" : {
"responses" : {"200" : {}}}, "get" : {"responses" : {"200" : {},
"swagger" : "2.0", "x-wso2-security" : {"apim" : {"x-wso2-scopes" : [{
"description" : "", "name" : "read_number", "roles" : "admin", "key" :
"read_number"}]}}, "info" : {"title" : "PhoneVerification", "version" :
"1.0.0"}}




[1]https://docs.wso2.com/display/AM210/publisher+APIs#PublisherAPIs-AddAPI

[2]
https://docs.wso2.com/display/AM210/publisher+APIs#PublisherAPIs-AddAPIwithPathParameter

*Regards,*
*Thivya*

On Mon, Dec 18, 2017 at 12:01 PM, Chamalee De Silva <chama...@wso2.com>
wrote:

> Hi Thivya,
>
> This is reproducible when you are trying to open the API Console without
> login to the API Store.
> Login to the API so that this "fetching resource list:
> https://10.100.5.39:9443/store/api-docs/admin/Phon
> eVerification/1.0.0?envName=undefined; Please wait." will go out.
>
>
>
> Thanks,
> Chamalee
>
> On Mon, Dec 18, 2017 at 11:53 AM, Irham Iqbal <iq...@wso2.com> wrote:
>
>> Hi Thivya,
>>
>> Please share the API request you're sending to add API.
>> In addition to that you can create another API from the UI and compare
>> the swagger.json and api.json in the registry and find out whats wrong with
>> your request.
>> Also if your using the sample API request as it is in the doc, which one
>> your trying "Add API" or "Add API with Path Parameter"
>>
>> Thanks,
>> Iqbal
>>
>> On Mon, Dec 18, 2017 at 11:18 AM, Thivya Mahenthirarasa <thi...@wso2.com>
>> wrote:
>>
>>> Hi Team,
>>>
>>> I'm observing the below line in store only when I created API by using
>>> jaggery app in APIM210. I have followed the publicherAPIs Documentaion[1].
>>>
>>> "fetching resource list: https://10.100.5.39:9443/store
>>> /api-docs/admin/PhoneVerification/1.0.0?envName=undefined; Please wait."
>>>
>>> Steps to reproduce
>>> 1. Add an API using jaggery app.
>>> 2. Log in to store and click API console
>>>
>>> Attaching the screenshot.
>>>
>>>
>>> *Highly appreciate your suggestions and responses on this.*
>>>
>>>
>>> [1] https://docs.wso2.com/display/AM210/publisher+APIs#Publisher
>>> APIs-AddAPI
>>>
>>>
>>> *Regards,*
>>> *Thivya*
>>> --
>>>
>>> *Thivya Mahenthirarasa*
>>>
>>> *Software Engineer -Support Team | WSO2*
>>>
>>>
>>> *Email: thi...@wso2.com <thi...@wso2.com>*
>>>
>>> *Mobile: +94766461966 <+94%2076%20646%201966>
>>> <http://wso2.com/signature>*
>>> *Web: http://wso2.com <http://wso2.com>*
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Irham Iqbal
>> Software Engineer
>> WSO2
>> phone: +94 777888452
>> <http://wso2.com/signature>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thanks & Regards,
>
> *Chamalee De Silva*
> Software Engineer
> *WS**O2* Inc. :http://wso2.com/
>
> Office   :- *+94 11 2145345 <%2B94%2011%202145345>*
> mobile  :- *+94 7 <%2B94%2077%202782039>1 4315942*
>
>


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Store page is not responding when Add-API call using Jaggery APP.

2017-12-17 Thread Thivya Mahenthirarasa
Hi Team,

I'm observing the below line in store only when I created API by using
jaggery app in APIM210. I have followed the publicherAPIs Documentaion[1].

"fetching resource list:
https://10.100.5.39:9443/store/api-docs/admin/PhoneVerification/1.0.0?envName=undefined;
Please wait."

Steps to reproduce
1. Add an API using jaggery app.
2. Log in to store and click API console

Attaching the screenshot.


*Highly appreciate your suggestions and responses on this.*


[1] https://docs.wso2.com/display/AM210/publisher+APIs#PublisherAPIs-AddAPI


*Regards,*
*Thivya*
-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] error occur when submitting POST/PUT requests via API-M : ERROR - JsonUtil #writeAsJson. Payload could not be written as JSON. MessageID:

2017-12-04 Thread Thivya Mahenthirarasa
assThroughHttpSender.java:632)
>> at org.apache.synapse.transport.passthru.PassThroughHttpSender.
>> invoke(PassThroughHttpSender.java:266)
>> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
>> .
>> .
>> .
>> Caused by: org.apache.axis2.AxisFault: Payload could not be written as
>> JSON.
>> at org.apache.synapse.commons.json.JsonUtil.writeAsJson(JsonUti
>> l.java:276)
>> at org.apache.synapse.commons.json.JsonFormatter.writeTo(JsonFo
>> rmatter.java:62
>>
>>
>> If you have come across such an incident or have a solution please kindly
>> share the wisdom
>>
>> Many thanks
>>
>> --
>> *Dushantha Nayanajith Chandima Batuwita*
>> Software Engineer Support | WSO2
>> dushan...@wso2.com
>> mobile : 0094777453010
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Vinod Kavinda
> Senior Software Engineer
> *WSO2 Inc. - lean . enterprise . middleware <http://www.wso2.com>.*
> Mobile : +94 (0) 712 415544
> Blog : http://soatechflicks.blogspot.com/
> [image: http://wso2.com/signature]
> <http://wso2.com/signature>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] nginx master_process on; (code=exited, status=1/FAILURE)

2017-11-28 Thread Thivya Mahenthirarasa
Hi Dushantha,

It seems the port 80 is already in use on your local machine. It is an
Apache port. You need to kill the processes running and restart the Nginx
server again.

On Tue, Nov 28, 2017 at 5:09 PM, Dushantha Batuwita <dushan...@wso2.com>
wrote:

> Hi Dev
>
> I have installed the nginx and when I try  starting the nginx, I
> receive following error.
>
>  sudo service nginx start
>
> Job for nginx.service failed because the control process exited with error
> code.
> See "systemctl  status nginx.service" and "journalctl  -xe" for details.
>
>
> when I check the status it gives me.
>
> ● nginx.service - A high performance web server and a reverse proxy server
>Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor
> preset: enabled)
>Active: failed (Result: exit-code) since Tue 2017-11-28 16:33:48 +0530;
> 50s ago
>  Docs: man:nginx(8)
>   Process: 953 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on;
> master_process on; (code=exited, status=1/FAILURE)
>
> නෙවැ 28 16:44:57 dushantha-ThinkPad-X1-Carbon-5th nginx[2996]: nginx:
> [emerg] bind() to [::]:80 failed (98: Address already in use)
> නෙවැ 28 16:44:58 dushantha-ThinkPad-X1-Carbon-5th nginx[2996]: nginx:
> [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
> නෙවැ 28 16:44:58 dushantha-ThinkPad-X1-Carbon-5th nginx[2996]: nginx:
> [emerg] bind() to [::]:80 failed (98: Address already in use)
> නෙවැ 28 16:44:58 dushantha-ThinkPad-X1-Carbon-5th nginx[2996]: nginx:
> [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
> නෙවැ 28 16:44:58 dushantha-ThinkPad-X1-Carbon-5th nginx[2996]: nginx:
> [emerg] bind() to [::]:80 failed (98: Address already in use)
> නෙවැ 28 16:44:59 dushantha-ThinkPad-X1-Carbon-5th nginx[2996]: nginx:
> [emerg] still could not bind()
> නෙවැ 28 16:44:59 dushantha-ThinkPad-X1-Carbon-5th systemd[1]:
> nginx.service: Control process exited, code=exited status=1
> නෙවැ 28 16:44:59 dushantha-ThinkPad-X1-Carbon-5th systemd[1]: Failed to
> start A high performance web server and a reverse proxy server.
> නෙවැ 28 16:44:59 dushantha-ThinkPad-X1-Carbon-5th systemd[1]:
> nginx.service: Unit entered failed state.
> නෙවැ 28 16:44:59 dushantha-ThinkPad-X1-Carbon-5th systemd[1]:
> nginx.service: Failed with result 'exit-code'.
>
>
>
>
> Is there any possible solution to get rid of the error
> regards
>
>
>
>
> --
> *Dushantha Nayanajith Chandima Batuwita*
> Software Engineer Support | WSO2
> dushan...@wso2.com
> mobile : 0094777453010
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error occurs with Response caching enabled.

2017-11-24 Thread Thivya Mahenthirarasa
tor.java:118)
>> at org.apache.synapse.mediators.AbstractListMediator.mediate(Ab
>> stractListMediator.java:97)
>> at org.apache.synapse.mediators.AbstractListMediator.mediate(Ab
>> stractListMediator.java:59)
>> at org.apache.synapse.mediators.base.SequenceMediator.mediate(S
>> equenceMediator.java:158)
>> at org.apache.synapse.rest.Resource.process(Resource.java:343)
>> at org.apache.synapse.rest.API.process(API.java:338)
>> at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RES
>> TRequestHandler.java:90)
>> at org.apache.synapse.rest.RESTRequestHandler.process(RESTReque
>> stHandler.java:56)
>> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.inject
>> Message(Axis2SynapseEnvironment.java:304)
>> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handle
>> Message(SynapseCallbackReceiver.java:554)
>> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receiv
>> e(SynapseCallbackReceiver.java:188)
>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>> at org.apache.synapse.transport.passthru.ClientWorker.run(Clien
>> tWorker.java:262)
>> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.
>> run(NativeWorkerPool.java:172)
>> 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)
>> Caused by: org.apache.axis2.AxisFault: Payload could not be written as
>> JSON.
>> at org.apache.synapse.commons.json.JsonUtil.writeAsJson(JsonUti
>> l.java:276)
>> at org.apache.synapse.commons.json.JsonFormatter.writeTo(JsonFo
>> rmatter.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
>>
>>
>
>
> --
>
> *Krishan Wijesena*
> Software Engineer | WSO2
>
> Email : krish...@wso2.com
> Mobile : +94776219923 <+94%2077%20621%209923>
> WSO2 Inc : http://wso2.com
> [image: http://wso2.com/signature] <http://wso2.com/signature>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] How to compare two synapse properties in ESB

2017-11-23 Thread Thivya Mahenthirarasa
Hi Dev,

Requirement: I need to check a condition before loop back to out sequence
whether the USER_NAME and PATIENT_ID are equal.

I'm using a filter in my in sequence.


   
  
   


I'm seeing always "evaluates to false and no else path - skipping child
mediators" in console even in the case of synapse properties USER_NAME and
PATIENT_ID are equal.

Could anyone help?


Thanks,
Thivya


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Secure Communication using JSON Web Token (JWT)

2017-11-22 Thread Thivya Mahenthirarasa
Hi Dev,

I'm transferring some attributes by the claims of *JSON Web Token (JWT)  *from
the end user(APIM210) to my backend(ESB500) by following the wos2 doc[1].

And I have used Base64Utils to decode the head attributes and received the
needed attribute at the synapse level of the ESB(backend). The piece of
codes is as follows.

But I feel not satisfied that it's not a secure way as this encoding and
decoding can be modified by the third party in during the communication.

Could you help in suggesting ideas in achieving the validation to be done
in ESB level(decoding should be done in ESB level )?


String jwt_assertion = (String) headers.get("x-jwt-assertion"); //the
header element from jwt

String [] jwt_assertion_items = jwt_assertion.split("\\.");

byte[] byteArray =  Base64Utils.decode(jwt_assertion_items[1]); //
retrieve the JWT payload



[1]
https://docs.wso2.com/display/AM200/Passing+Enduser+Attributes+to+the+Backend+Using+JWT#PassingEnduserAttributestotheBackendUsingJWT-ChangingtheJWTencodingtoBase64URLencoding


Thanks in advance



Regards,
Thivya
-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
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 Thivya Mahenthirarasa
Hi Senuwan,

You can achieve by using simply adding a property mediator. If it is
synapse property definitely you could able to access in out sequence too.




Thanks,
Thivya

On Wed, Nov 22, 2017 at 10:09 AM, Senuwan Withana <senu...@wso2.com> 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
>
>


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to include user profile email in JWT token

2017-11-20 Thread Thivya Mahenthirarasa
Hi Dushantha,

Try creating a new user profile on your key manager with the email
attribute and try the scenario again.  The browser might have kept the
cache due to which you couldn't be able to find the email.


Regards,
Thivya

On Mon, Nov 20, 2017 at 5:18 PM, Dushantha Batuwita <dushan...@wso2.com>
wrote:

>
> Hi Dev
>
> I’m involved in a task which is having API-M and IS as KM cluster,
> There I generate a JWT token by going through [1]document.
>
> When I retrieve the jwt token and check by decoding I can’t find the users
> email which I have already set at user profile level.
>
> *Sample decoded JWT payload*
>
> {
>
>  "http://wso2.org/claims/userid": "0a6eb289-9e02-4fd6-b8a6-26ea9c7ed360",
>
>  "http://wso2.org/claims/username": "patient1",
>
>  "http://wso2.org/claims/role": [
>
>"patient",
>
>"Internal/everyone"
>
>  ],
>
>  "http://wso2.org/claims/applicationtier": "Unlimited",
>
>  "http://wso2.org/claims/keytype": "PRODUCTION",
>
>  "http://wso2.org/claims/version": "v1.0",
>
>  "iss": "wso2.org/products/am",
>
>  "http://wso2.org/claims/applicationname": "patientApplication",
>
>  "http://wso2.org/claims/enduser": "patient1@carbon.super",
>
>  "http://wso2.org/claims/enduserTenantId": "-1234",
>
>  "http://wso2.org/claims/givenname": "Saman",
>
>  "http://wso2.org/claims/created": "2017-11-20T13:43:39",
>
>  "http://wso2.org/claims/fullname": "patient1",
>
>  "http://wso2.org/claims/modified": "2017-11-20T15:00:58",
>
>  "http://wso2.org/claims/subscriber": "patient1",
>
>  "http://wso2.org/claims/tier": "Unlimited",
>
>  "http://wso2.org/claims/emailaddress": "saman...@tahoo.com",
>
>  "http://wso2.org/claims/lastname": "patient1",
>
>  "http://wso2.org/claims/applicationid": "5",
>
>  "http://wso2.org/claims/usertype": "APPLICATION",
>
>  "exp": 1511176687,
>
>  "http://wso2.org/claims/apicontext": "/patientInfo/v1.0"
>
> }
>
>
> Please advise If I’m missing out something when I configure to include
> user email
>
> [1]https://docs.wso2.com/display/AM200/Passing+Enduser+
> Attributes+to+the+Backend+Using+JWT
>
>
>
> Many thanks
>
>
>
>
>
> --
> *Dushantha Nayanajith Chandima Batuwita*
> Software Engineer Support | WSO2
> dushan...@wso2.com
> mobile : 0094777453010
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [dev] Observing Exception after configured IS as a keymangaer

2017-11-19 Thread Thivya Mahenthirarasa
I'm observing the below error on my APIM210 pack after configured it with
IS530 as a key manager(H2 database). I can see both nodes works fine but
still, i m observing the exception in the console of APIM.


Exception in thread "Timer-4" com.google.gson.JsonSyntaxException:
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at
line 19 column 1 path $
at
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)
at com.google.gson.Gson.fromJson(Gson.java:887)
at com.google.gson.Gson.fromJson(Gson.java:852)
at com.google.gson.Gson.fromJson(Gson.java:801)
at com.google.gson.Gson.fromJson(Gson.java:773)
at
org.wso2.carbon.apimgt.gateway.throttling.util.BlockingConditionRetriever.retrieveBlockConditionsData(BlockingConditionRetriever.java:96)
at
org.wso2.carbon.apimgt.gateway.throttling.util.BlockingConditionRetriever.loadBlockingConditionsFromWebService(BlockingConditionRetriever.java:105)
at
org.wso2.carbon.apimgt.gateway.throttling.util.BlockingConditionRetriever.run(BlockingConditionRetriever.java:51)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was
STRING at line 19 column 1 path $[2017-11-19 20:23:08,619] ERROR -
KeyTemplateRetriever Exception when retrieving throttling data from remote
endpoint
Unexpected character (<) at position 28.
at org.json.simple.parser.Yylex.yylex(Unknown Source)
at org.json.simple.parser.JSONParser.nextToken(Unknown Source)
at org.json.simple.parser.JSONParser.parse(Unknown Source)
at org.json.simple.parser.JSONParser.parse(Unknown Source)
at org.json.simple.parser.JSONParser.parse(Unknown Source)
at
org.wso2.carbon.apimgt.gateway.throttling.util.KeyTemplateRetriever.retrieveKeyTemplateData(KeyTemplateRetriever.java:100)
at
org.wso2.carbon.apimgt.gateway.throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWebService(KeyTemplateRetriever.java:111)
at
org.wso2.carbon.apimgt.gateway.throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriever.java:54)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)

at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
at
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213)
... 9 more
Exception in thread "Timer-5" java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at java.util.Arrays$ArrayList.(Arrays.java:3813)
at java.util.Arrays.asList(Arrays.java:3800)
at
org.wso2.carbon.apimgt.gateway.throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWebService(KeyTemplateRetriever.java:111)
at
org.wso2.carbon.apimgt.gateway.throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriever.java:54)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)



When I do search I found out a similar JIRA[1] where they told about the
throttling. I'm also having advanced throttling in a disabled state.
Could you please advice on this?


[1] https://wso2.org/jira/browse/APIMANAGER-5572
-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Observing Missing Timestamp exception when doing creation via rest client

2017-11-14 Thread Thivya Mahenthirarasa
Hi Mushtaq/Irham,

I have enabled the wire logs,

The request which comes to ESB is as follows, which could able to produce
the actual creation in the backend.


http://schemas.xmlsoap.org/soap/envelope/;>
   
  http://ws.apache.org/ns/synapse; />
   
   
  http://service.sample.central.com;>
 
http://dto.service.sample.central.com/xsd;>
   ?
   ?
   ?

http://dto.service.sample.central.com/xsd;>
   ?
   ?

http://dto.service.sample.central.com/xsd;>
   ?
   ?
   ?

http://dto.service.sample.central.com/xsd;>
   ?
   ?
   ?

http://dto.service.sample.central.com/xsd;>?
http://dto.service.sample.central.com/xsd;>105665
http://dto.service.sample.central.com/xsd;>
   ?
   ?
   ?

 
  
   




The request which goes from the ESB is as follows,due to which Backend is
producing the mentioned timestamp error.


http://schemas.xmlsoap.org/soap/envelope/;>
   
  http://ws.apache.org/ns/synapse; />
 * http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
<http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd>"
/>*
   
   
  http://service.sample.central.com;>
 
http://dto.service.sample.central.com/xsd;>
   ?
   ?
   ?

http://dto.service.sample.central.com/xsd;>
   ?
   ?

http://dto.service.sample.central.com/xsd;>
   ?
   ?
   ?

http://dto.service.sample.central.com/xsd;>
   ?
   ?
   ?

http://dto.service.sample.central.com/xsd;>?
http://dto.service.sample.central.com/xsd;>105665
http://dto.service.sample.central.com/xsd;>
   ?
   ?
   ?

 
  
   


The response is as follows.


http://schemas.xmlsoap.org/soap/envelope/;>
   
  http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd;
soapenv:mustUnderstand="1">
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd;
wsu:Id="Timestamp-5318">
2017-11-15T04:45:28.638Z
2017-11-15T04:50:28.638Z
 
  
   
   
  http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
">
 wsse:InvalidSecurity
 Missing Timestamp
 
  
   


What is the root cause for *wsse:Security *got added in the Soap Header.
And How can i overcome this issue.

Thank you for the responses.

Regards,
Thivya





On Wed, Nov 15, 2017 at 5:54 AM, Mushthaq Rumy <musht...@wso2.com> wrote:

> Hi Thivya,
>
> As Irham have suggested better to enable wire logs and check. Furthermore,
> seems like it is checking for a time stamp in the header tag.
>
> Thanks & Regards,
> Mushthaq
>
> On Wed, Nov 15, 2017 at 5:21 AM, Irham Iqbal <iq...@wso2.com> wrote:
>
>> Hi Thuvya,
>>
>> You can enable the wire log and check the response headers and status
>> code to narrow down this. follow the blog[1] to know about wire logs.
>>
>> [1] http://mytecheye.blogspot.com/2013/09/wso2-esb-all-about
>> -wire-logs.html
>>
>> Thanks,
>> Iqbal
>>
>> On Tue, Nov 14, 2017 at 8:10 PM, Thivya Mahenthirarasa <thi...@wso2.com>
>> wrote:
>>
>>> Hi Dev,
>>>
>>> When I invoke POST method to create resource in a legacy(SOAP) backend.
>>> (Backe end is secured)in my API of a WUM updated ESB500 pack from a rest
>>> client, I'm observing exception as follows from the Backend soap service.
>>> The Other Methods (DELETE/GET) are working fine.
>>>
>>>
>>> wsse:InvalidSecurity
>>>  Missing Timestamp
>>>
>>>
>>> The resource of the API
>>>
>>> 
>>>   
>>>  >> type="STRING"/>
>>>  >> type="STRING"/>
>>>  >> value="urn:postCMedi"/>
>>>  
>>> 
>>>http://schemas.
>>> xmlsoap.org/soap/envelope/">
>>>   
>>>  
>>>   
>>>   
>>>

[Dev] Observing Missing Timestamp exception when doing creation via rest client

2017-11-14 Thread Thivya Mahenthirarasa
Hi Dev,

When I invoke POST method to create resource in a legacy(SOAP) backend.
(Backe end is secured)in my API of a WUM updated ESB500 pack from a rest
client, I'm observing exception as follows from the Backend soap service.
The Other Methods (DELETE/GET) are working fine.


wsse:InvalidSecurity
 Missing Timestamp


The resource of the API


  
 
 
 
 

   http://schemas.xmlsoap.org/soap/envelope/;>
  
 
  
  
 http://service.sample.central.com;>

   http://dto.service.sample.central.com/xsd;>
  ?
  ?
  ?
   
   http://dto.service.sample.central.com/xsd;>
  ?
  ?
   
   http://dto.service.sample.central.com/xsd;>
  ?
  ?
  ?
   
   http://dto.service.sample.central.com/xsd;>
  ?
  ?
  ?
   
   http://dto.service.sample.central.com/xsd;>?
   http://dto.service.sample.central.com/xsd;>105665
   http://dto.service.sample.central.com/xsd;>
  ?
  ?
  ?
   

 
  
   


 
 
 
 

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

 
  
  
 
 
 
  
   

WSDL location

h*ttp://192.168.55.160:9763/services/CentralPatientService?wsdl*
<http://192.168.55.160:9763/services/CentralPatientService?wsdl>

Could you please help to resolve this?



-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] Using a Proxy or an API is the best practice for a secured legacy(SOAP) back end service.

2017-11-14 Thread Thivya Mahenthirarasa
Hi Abimaran,

Thank you for the explanations.

Regards,
Thivya

On Tue, Nov 14, 2017 at 11:34 AM, Abimaran Kugathasan <abima...@wso2.com>
wrote:

> Hi Thivya,
>
> Normally, API refers to REST APIs, while a proxy service can be used with
> any type of backend services like HTTP, WSDL, [1]. Since you have a WSDL
> service as the backend, better to use WSDL Based Proxy, otherwise you have
> to convert REST to SOAP before sending to the backend.
>
> Also, for REST API, we can use OAuth header which is handled through auth
> handler, and for proxies based on WSDL, it's better to WS-Security. But,
> you can use auth handler too.
>
> [1]: https://docs.wso2.com/display/ESB500/WSO2+ESB+Endpoints
>
> On Mon, Nov 13, 2017 at 5:52 PM, Thivya Mahenthirarasa <thi...@wso2.com>
> wrote:
>
>> Hi All,
>>
>> I am working on the scenario which is having CRUD operations where I have
>> to create a service in ESB 5.0.0 using a WSDL of a SOAP backend service.
>>
>> I have tried this scenario with both Proxy and API in ESB. Also, I need
>> to secure the ESB service too.
>>
>> I have configured the WS-Security policy[1] to secure the Proxy service
>> and but API I couldn't able to secure API with WS-Security policy so I have
>> used custom Auth Handler[2] to secure API.
>>
>> 1. What you think whether to use a Proxy or API, for me to be the best
>> practice to access a SOAP backend WSDL service?
>> 2. Using custom auth handler or WS-Security policy is the best way for
>> the security.
>>
>>
>> Could you please advice on this. Your ideas are much appreciated.
>>
>>
>>
>> [1] https://docs.wso2.com/display/ESB500/Securing+APIs#SecuringA
>> PIs-BasicAuthUsingaBasicAuthhandler
>> [2] https://docs.wso2.com/display/ESB500/Applying+Security+to+a+
>> Proxy+Servicev
>>
>>
>>
>>
>> --
>>
>> *Thivya Mahenthirarasa*
>>
>> *Software Engineer -Support Team | WSO2*
>>
>>
>> *Email: thi...@wso2.com <thi...@wso2.com>*
>>
>> *Mobile: +94766461966 <+94%2076%20646%201966> <http://wso2.com/signature>*
>> *Web: http://wso2.com <http://wso2.com>*
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thanks
> Abimaran Kugathasan
> Senior Software Engineer - API Technologies
>
> Email : abima...@wso2.com
> Mobile : +94 773922820 <+94%2077%20392%202820>
>
> <http://stackoverflow.com/users/515034>
> <http://lk.linkedin.com/in/abimaran>
> <http://www.lkabimaran.blogspot.com/>  <https://github.com/abimarank>
> <https://twitter.com/abimaran>
>
>


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [DEV] Using a Proxy or an API is the best practice for a secured legacy(SOAP) back end service.

2017-11-13 Thread Thivya Mahenthirarasa
Hi All,

I am working on the scenario which is having CRUD operations where I have
to create a service in ESB 5.0.0 using a WSDL of a SOAP backend service.

I have tried this scenario with both Proxy and API in ESB. Also, I need to
secure the ESB service too.

I have configured the WS-Security policy[1] to secure the Proxy service and
but API I couldn't able to secure API with WS-Security policy so I have
used custom Auth Handler[2] to secure API.

1. What you think whether to use a Proxy or API, for me to be the best
practice to access a SOAP backend WSDL service?
2. Using custom auth handler or WS-Security policy is the best way for the
security.


Could you please advice on this. Your ideas are much appreciated.



[1]
https://docs.wso2.com/display/ESB500/Securing+APIs#SecuringAPIs-BasicAuthUsingaBasicAuthhandler
[2]
https://docs.wso2.com/display/ESB500/Applying+Security+to+a+Proxy+Servicev




-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 ESB500 - ws security throws exception, AxisFault, Invalid Security

2017-11-13 Thread Thivya Mahenthirarasa
Hi dilusha,

I tried it out, also I'm also not observing the error anymore. Thank you
for the response

Thanks,
Thivya

On Mon, Nov 13, 2017 at 3:27 PM, Dilusha Alphonso <dilu...@wso2.com> wrote:

> Hi,
>
> I have also experienced similar issue.  Please refer [1] for the solution.
>
> [1].Exception while invoking proxy service in ESB 5.0.0
>
> Thanks
> Dilusha
>
> On Sat, Nov 11, 2017 at 10:24 AM, Thivya Mahenthirarasa <thi...@wso2.com>
> wrote:
>
>>
>> Hi team,
>>
>> There are five legacy operations in that services(CRUD) in the WSDL.
>>
>>
>> When I try to use basic header authentications as I mentioned above it
>> works. But  When I invoke the service with the GET (2 methods) I am
>> observing the proper response (200 ok with the output), but for the POST,
>> PUT, DELETE methods I'm observing 202 Accepted response with some exception
>> in the log.
>>
>> 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(SynapseCallbackReceiver.java:188)
>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>> at org.apache.synapse.transport.passthru.ClientWorker.run(Clien
>> tWorker.java:261)
>> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.
>> run(NativeWorkerPool.java:172)
>> 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)
>>
>>
>> What could be the root cause of this behavior?
>>
>>
>> On Fri, Nov 10, 2017 at 10:53 PM, Thivya Mahenthirarasa <thi...@wso2.com>
>> wrote:
>>
>>> Hi guys,
>>>
>>> I'm doing a doctor app where, I need to call a web service(legacy) that
>>> implements ws-security, rampart, which uses username token in SSL. When
>>> trying to call the service following SOAP message ends up as a response in
>>> the ESB log with the proceeding exception.
>>>
>>>
>>> ERROR - AxisEngine InvalidSecurity
>>> org.apache.axis2.AxisFault: InvalidSecurity
>>> at org.apache.rampart.handler.PostDispatchVerificationHandler.i
>>> nvoke(PostDispatchVerificationHandler.java:164)
>>> at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
>>> at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
>>> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
>>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
>>> at org.apache.synapse.transport.passthru.ClientWorker.run(Clien
>>> tWorker.java:261)
>>> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.r
>>> un(NativeWorkerPool.java:172)
>>> 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)
>>> [2017-11-10 22:38:05,475] ERROR - ClientWorker Fault processing response
>>> message through Axis2
>>> org.apache.axis2.AxisFault: InvalidSecurity
>>> at org.apache.rampart.handler.PostDispatchVerificationHandler.i
>>> nvoke(PostDispatchVerificationHandler.java:164)
>>> at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
>>> at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
>>> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
>>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
>>> at org.apache.synapse.transport.passthru.ClientWorker.run(Clien
>>> tWorker.java:261)
>>> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.r
>>> un(NativeWorkerPool.java:172)
>>> 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)
>>>
>>> but when I encode username and password in the header as fol

Re: [Dev] [DEV] CRUD operation in API response with 202 accepted but operations are not performed

2017-11-12 Thread Thivya Mahenthirarasa
Hi Himasha,

Thank you for the prompt response. I have got it work fine.


Thanks,
Thivya

On Mon, Nov 13, 2017 at 11:38 AM, Himasha Guruge <himas...@wso2.com> wrote:

> Hi Thivya,
>
> As discussed offline given [1],  since you are not setting a content type
> header in the request, 'application/x-www-form-urlencoded' is preserved
> as default hence above fix would work.
>
> [1] https://docs.wso2.com/display/ESB500/Configuring+Specific+Use+Cases#
> ConfiguringSpecificUseCases-EnablingRESTtoSOAP
>
> Thanks,
> Himasha
>
> On Mon, Nov 13, 2017 at 11:30 AM, Thivya Mahenthirarasa <thi...@wso2.com>
> wrote:
>
>> Hi Himasha,
>>
>> ESB sends application/x-www-form-urlencoded as the Content-Type to the
>> backend which is the reason for this failure. When I do comment out the
>> following parameter in the passthru-http.properties.
>>
>> http.headers.preserve=Content-Type.
>>
>> Also When i configured  args as > expression="get-property('uri.var.patientId')"/> I could able to receive
>> the json response.
>>
>> Thank you
>>
>> On Mon, Nov 13, 2017 at 9:53 AM, Thivya Mahenthirarasa <thi...@wso2.com>
>> wrote:
>>
>>> Hi Himasha
>>>
>>> As you said having xml in the media type also ended up with the same
>>> response. What could be the root cause that the request couldn' t reach the
>>> backend?
>>>
>>>
>>> Thank you
>>>
>>> On Mon, Nov 13, 2017 at 8:21 AM, Himasha Guruge <himas...@wso2.com>
>>> wrote:
>>>
>>>> Hi Thivya,
>>>>
>>>>  Could you verify the media type you have used in payload 
>>>> mediator?(>>> media-type="soap+xml">)  AFAIK, you can only use xml/json there [1] .
>>>> According to the wire logs the request that is been sent is an empty
>>>> soap envelope which means your request content has not been set through
>>>> payload mediator.
>>>>
>>>> "Direction: request, Envelope: >>> encoding='utf-8'?>http://schemas.
>>>> xmlsoap.org/soap/envelope/">"
>>>>
>>>> [1] https://docs.wso2.com/display/ESB500/PayloadFactory+Medi
>>>> ator#PayloadFactoryMediator-Syntax
>>>>
>>>> Thanks,
>>>> Himasha
>>>>
>>>> On Mon, Nov 13, 2017 at 12:33 AM, Thivya Mahenthirarasa <
>>>> thi...@wso2.com> wrote:
>>>>
>>>>> Hi ,
>>>>> Thank you for the response.
>>>>>
>>>>> I wonder that no request is sent to the back-end service. Just ESB is
>>>>> sending a response to the rest client that it accepts the requests. What
>>>>> might be the root cause?. This behavior occurs in all other resources
>>>>> too(DELETE, PUT, POST).
>>>>>
>>>>> What might be the root cause for this? Find the wire logs attached.
>>>>>
>>>>>
>>>>> [2017-11-13 00:27:48,651] DEBUG - wire HTTP-Listener I/O dispatcher-2
>>>>> >> "GET /services/CentralPatientService/readCMedi HTTP/1.1[\r][\n]"
>>>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2
>>>>> >> "cache-control: no-cache[\r][\n]"
>>>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2
>>>>> >> "Postman-Token: bfba4351-46c4-4fed-90f5-745566dbfdf7[\r][\n]"
>>>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2
>>>>> >> "patientId: 15[\r][\n]"
>>>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2
>>>>> >> "Accept: application/json[\r][\n]"
>>>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2
>>>>> >> "Content-Type: application/json[\r][\n]"
>>>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2
>>>>> >> "User-Agent: PostmanRuntime/6.1.6[\r][\n]"
>>>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2
>>>>> >> "Host: 172.16.2.73:8285[\r][\n]"
>>>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2
>>>>> >> "accept-encoding: gzip, deflate[\r][\n]"
>>>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2
>>>>> >> "Connection: keep-alive[\r][\n]&qu

Re: [Dev] [DEV] CRUD operation in API response with 202 accepted but operations are not performed

2017-11-12 Thread Thivya Mahenthirarasa
Hi Himasha,

ESB sends application/x-www-form-urlencoded as the Content-Type to the
backend which is the reason for this failure. When I do comment out the
following parameter in the passthru-http.properties.

http.headers.preserve=Content-Type.

Also When i configured  args as  I could able to receive
the json response.

Thank you

On Mon, Nov 13, 2017 at 9:53 AM, Thivya Mahenthirarasa <thi...@wso2.com>
wrote:

> Hi Himasha
>
> As you said having xml in the media type also ended up with the same
> response. What could be the root cause that the request couldn' t reach the
> backend?
>
>
> Thank you
>
> On Mon, Nov 13, 2017 at 8:21 AM, Himasha Guruge <himas...@wso2.com> wrote:
>
>> Hi Thivya,
>>
>>  Could you verify the media type you have used in payload 
>> mediator?(> media-type="soap+xml">)  AFAIK, you can only use xml/json there [1] .
>> According to the wire logs the request that is been sent is an empty soap
>> envelope which means your request content has not been set through payload
>> mediator.
>>
>> "Direction: request, Envelope: > encoding='utf-8'?>http://schemas.
>> xmlsoap.org/soap/envelope/">"
>>
>> [1] https://docs.wso2.com/display/ESB500/PayloadFactory+Medi
>> ator#PayloadFactoryMediator-Syntax
>>
>> Thanks,
>> Himasha
>>
>> On Mon, Nov 13, 2017 at 12:33 AM, Thivya Mahenthirarasa <thi...@wso2.com>
>> wrote:
>>
>>> Hi ,
>>> Thank you for the response.
>>>
>>> I wonder that no request is sent to the back-end service. Just ESB is
>>> sending a response to the rest client that it accepts the requests. What
>>> might be the root cause?. This behavior occurs in all other resources
>>> too(DELETE, PUT, POST).
>>>
>>> What might be the root cause for this? Find the wire logs attached.
>>>
>>>
>>> [2017-11-13 00:27:48,651] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>>> "GET /services/CentralPatientService/readCMedi HTTP/1.1[\r][\n]"
>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>>> "cache-control: no-cache[\r][\n]"
>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>>> "Postman-Token: bfba4351-46c4-4fed-90f5-745566dbfdf7[\r][\n]"
>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>>> "patientId: 15[\r][\n]"
>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>>> "Accept: application/json[\r][\n]"
>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>>> "Content-Type: application/json[\r][\n]"
>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>>> "User-Agent: PostmanRuntime/6.1.6[\r][\n]"
>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>>> "Host: 172.16.2.73:8285[\r][\n]"
>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>>> "accept-encoding: gzip, deflate[\r][\n]"
>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>>> "Connection: keep-alive[\r][\n]"
>>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>>> "[\r][\n]"
>>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> GET
>>> /services/CentralPatientService/readCMedi HTTP/1.1
>>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >>
>>> cache-control: no-cache
>>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >>
>>> Postman-Token: bfba4351-46c4-4fed-90f5-745566dbfdf7
>>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> patientId:
>>> 15
>>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> Accept:
>>> application/json
>>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >>
>>> Content-Type: application/json
>>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> User-Agent:
>>> PostmanRuntime/6.1.6
>>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> Host:
>>> 172.16.2.73:8285
>>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >>
>>> accept-encoding: gzip, deflate
>>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> Connection:
>>> keep-alive
>>> [2017-11-

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

2017-11-12 Thread Thivya Mahenthirarasa
 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:1
>>>>>> 67)
>>>>>> 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.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)
>>>>>> [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(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:1
>>>>>> 67)
>>>>>> 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.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)
>>>>>>
>>>>>> Please help to resolve.
>>>>>>
>>>>>> Regards,
>>>>>> Buddhimala
>>>>>> --
>>>>>>
>>>>>>
>>>>>> *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
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Vijitha Ekanayake
>>>>> Senior Software Engineer*, *WSO2, Inc.; http://wso2.com/
>>>>> Mobile : +94 777 24 73 39 | +94 718 74 44 08
>>>>> lean.enterprise.middleware
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Vijitha Ekanayake
>>>> Senior Software Engineer*, *WSO2, Inc.; http://wso2.com/
>>>> Mobile : +94 777 24 73 39 | +94 718 74 44 08
>>>> lean.enterprise.middleware
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "WSO2 Documentation Group" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to documentation+unsubscr...@wso2.com.
>>>> For more options, visit https://groups.google.com/a/wso2.com/d/optout.
>>>>
>>>
>>>
>>>
>>> --
>>> Thanks & Best Regards,
>>> *Praneesha Chandrasiri*
>>> *Senior Technical Writer*
>>> *WSO2 Inc. *
>>> *Mobile: +(94) 718156888 <+94%2071%20815%206888>*
>>> *E-mail: pranee...@wso2.com <pranee...@wso2.com>*
>>> <http://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>
>>
>
>
>
> --
>
>
> *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>
>
> --
> You received this message because you are subscribed to the Google Groups
> "WSO2 Documentation Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to documentation+unsubscr...@wso2.com.
> For more options, visit https://groups.google.com/a/wso2.com/d/optout.
>



-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
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 Thivya Mahenthirarasa
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 <thi...@wso2.com>
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.sample.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 <s...@wso2.com> 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]"
>>>> [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

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

2017-11-12 Thread Thivya Mahenthirarasa
17-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 <+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
>>>
>>>
>>
>>
>> --
>> *Sam Sivayogam*
>>
>> Senior Software Engineer
>> Mobile  : +94 772 906 439
>> Office   : +94 112 145 345
>> *WSO2, Inc. :** wso2.com <http://wso2.com/>*
>> lean.enterprise.middleware.
>>
>
>
>
> --
>
>
> *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
>
>


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] CRUD operation in API response with 202 accepted but operations are not performed

2017-11-12 Thread Thivya Mahenthirarasa
Hi Himasha

As you said having xml in the media type also ended up with the same
response. What could be the root cause that the request couldn' t reach the
backend?


Thank you

On Mon, Nov 13, 2017 at 8:21 AM, Himasha Guruge <himas...@wso2.com> wrote:

> Hi Thivya,
>
>  Could you verify the media type you have used in payload 
> mediator?( media-type="soap+xml">)  AFAIK, you can only use xml/json there [1] .
> According to the wire logs the request that is been sent is an empty soap
> envelope which means your request content has not been set through payload
> mediator.
>
> "Direction: request, Envelope:  encoding='utf-8'?>http://schemas.
> xmlsoap.org/soap/envelope/">"
>
> [1] https://docs.wso2.com/display/ESB500/PayloadFactory+Mediator#
> PayloadFactoryMediator-Syntax
>
> Thanks,
> Himasha
>
> On Mon, Nov 13, 2017 at 12:33 AM, Thivya Mahenthirarasa <thi...@wso2.com>
> wrote:
>
>> Hi ,
>> Thank you for the response.
>>
>> I wonder that no request is sent to the back-end service. Just ESB is
>> sending a response to the rest client that it accepts the requests. What
>> might be the root cause?. This behavior occurs in all other resources
>> too(DELETE, PUT, POST).
>>
>> What might be the root cause for this? Find the wire logs attached.
>>
>>
>> [2017-11-13 00:27:48,651] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>> "GET /services/CentralPatientService/readCMedi HTTP/1.1[\r][\n]"
>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>> "cache-control: no-cache[\r][\n]"
>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>> "Postman-Token: bfba4351-46c4-4fed-90f5-745566dbfdf7[\r][\n]"
>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>> "patientId: 15[\r][\n]"
>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>> "Accept: application/json[\r][\n]"
>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>> "Content-Type: application/json[\r][\n]"
>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>> "User-Agent: PostmanRuntime/6.1.6[\r][\n]"
>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>> "Host: 172.16.2.73:8285[\r][\n]"
>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>> "accept-encoding: gzip, deflate[\r][\n]"
>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>> "Connection: keep-alive[\r][\n]"
>> [2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
>> "[\r][\n]"
>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> GET
>> /services/CentralPatientService/readCMedi HTTP/1.1
>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >>
>> cache-control: no-cache
>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >>
>> Postman-Token: bfba4351-46c4-4fed-90f5-745566dbfdf7
>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> patientId: 15
>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> Accept:
>> application/json
>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >>
>> Content-Type: application/json
>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> User-Agent:
>> PostmanRuntime/6.1.6
>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> Host:
>> 172.16.2.73:8285
>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >>
>> accept-encoding: gzip, deflate
>> [2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> Connection:
>> keep-alive
>> [2017-11-13 00:27:48,653]  INFO - LogMediator To:
>> /services/CentralPatientService/readCMedi, MessageID:
>> urn:uuid:db12eb62-ec97-45ff-8956-488d8b366d75, Direction: request,
>> Envelope: > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/;>> oapenv:Body/>
>> [2017-11-13 00:27:48,654] DEBUG - headers http-incoming-7 << HTTP/1.1 202
>> Accepted
>> [2017-11-13 00:27:48,654] DEBUG - headers http-incoming-7 << Date: Sun,
>> 12 Nov 2017 18:57:48 GMT
>> [2017-11-13 00:27:48,654] DEBUG - headers http-incoming-7 <<
>> Transfer-Encoding: chunked
>> [2017-11-13 00:27:48,654] DEBUG - headers http-incoming-7 << Connection:
>> keep-alive
>> [2017-11-13 00:27:48,655] DEBUG - wire HTT

Re: [Dev] [DEV] CRUD operation in API response with 202 accepted but operations are not performed

2017-11-12 Thread Thivya Mahenthirarasa
Hi ,
Thank you for the response.

I wonder that no request is sent to the back-end service. Just ESB is
sending a response to the rest client that it accepts the requests. What
might be the root cause?. This behavior occurs in all other resources
too(DELETE, PUT, POST).

What might be the root cause for this? Find the wire logs attached.


[2017-11-13 00:27:48,651] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
"GET /services/CentralPatientService/readCMedi HTTP/1.1[\r][\n]"
[2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
"cache-control: no-cache[\r][\n]"
[2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
"Postman-Token: bfba4351-46c4-4fed-90f5-745566dbfdf7[\r][\n]"
[2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
"patientId: 15[\r][\n]"
[2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
"Accept: application/json[\r][\n]"
[2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
"Content-Type: application/json[\r][\n]"
[2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
"User-Agent: PostmanRuntime/6.1.6[\r][\n]"
[2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
"Host: 172.16.2.73:8285[\r][\n]"
[2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
"accept-encoding: gzip, deflate[\r][\n]"
[2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
"Connection: keep-alive[\r][\n]"
[2017-11-13 00:27:48,652] DEBUG - wire HTTP-Listener I/O dispatcher-2 >>
"[\r][\n]"
[2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> GET
/services/CentralPatientService/readCMedi HTTP/1.1
[2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> cache-control:
no-cache
[2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> Postman-Token:
bfba4351-46c4-4fed-90f5-745566dbfdf7
[2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> patientId: 15
[2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> Accept:
application/json
[2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> Content-Type:
application/json
[2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> User-Agent:
PostmanRuntime/6.1.6
[2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> Host:
172.16.2.73:8285
[2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >>
accept-encoding: gzip, deflate
[2017-11-13 00:27:48,652] DEBUG - headers http-incoming-7 >> Connection:
keep-alive
[2017-11-13 00:27:48,653]  INFO - LogMediator To:
/services/CentralPatientService/readCMedi, MessageID:
urn:uuid:db12eb62-ec97-45ff-8956-488d8b366d75, Direction: request,
Envelope: http://schemas.xmlsoap.org/soap/envelope/
">
[2017-11-13 00:27:48,654] DEBUG - headers http-incoming-7 << HTTP/1.1 202
Accepted
[2017-11-13 00:27:48,654] DEBUG - headers http-incoming-7 << Date: Sun, 12
Nov 2017 18:57:48 GMT
[2017-11-13 00:27:48,654] DEBUG - headers http-incoming-7 <<
Transfer-Encoding: chunked
[2017-11-13 00:27:48,654] DEBUG - headers http-incoming-7 << Connection:
keep-alive
[2017-11-13 00:27:48,655] DEBUG - wire HTTP-Listener I/O dispatcher-2 <<
"HTTP/1.1 202 Accepted[\r][\n]"
[2017-11-13 00:27:48,655] DEBUG - wire HTTP-Listener I/O dispatcher-2 <<
"Date: Sun, 12 Nov 2017 18:57:48 GMT[\r][\n]"
[2017-11-13 00:27:48,655] DEBUG - wire HTTP-Listener I/O dispatcher-2 <<
"Transfer-Encoding: chunked[\r][\n]"
[2017-11-13 00:27:48,655] DEBUG - wire HTTP-Listener I/O dispatcher-2 <<
"Connection: keep-alive[\r][\n]"
[2017-11-13 00:27:48,655] DEBUG - wire HTTP-Listener I/O dispatcher-2 <<
"[\r][\n]"
[2017-11-13 00:27:48,655] DEBUG - wire HTTP-Listener I/O dispatcher-2 <<
"0[\r][\n]"
[2017-11-13 00:27:48,655] DEBUG - wire HTTP-Listener I/O dispatcher-2 <<
"[\r][\n]"

Cheers,
Thivya

On Sun, Nov 12, 2017 at 11:44 PM, Bhathiya Jayasekara <bhath...@wso2.com>
wrote:

> You can enable wire logs and see where the issue is. (i.e. the API itself
> or backend).
>
> Thanks,
> Bhathiya
>
> On Sun, Nov 12, 2017 at 11:22 PM, Thivya Mahenthirarasa <thi...@wso2.com>
> wrote:
>
>> Hi,
>>
>> I created an API for CRUD operation in ESB 5.0.0 and tried to access a
>> soap backend. And where
>> the responses I get from all CRUD operations are 202 accepted. But no of
>> the operations are performed. Also, I'm not observing any error logs.
>>
>> I have attached here the GET operation resource of my API as a sample.
>>
>>
>>
>>  
>>   
>>  
>> 
>> 

[Dev] [DEV] CRUD operation in API response with 202 accepted but operations are not performed

2017-11-12 Thread Thivya Mahenthirarasa
Hi,

I created an API for CRUD operation in ESB 5.0.0 and tried to access a soap
backend. And where
the responses I get from all CRUD operations are 202 accepted. But no of
the operations are performed. Also, I'm not observing any error logs.

I have attached here the GET operation resource of my API as a sample.



 
  
 

   http://www.w3.org/
2003/05/soap-envelope">
  
 http://service.
sample.central.com">
$1
 
  
   


   http://dto.service.sample.central.com/xsd;
evaluator="xml" expression="//m0:patientId"/>

 
 
 
 

   https://192.168.55.160:9443/services/
CentralPatientService" format="soap11"/>

 
 
  
  
 
 
 
  
   


WSDL location http://192.168.55.160:9763/services/CentralPatientService?wsdl

Could you please advice on this?


Cheers,
Thivya


-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Fwd: [DEV] CRUD operation in API response with 202 accepted but operations are not performed

2017-11-12 Thread Thivya Mahenthirarasa
Hi,

I created an API for CRUD operation in ESB 5.0.0 and tried to access a soap
backend. And where

The responses I get from all CRUD operations are 202 accepted. But no of
the operations are performed. Also, I'm not observing any error logs.

I have attached here the GET operation resource of my API as a sample.



 
  
 

   http://www.w3.org/
2003/05/soap-envelope">
  
 http://service.
sample.central.com">
$1
 
  
   


   http://dto.service.sample.central.com/xsd;
evaluator="xml" expression="//m0:patientId"/>

 
 
 
 

   https://192.168.55.160:9443/services/
CentralPatientService" format="soap11"/>

 
 
  
  
 
 
 
  
   


WSDL location http://192.168.55.160:9763/services/CentralPatientService?wsdl

Could you please advice on this?


Cheers,
Thivya

-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <+94%2076%20646%201966> <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*



-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 ESB500 - ws security throws exception, AxisFault, Invalid Security

2017-11-10 Thread Thivya Mahenthirarasa
Hi team,

There are five legacy operations in that services(CRUD) in the WSDL.


When I try to use basic header authentications as I mentioned above it
works. But  When I invoke the service with the GET (2 methods) I am
observing the proper response (200 ok with the output), but for the POST,
PUT, DELETE methods I'm observing 202 Accepted response with some exception
in the log.

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.handleMessage(SynapseCallbackReceiver.java:324)
at
org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at
org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:261)
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)


What could be the root cause of this behavior?


On Fri, Nov 10, 2017 at 10:53 PM, Thivya Mahenthirarasa <thi...@wso2.com>
wrote:

> Hi guys,
>
> I'm doing a doctor app where, I need to call a web service(legacy) that
> implements ws-security, rampart, which uses username token in SSL. When
> trying to call the service following SOAP message ends up as a response in
> the ESB log with the proceeding exception.
>
>
> ERROR - AxisEngine InvalidSecurity
> org.apache.axis2.AxisFault: InvalidSecurity
> at org.apache.rampart.handler.PostDispatchVerificationHandler.invoke(
> PostDispatchVerificationHandler.java:164)
> at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
> at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
> at org.apache.synapse.transport.passthru.ClientWorker.run(
> ClientWorker.java:261)
> 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 22:38:05,475] ERROR - ClientWorker Fault processing response
> message through Axis2
> org.apache.axis2.AxisFault: InvalidSecurity
> at org.apache.rampart.handler.PostDispatchVerificationHandler.invoke(
> PostDispatchVerificationHandler.java:164)
> at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
> at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
> at org.apache.synapse.transport.passthru.ClientWorker.run(
> ClientWorker.java:261)
> 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)
>
> but when I encode username and password in the header as follows and send
> the request it works fine.
>
>scope="transport"
>  value="Basic dGhpdnlhOnRoaXZ5YTEyMw=="/>
>
>
> I did configure the rampart module as said in this question
> <https://stackoverflow.com/questions/20182314/error-engine-axisengine-an-unsupported-signature-or-encryption-algorithm-was-us>.
> Have written a password callback handler class and have added it to the
> /repository/components/lib is been successfully called. I have
> written a policy file in a registry resource and doing the necessary
> configurations
>
> Your guidance is more appreciated.
>
>
> Thanks,
> Thivya
>
> --
>
> *Thivya Mahenthirarasa*
>
> *Software Engineer -Support Team | WSO2*
>
>
> *Email: thi...@wso2.com <thi...@wso2.com>*
>
> *Mobile: +94766461966 <+94%2076%20646%201966> <http://wso2.com/signature>*
> *Web: http://wso2.com <http://wso2.com>*
>



-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 ESB500 - ws security throws exception, AxisFault, Invalid Security

2017-11-10 Thread Thivya Mahenthirarasa
Hi guys,

I'm doing a doctor app where, I need to call a web service(legacy) that
implements ws-security, rampart, which uses username token in SSL. When
trying to call the service following SOAP message ends up as a response in
the ESB log with the proceeding exception.


ERROR - AxisEngine InvalidSecurity
org.apache.axis2.AxisFault: InvalidSecurity
at
org.apache.rampart.handler.PostDispatchVerificationHandler.invoke(PostDispatchVerificationHandler.java:164)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
at
org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:261)
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 22:38:05,475] ERROR - ClientWorker Fault processing response
message through Axis2
org.apache.axis2.AxisFault: InvalidSecurity
at
org.apache.rampart.handler.PostDispatchVerificationHandler.invoke(PostDispatchVerificationHandler.java:164)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
at
org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:261)
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)

but when I encode username and password in the header as follows and send
the request it works fine.

 


I did configure the rampart module as said in this question
<https://stackoverflow.com/questions/20182314/error-engine-axisengine-an-unsupported-signature-or-encryption-algorithm-was-us>.
Have written a password callback handler class and have added it to the
/repository/components/lib is been successfully called. I have
written a policy file in a registry resource and doing the necessary
configurations

Your guidance is more appreciated.


Thanks,
Thivya

-- 

*Thivya Mahenthirarasa*

*Software Engineer -Support Team | WSO2*


*Email: thi...@wso2.com <thi...@wso2.com>*

*Mobile: +94766461966 <http://wso2.com/signature>*
*Web: http://wso2.com <http://wso2.com>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev