Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-11 Thread Lahiru Sandaruwan
On Sun, May 10, 2015 at 11:00 PM, Chamila De Alwis wrote: > Hi Lahiru, > On Sun, May 10, 2015 at 8:56 PM, Lahiru Sandaruwan > wrote: > >> So what we need to do at Stratos Rest API(The API we have now), is to >> catch the status code and message from CC Rest API and send both, as they >> are, to

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-10 Thread Lakmal Warusawithana
Yes, don't try these stuff last movement please. On Mon, May 11, 2015 at 12:34 AM, Imesh Gunaratne wrote: > Hi Larhiru, > > Thanks for the findings!! IMO it would be better to go ahead with the > workaround for the time being. Otherwise we would have to spend > considerable amount of effort on u

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-10 Thread Imesh Gunaratne
Hi Larhiru, Thanks for the findings!! IMO it would be better to go ahead with the workaround for the time being. Otherwise we would have to spend considerable amount of effort on upgrading Axis2. Thanks On Mon, May 11, 2015 at 12:30 AM, Lahiru Sandaruwan wrote: > Hi, > > I built the pack witho

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-10 Thread Lahiru Sandaruwan
Hi, I built the pack without integration tests. But it is broken as i can't even log into it. We would have to put some effort to do this migrations since it might require Carbon migrations as well. So it won't be a viable solution for this release as we are at the verge of it, IMO. Thanks. On M

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-10 Thread Lahiru Sandaruwan
Hi, Downloading issues is fixed with a clean repo attempt. However i got a failure at "org.apache.stratos.email" due to a missing constant class. I continued with bringing class to our source. But, it again fails at integration tests with error [1]. Looking bit further. Thanks. [1] [2015-05-11

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-10 Thread Chamila De Alwis
Hi Lahiru, On Sun, May 10, 2015 at 8:56 PM, Lahiru Sandaruwan wrote: > So what we need to do at Stratos Rest API(The API we have now), is to > catch the status code and message from CC Rest API and send both, as they > are, to end user. No String comparison required. > Wouldn't there be inter-co

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-10 Thread Lahiru Sandaruwan
Hi Imesh, On Sun, May 10, 2015 at 12:36 PM, Imesh Gunaratne wrote: > On Sun, May 10, 2015 at 12:08 PM, Chamila De Alwis > wrote: > >> Hi, >> >> Is the possibility of upgrading to a newer version of Axis2 available (if >> we are using an older version) ? >> > Yes that's possible, currently we ar

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-10 Thread Lahiru Sandaruwan
Hi Chamila, On Sun, May 10, 2015 at 8:41 PM, Chamila De Alwis wrote: > Hi, > > I'm still not convinced about the granularity issue :) . Let me take an > example. We'll take the deployCartridgeDefinition() method in the Cloud > Controller service. > > With SOAP, we've used two custom exceptions,

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-10 Thread Chamila De Alwis
Bad example because deployCartridgeDefinition() is not there in CC anymore :) . It should be addCartridge() with custom exceptions * InvalidCartridgeDefinitionException, ** InvalidIaasProviderException, *and* CartridgeAlreadyExistsException*. Regards, Chamila de Alwis Software Engineer | WSO2 | +

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-10 Thread Chamila De Alwis
Hi, I'm still not convinced about the granularity issue :) . Let me take an example. We'll take the deployCartridgeDefinition() method in the Cloud Controller service. With SOAP, we've used two custom exceptions, *InvalidCartridgeDefinitionException* and *InvalidIaasProviderException* which indic

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-10 Thread Gayan Gunarathne
Hi, On Sun, May 10, 2015 at 12:08 PM, Chamila De Alwis wrote: > Hi, > > Is the possibility of upgrading to a newer version of Axis2 available (if > we are using an older version) ? > +1. IMO also we can try with the newer version of Axis2 > We might lose the granularity in the responses (curren

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-10 Thread Lahiru Sandaruwan
Hi Chamila, Find the comment inline, On Sun, May 10, 2015 at 12:08 PM, Chamila De Alwis wrote: > Hi, > > Is the possibility of upgrading to a newer version of Axis2 available (if > we are using an older version) ? > > We might lose the granularity in the responses (currently we use custom > exc

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-10 Thread Imesh Gunaratne
On Sun, May 10, 2015 at 12:08 PM, Chamila De Alwis wrote: > Hi, > > Is the possibility of upgrading to a newer version of Axis2 available (if > we are using an older version) ? > Yes that's possible, currently we are using 1.6.1-wso2v10 and in nexus we have 1.6.1-wso2v12 [1]. @Lahiru: Would you m

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-09 Thread Chamila De Alwis
Hi, Is the possibility of upgrading to a newer version of Axis2 available (if we are using an older version) ? We might lose the granularity in the responses (currently we use custom exceptions) if we switch to REST as the protocol between the components (we'd have to use HTTP status codes, but

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-09 Thread Lahiru Sandaruwan
Hi Udara, On Sun, May 10, 2015 at 10:17 AM, Udara Liyanage wrote: > Hi Lahiru, > > I have few concerns about the former method > > * How would you do the first approach for the service method which are > actually returning a boolean value? > If there is a return value(Boolean or anything), th

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-09 Thread Imesh Gunaratne
Hi Lahiru, A great finding!! +1 for fixing this issue with changing the return type to boolean. As we already know there are quite a lot of limitations in the Axis2 version we are using today. May be at some point we could move all our internal web services to REST. Thanks On Sun, May 10, 2015 a

Re: [Discuss] How to handle errors at server side in AS/CC services

2015-05-09 Thread Udara Liyanage
Hi Lahiru, I have few concerns about the former method * How would you do the first approach for the service method which are actually returning a boolean value? *Say we change void to boolean, then a how can the exact exception cab be passed down to the client since the method may fail due to m

[Discuss] How to handle errors at server side in AS/CC services

2015-05-09 Thread Lahiru Sandaruwan
Hi all, I have been looking into solving issues in $subject. Found that, currently if the back end service method return type is void, service stub throws an AxisFault with the message of custom exception message, but not the exact exception. One solution is, to have a boolean return value, for t