Oracle SOA Suite Enterprise Service Bus Oracle Integration Product - - PowerPoint PPT Presentation

oracle soa suite enterprise service bus
SMART_READER_LITE
LIVE PREVIEW

Oracle SOA Suite Enterprise Service Bus Oracle Integration Product - - PowerPoint PPT Presentation

Oracle SOA Suite Enterprise Service Bus Oracle Integration Product Management Oracle ESB Header Support Slide 2 ES B Header S upport Use Cases Files, JMS , AQ, MQ, B2B, Apps Header Transformation Uses XS L


slide-1
SLIDE 1

Oracle SOA Suite Enterprise Service Bus

Oracle Integration Product Management

slide-2
SLIDE 2

Slide 2

Oracle ESB Header Support

slide-3
SLIDE 3

Slide 3

ES B Header S upport

  • Use Cases

– Files, JMS , AQ, MQ, B2B, Apps

  • Header Transformation

– Uses XS L Transformations – XS L variables – New XPATH Get/ S et Header functions – Minimal GUI S upport

  • Header Based Routing

– Uses Filter Expressions

slide-4
SLIDE 4

Slide 4

One Way Invocation

  • Request Header
  • Outbound Header

Routing Service F X Request Header Outbound Header Propagate

slide-5
SLIDE 5

Slide 5

Two Way Request/ Reply Invocation

  • Inbound Response Header
  • Response Header

Routing Service Response Header Inbound Response Header Pass-through X

slide-6
SLIDE 6

Slide 6

Header Transformation

  • S

upported using XS LT extension functions

  • User can read/ get Request headers and Inbound

Response Headers

  • User can write/ set Outbound headers and Response

Headers

  • Namespace for all the extension functions is :

http://www.oracle.com/XSL/Transform/java/oracle.tip .esb.server.headers.ESBHeaderFunctions

slide-7
SLIDE 7

Slide 7

Header Transformation Extension Functions

  • 1. String getRequestHeader(String xpathExpression,String namespaceDecl)
  • 2. void setOutboundHeader(String xpathExpression,String value, String namespaceDecl)
  • 3. String getInboundResponseHeader(String xpathExpression,String namespaceDecl)
  • 4. void setResponseHeader(String xpathExpression,String value, String namespaceDecl)

Where, xpathExpression : XPath expression to get/set value : value to be set for the xpathExpression namespaceDecl : namespace declarations in the form ‘prefix=namespace;’

slide-8
SLIDE 8

Slide 8

Header Transformation Example

Example: To read ‘ fileName’ header from an inbound file adapter message

// Declare extension function’s namespace in the XSL file as <xsl:stylesheet version="1.0“ …. xmlns:ehdr=http://www.oracle.com/XSL/Transform/java/oracle.tip.es b.server.headers.ESBHeaderFunctions exclude-result-prefixes=“…”> // Read ‘fileName’ from the header <xsl:variable name="GET_INFILENAME" select="ehdr:getRequestHeader( '/fhdr:InboundFileHeaderType/fhdr:fileName', 'fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/;’)” />

slide-9
SLIDE 9

Slide 9

Header Transformation Example

Example: To write ‘ fileName’ header to an outbound file adapter message

// Declare extension function’s namespace in the XSL file as <xsl:stylesheet version="1.0“ …. xmlns:ehdr=http://www.oracle.com/XSL/Transform/java/oracle.tip.es b.server.headers.ESBHeaderFunctions exclude-result-prefixes=“…”> // Write ‘fileName’ from the header <xsl:variable name="SET_OUTFILENAME" select="ehdr:setOutboundHeader('/fhdr:OutboundFileHeaderType/fhdr :fileName', $GET_INFILENAME, 'fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/;')"/>

slide-10
SLIDE 10

Slide 10

Header Based Routing

  • S

upported using XPath extension functions

  • User can add filters using Request headers and Inbound Response Headers
  • S

yntax is same as that for the current filter expressions. { filterExprssion };{ namespaceDeclaration }

  • Namespace for all the extension functions is :

http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.E SBHeaderFunctions

  • Following XPath extension functions are added
  • 1. String getRequestHeader(String xpathExpression)
  • 2. String getInboundResponseHeader(String xpathExpression)

Where, xpathExpression : XPath expression to read the header

slide-11
SLIDE 11

Slide 11

Header Based Routing Example

Example: To check if ‘ fileName’ read by inbound file adapter message is Payload.xml

// Check if ‘fileName’ from the header is ‘Payload.xml’ // Filter Expression will look like

