Converting a WSDL in OSB (12c)

Let’s say you have a SOAP service provided by a third-party that is very complex, ie: the BPM SOAP service from Oracle that allows you access to the task list for users. You’d like to convert this complex request into a simpler service that removes all the unnecessary parameters and simplifies the output. This is particularly useful if you are servicing mobile applications as you don’t want to burden them with unnecessary options when calling your service. You could also use this as an option to convert the SOAP structure into a REST one (but that’s an article for another day).

With that in mind, let’s create a rudimentary web service to call the BPM SOAP service. As an added bonus will do it in the newly released OSB 12c through JDeveloper. I’m going to use the queryTasks operation provided by the WSDL, but I only want to the end-user to send me the username and password details and I’ll return just the task titles and ids.

The JDeveloper project detailed below is available on GitHub:

Note: You shouldn’t pass the username and password in this manner as the details will be sent in the clear with no encryption. You should use a security policy on the WSDL to control access instead (we covered that in a previous post). But for simplicity sake let’s continue.

Continue reading