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.

Advertisement

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


  1. 1 Anonymous January 11, 2023 at 4:40 PM

    How did you do it?

  2. 2 Pargat Singh December 4, 2019 at 12:20 PM

    Hi Siva,

    My rest business service expects a template parameter. How can I set the value of that template parameter in pipeline before routing to the business service?

  3. 4 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 )

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.




Pages

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

Join 379 other subscribers

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


%d bloggers like this: