5

What is the difference between a Proxy service and API service in wso2esb?

To expose my service I can give proxy URL and API URL then in which scenario both differs? and in which scenario I can use proxy and in which I can use API?

Please help me in understanding..,

Community
  • 1
  • 1
Thiru
  • 404
  • 1
  • 16
  • 44

2 Answers2

3

An API has resources so it is suitable when you have to perform multiple operations like CRUD etc. then you can call particular resource which will be performing some particular operation.

A proxy service is suitable when you have to perform an isolated operation (single operation).

So, what you can do is, make an API for multiple operations and then create proxy services for each operation.

Moreover, API can be called as REST service and Proxy service is called as a soap service.

Ghil Maan
  • 581
  • 2
  • 4
  • 11
  • The last paragraph is totally wrong. You can have perfectly fine REST Proxy as well as SOAP API. – Dusan Dec 23 '20 at 13:57
1

Use a proxy service to expose a SOAP web service

You can consume JMS messages or files with VFS, but since ESB 4.9.0 you can use inbound endpoints for that purpose

Use API to expose a REST service

Jean-Michel
  • 5,926
  • 1
  • 13
  • 19
  • This is a bit confusing. So when we want to expose an actual proxy to a REST service through the ESB, we should rather set-up an API than a proxy service. Am I right? – Nicolas Delvaux Apr 25 '17 at 12:01
  • Go to the web console, choose to create a new proxy service and you will be asked for an optional wsdl, a transport (http, vfs, jms, ...). Now try to create a new API and you will be asked for a context, add a resource to this api and you will be asked for a method (get, put, ...) and a URL style : dedicated to define a REST api – Jean-Michel Apr 25 '17 at 12:08
  • In case i have a SOAP endpoint and I created a proxy service to reach it. And I want to create a REST API that communicates with this proxy service. How can I achieve this? should the proxy service be deployed separately and the rest api calls it? or can I add the proxy service as mediator inside the rest api sequence? – user666 Dec 11 '20 at 06:38