Advertisements



Service Bus 12c – REST enabled Business Services

In this post, you will learn to create REST enabled business services. We will create business service to call the Proxy Service created in previous post.

You can create Business Services directly using WADL if it’s available, or using REST binding wizard similar to Proxy Services. As mentioned earlier, REST Business services convert payload from SOAP to REST i.e. the internal interface is still based on WSDL, while the external business and proxy services expose REST endpoints.

Using WADL:

Drag REST binding into External Services swim lane in Service Bus overview editor as shown below.

restcmp_thumb2

bizrest1

Give name as EmployeeBS and Base URI and choose the option as shown below in Operation binding.

bizrest2

Select the WADL as shown below. You can also observe that you can choose resource from several places including MDS.

bizrest3

Click OK and verify that Operation Bindings are populated as shown below.

bizrest4

Click OK to finish the Business service creation.

Using REST Binding:

The steps for creating REST binding for business service are similar to Proxy Service. So follow the steps mentioned in section Creating REST Binding of previous post except giving the base URI.

Testing:

Run the business service and you will observe both SOAP and REST interfaces as shown below along with available operations.

testbiz

testbiz1

/Employees Resource:

GET:

getxml

getxml1

getjson1

getjson2

POST:

postxml1

postxml2

postjson1

postjson2

PUT:

putxml

putxml2

putjson1

putjson2

/Employees/{employeeId} Resource:

GET:

getxml2

getxml3

getjson3

getjson4

DELETE:

deletexml

deletexml.1jpg

deletejson

deletejson2

Similarly, you can run SOAP interface of business service by choosing operation and observe the output.

Advertisements

3 Responses to “Service Bus 12c – REST enabled Business Services”


  1. 1 Ladislav Jech November 23, 2014 at 7:56 PM

    Greate article as soon as REST services are great in more web based integration interfaces, should provide lightweight resource schema, and therefore the performance should be better then SOAP. Have you compared the load-performance of pure SOAP vs REST(semi SOAP) services in 12c? This might be very interesting.


  1. 1 Service Bus 12c – Series of Articles | Siva's Blog Trackback on November 24, 2014 at 1:45 PM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Advertisements

Pages

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 341 other followers

Enter your email address to follow this blog and receive notifications of new posts by email.