I think having an exception at get operation is correct. But +1 to have is Exist method.
Thanks & Regards Danushka Fernando Software Engineer WSO2 inc. http://wso2.com/ Mobile : +94716332729 On Tue, Dec 23, 2014 at 4:26 PM, Harsha Thirimanna <[email protected]> wrote: > +1 returning empty response to having null object for that method call > instead of throwing AxisFault to this. Because of not having app for given > name is not an exception. > > > *Harsha Thirimanna* > Senior Software Engineer; WSO2, Inc.; http://wso2.com > * <http://www.apache.org/>* > *email: **[email protected]* <[email protected]>* cell: +94 71 5186770 , > +94 * > *774617784twitter: **http://twitter.com/ > <http://twitter.com/afkham_azeez>* > *harshathirimannlinked-in: **http: > <http://lk.linkedin.com/in/afkhamazeez>**//www.linkedin.com/pub/harsha-thirimanna/10/ab8/122 > <http://www.linkedin.com/pub/harsha-thirimanna/10/ab8/122>* > > *Lean . Enterprise . Middleware* > > > On Tue, Dec 23, 2014 at 3:02 PM, Udara Liyanage <[email protected]> wrote: > >> HI, >> >> I could not find an operation to do $subject by providing appName. As an >> alternative, I tried get and check for not null. >> >> When I call getOAuthApplicationDataByAppName of OAuthAdminService , it >> throws an AxisFault exception when there is no application with the given >> appName. Caller can not decide whether exception occurred or there is no >> application when he get AxisFault. >> >> Additionally error message is misleading, it should be something like >> "can not find an application with app name ..." since caller tries to find >> an app by giving the app name. >> >> Caused by: *org.apache.axis2.AxisFault*: *Cannot find an application >> associated with the given consumer key* : app_cartridge_v1 >> at >> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531) >> at >> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370) >> at >> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:445) >> at >> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225) >> at >> org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) >> at >> org.wso2.carbon.identity.oauth.stub.OAuthAdminServiceStub.getOAuthApplicationDataByAppName(OAuthAdminServiceStub.java:1251) >> at >> org.apache.stratos.autoscaler.client.oAuthAdminServiceClient.getOAuthApplication(oAuthAdminServiceClient.java:101) >> at >> org.apache.stratos.autoscaler.applications.parser.DefaultApplicationParser.createToken(DefaultApplicationParser.java:717) >> >> >> -- >> >> Udara Liyanage >> Software Engineer >> WSO2, Inc.: http://wso2.com >> lean. enterprise. middleware >> >> web: http://udaraliyanage.wordpress.com >> phone: +94 71 443 6897 >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