{ehdr:getRequestHeader('/fhdr:InboundFileHeaderType/fhdr:fileName‘) == ‘Payload.xml’};{ namespace ehdr= http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.E SBHeaderFunctions namespace fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/}

slide-12
SLIDE 12

Slide 12

Dynamic S OAP Endpoint Example

Example: To dynamically override the outbound S OAP endpoint, set the Location header to http:/ / localhost:7777/ esb in your XS L as shown below.

ESB XSL CODE <xsl:variable name="LocationIn" select="'http://localhost:7777/esb'" /> <xsl:variable name="LocationOut" select="ehdr:setOutboundHeader('/shdr:ESBHeader/shdr:location', $LocationIn, 'shdr=http://xmlns.oracle.com/esb;')"/>

This functionality requires SOA/ESB 10.1.3.3 or a 10.1.3.1 patch

slide-13
SLIDE 13

Slide 13

Known Limitations

  • S

et Header() functions support only following types of Xpath expr

– Absolute Path - / Customer/ Address/ Zip – Indexing - / Customer/ Address[2]/ Zip – if Address[1] is not already present in the target document, it will be created. – JMS Custom properties supported with the following syntax

  • Get “ Property[position()=1]/@name”
  • S

et “ Property[@name=&quot;Country&quot;]/@value”

– Get and S etHeader functions used inside XS L must not have opaque inputs/ outputs

  • Limited S

OAP support

– ‘ Header’ element will be set as header – User has to use XPath expressions starting with header element –

  • eg. ‘ / Header/ Message/ Priority’
  • Limited Tooling support
slide-14
SLIDE 14

Slide 14

File Header Demo JDeveloper

  • File to File
  • Filter routes only if input Filename = ‘Mobile.xml’
  • Transform propagates filename to output adapter
slide-15
SLIDE 15

Slide 15

File Header Demo XPATH Filter

Filter Expression

ehdr:getRequestHeader('/fhdr:InboundFileHeaderType/fhdr:fileName') = 'Mobile.xml'

slide-16
SLIDE 16

Slide 16

File Header Demo XS LT

XSL Variables Design View

INFILENAME, OUTFILENAME

slide-17
SLIDE 17

Slide 17

File Header Demo XS LT

XSL Variables Source View

INFILENAME, OUTFILENAME

… <xsl:variable name="INFILENAME" select="ehdr:getRequestHeader('/fhdr:InboundFileHeaderType/fhdr:fileName','fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/;')"/> <xsl:variable name="OUTFILENAME" select="ehdr:setOutboundHeader('/fhdr:OutboundFileHeaderType/fhdr:fileName', $INFILENAME, 'fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/;')"/> …

slide-18
SLIDE 18

Slide 18

File Header Demo Runtime

slide-19
SLIDE 19

Slide 19

File Header Demo Instructions

1 – Unzip ESBHeader.zip from “training\sampledata” folder to c:\temp 2 – Start JDeveloper 3 – Select existing ESBSamples project 4 - Open “C:\temp\ESBheader\HeaderSupportDemo\HeaderSupportDemo.jpr” 5 – Register with ESB Server 6 – Observe new service metadata in ESB Console under System “TVox” 6 – Copy C:\temp\ESBheader\*.xml files to C:\temp\ESBheader\in 7 – Observe both files deleted but only Mobile.xml in Out dir 8 – View in ESB console Instance data Note: The C:\temp location is hard coded in both adapters. You can unzip to another location and then run the file adapter wizards to change the location.

slide-20
SLIDE 20

Slide 20

Additional Header Info

Adapter Namespace In Properties Out Properties XPATH Example

JMS

http:/ / xmlns.oracle.com/ pcbpel/ adapter/ j ms/ j msAdapterInboundHeader.wsdl

JMS CorrelationID JMS DeliveryMode JMS Expiration JMS MessageID JMS Priority JMS Redelivered JMS Type JMS Timestamp JMS ReplyTo

j msAdapterOutboundHeader.wsd

JMS DestinationName JMS DestinationProperties JMS CorrelationID JMS Type JMS ReplyTo

('/ j hdr:JMSInboundHeadersAndProper ties/ j hdr:JMSInboundHeaders/ j hdr:J MS CorrelationID') = 'HIGH'

File

http:/ / xmlns.oracle.com/ pcbpel/ adapter/ file/ fileAdapterInboundHeader.wsdl

filename directory

fileAdapterOutboundHeader.wsdl

Filename

('/ fhdr:InboundFileHeaderType/ fhdr: fileName') = 'Mobile.xml'

AQ

http:/ / xmlns.oracle.com/ pcbpel/ adapter/ aq/ in bound/ aqAdapterInboundHeader.wsdl aqAdapterInboundHeader.xsd

MessageId Priorit y Correlation Attempts EnqueueTime OrigMessageId

aqAdapterOutboundHeader.wsdl aqAdapterOutboundHeader.xsd

Priorit y Delay Expiration Correlation RecipientList ExceptionQueue

S OAP

http:/ / schemas.xmlsoap.org/ soap/ envelope/ Custom Custom Location ('/ soap:Header/ ns1:country') = ‘ US‘ (‘ / shdr:ES BHeader/ shdr:location’ )

Other adapter examples: S

ee BPEL S amples and Adapter OTN Pages