Posts

Showing posts with the label XQUERY

[OSB 12c][Tutorial] OSB 12c SOAP webservice for temperature conversion i.e. Celsius to Fahrenheit and vice versa

Image
This tutorial is intended for the audience who are completely new to OSB and want to try a simple hello world kind of application. Instead of sending and receiving Hello World! . We will be using simple temperature conversion i.e. from Celsius to Fahrenheit and vice versa. We will be using simple Xquery to do all conversion and logic. High Level: In this case, our OSB component will contain 2 parts proxy service and pipeline. Proxy service will expose SOAP endpoint to the client application and pipeline will perform various operations on input payload. Since this is just a Hello World application, we will not be using business services. XQuery will be used to implement mathematical logic and conditional logic. Service will take temperature as input and will perform either Fahrenheit to Celsius (FtoC) or Celsius to Fahrenheit (CtoF) temperature conversion. If the conversion type is invalid, then the service will return a failure status. Mathematical Calculations: Let temperature in Fahr...

XML to String and String to XML conversion

Use Cases Many a times, we may need to convert xml data and pass it as a string inside an XML tag. Sometimes from source, we get data which is in string format but actually is xml encoded in string format. To do so in Oracle BPEL 12c or OSB 12c we can use built in functions. XML data to String Sample input <inRoot>     <t1> Hello </t1>     <t2> World </t2>     <t3> One </t3> </inRoot> Sample output <outRoot>    <t1> &lt;inRoot&gt;&lt;t1&gt;Hello&lt;/t1&gt;&lt;t2&gt;World&lt;/t2&gt;&lt;t3&gt;One&lt;/t3&gt;&lt;/inRoot&gt; </t1> </outRoot> XSLT This can be accomplished by using the function  oraext:get-content-as-string(element as node-set) . This function is really helpful when we are working on BPEL as we can use this function in ASSIGN activity or in TRANSFORM activity using XSLT . xmlns:oraext ="http://...

Popular posts from this blog

DateTime formatting using xp20:format-dateTime ()

Create Delimited String from XML Nodes and Vice Versa in SOA 12c

Import and Export MDS artifacts in SOA 12c