lookupXRef() and lookupXRef1M()
functions can be used to look up single and multiple values
correspondingly from SOA 11G Cross Reference table
(DEV_SOAINFRA.XREF_DATA).
lookupXRef1M() function will be used to look up multiple values of target system associated with the one value of source system.
Example Table Structure :
Cross Reference Table ( DEV_SOAINFRA.XREF_DATA ) Structure :
Issue:
lookupXRef1M() function looking up values differently for BPEL Assign activity and for BPEL Transformation (XSL).
While using with Assign activity it is giving the response like the below.
BPEL Assign activity :
BPEL Assign activity response :
While using it with XSL Transformation in BPEL it is just returning the concatenated values of target system.
BPEL Transformation:
BPEL Transformation response :
Solution to get the values properly in BPEL XSL Transformation :
Assign the lookupXRef1M() response in variable and iterate it using node() function like shown below with in the xsl to get the proper result as we get it in Assign activity.
lookupXRef1M() function will be used to look up multiple values of target system associated with the one value of source system.
Example Table Structure :
Cross Reference Table ( DEV_SOAINFRA.XREF_DATA ) Structure :
Issue:
lookupXRef1M() function looking up values differently for BPEL Assign activity and for BPEL Transformation (XSL).
While using with Assign activity it is giving the response like the below.
BPEL Assign activity :
< assign name = "assignLookupXRef1M" > < copy > < from expression = "xref:lookupXRef1M('Sample.xref','SIEBEL','SBL_001','FUSION',true())" /> < to variable = "outputVariable" part = "payload" query = "/client:processResponse/client:result" /> </ copy > </ assign > |
< outputVariable > < part name = "payload" > < client:result > < value >FUS_001</ value > < value >FUS_002</ value > < value >FUS_003</ value > </ client:result > </ processResponse > </ part > </ outputVariable > |
BPEL Transformation:
< xsl:template match = "/" > < client:processResponse > < client:result > < xsl:value-of select = 'xref:lookupXRef1M("Sample.xref",/client:process/client:xrefReferenceColumnName,/client:process/client:xrefReferenceColumnValue,/client:process/client:xrefColumnName,true())' /> </ client:result > </ client:processResponse > </ xsl:template > |
< outputVariable > < part name = "payload" > < processResponse > < client:result >FUS_001FUS_002FUS_003</ client:result > </ processResponse > </ part > </ outputVariable > |
Assign the lookupXRef1M() response in variable and iterate it using node() function like shown below with in the xsl to get the proper result as we get it in Assign activity.
<? xml version = "1.0" encoding = "UTF-8" ?> <? oracle-xsl-mapper <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. --> < mapSources > < source type = "WSDL" > < schema location = "../LookupXRef1M.wsdl" /> </ source > </ mapSources > < mapTargets > < target type = "WSDL" > < schema location = "../LookupXRef1M.wsdl" /> < rootElement name = "processResponse" namespace = "http://xmlns.oracle.com/CompositesSamples/LookupXRef1M" /> </ target > </ mapTargets > <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.5.0(build 110418.1550.0174) AT [THU JAN 10 12:18:08 EST 2013]. --> ?> < xsl:stylesheet version = "1.0" xmlns:socket = "http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator" xmlns:mhdr = "http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction" exclude-result-prefixes = "xsi xsl plnk wsdl client xsd bpws xp20 bpel bpm ora socket mhdr oraext dvm hwf med ids vha xdk xref ldap" extension-element-prefixes = "exsl" > < xsl:output method = "xml" indent = "yes" /> < xsl:template match = "/" > < xsl:variable name = "response" select = 'xref:lookupXRef1M("Sample.xref",/client:process/client:xrefReferenceColumnName,/client:process/client:xrefReferenceColumnValue,/client:process/client:xrefColumnName,true())' /> < client:processResponse > < client:result > < xsl:for-each select = "exsl:node-set($response)/node()" > < xsl:element name = "value" > < xsl:value-of select = "." /> </ xsl:element > </ xsl:for-each > </ client:result > </ client:processResponse > </ xsl:template > </ xsl:stylesheet > |
No comments:
Post a Comment