Advertisements



Service Bus 12c- Mixing URI Parameters and Payload in REST Service

Typically, a PUT request URI looks like below accepting the actual payload in HTTP body.

http://host:port/employeesApi/Employees/{employeeId}

In Service Bus12c, We cannot mix URI parameters with representation of the resource, when we want to define a resource in this way.

put

If we run Proxy Service with this setup, we will get an error as shown below.

put1

put2

put3

Instead, you can use the expression as shown below.

put4

You can access this using the following expression from your message flow.

$inbound/ctx:transport/ctx:request/tp:user-metadata[@name=”empid”]/@value

If you log $body and above expression, you would see the log messages as shown below.

put5

put6

As explained in this link, you may have to populate these URI parameters in outbound variable.

Advertisements

3 Responses to “Service Bus 12c- Mixing URI Parameters and Payload in REST Service”


  1. 1 Anonymous May 4, 2017 at 12:54 AM

    Thanks for the blog.. Do you how we can achieve the same in SOA 12c using REST Adapter ? URI parameter is not part of the payload.


  1. 1 Service Bus 12c – Series of Articles | Siva's Blog Trackback on November 29, 2014 at 11:08 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.