Hi All,
With MB4 development, we are currently developing REST services to support all MB admin services. The main resources in MB are the queues, topics, subscriptions and dlc. All these resources will be exposed through the REST services.
When handling a request we need to handle two types of errors those are standard errors such as destination not found exception and application level exceptions (for mb andes exception). To handle those two types of errors we have used two different approaches. To handle application level exceptions we have created a exception class named InternalServerException and when application level exception is thrown while handling request we would catch the application exception and throw InternalServerException with specific message and it will be send as response using exception mapper. The standard errors also will be handled in same manner but with different exception classes. Also we are going to validate the request parameters as well. Concerns : For an example shall we use /dlc/{dlc-queue-name}/{queue-name} or shall we give {queue-name} as query parameter Thanks, -- Malaka. -- Malaka Gangananda - Software Engineer | WSO2 Email : [hidden email] Mobile : +94713564340 Web : http://wso2.com _______________________________________________ Architecture mailing list [hidden email] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture |
Hi Malaka, Could you elaborate the pros/cons of using either of the conventions ? Thanks, Pamod On Tue, Jun 20, 2017 at 2:38 PM, Malaka Gangananda <[hidden email]> wrote:
_______________________________________________ Architecture mailing list [hidden email] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture |
Hi Malaka,
You need to follow the WSO2 REST API guidelines[1] when designing the API. It will give answers to your concerns also. I think you should start with swagger definitions of the APIs first. We all can verify it then before implementing Regards, Vinod On Tue, Jun 20, 2017 at 2:44 PM, Pamod Sylvester <[hidden email]> wrote:
Vinod Kavinda Senior Software Engineer Mobile : <a href="tel:%2B94%20%280%29%20712%20415544" value="+94773451194" style="color:rgb(17,85,204)" target="_blank">+94 (0) 712 415544 _______________________________________________ Architecture mailing list [hidden email] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture |
In reply to this post by Pamod Sylvester
Hi All, I have attached the pdf of document referred in [1] On Tue, Jun 20, 2017 at 2:44 PM, Pamod Sylvester <[hidden email]> wrote:
Malaka. -- Malaka Gangananda - Software Engineer | WSO2 Email : [hidden email] Mobile : +94713564340 Web : http://wso2.com _______________________________________________ Architecture mailing list [hidden email] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture |
Hi Malaka, Can you provide a class diagram or something similar on the new Exception classes you will be creating for more clarity and to get better suggestion?On Tue, Jun 20, 2017 at 2:57 PM, Malaka Gangananda <[hidden email]> wrote:
-- Riyafa Abdul Hameed Software Engineer, WSO2 Lanka (Pvt) Ltd Email: [hidden email] _______________________________________________ Architecture mailing list [hidden email] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture |
Free forum by Nabble | Edit this page |