Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sorting in BPEL Transformation

ArpitSamsonSep 20 2012 — edited Feb 26 2020
Hi,

I am facing problem while using Sort in Transformation based on field "billToNumber" SOA Suite 10g

The schema i have used here is as follows:-

<schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/SampleJDE_BioprodProcess"
xmlns="http://www.w3.org/2001/XMLSchema">

<element name="SampleJDE_BioprodProcessProcessRequest">
<complexType>
<sequence>
<element name="dataEnvironment" type="string"/>
<element name="searchOrderNum" type="string"/>
<element name="billToNumber" type="string" maxOccurs="unbounded"/>
<element name="shipToNumber" type="string"/>
<element name="searchPONum" type="string"/>
</sequence>
</complexType>
</element>

<element name="SampleJDE_BioprodProcessProcessResponse">
<complexType>
<sequence>
<element name="dataEnvironment" type="string"/>
<element name="searchOrderNum" type="string"/>
<element name="billToNumber" type="string" maxOccurs="unbounded"/>
<element name="shipToNumber" type="string"/>
<element name="searchPONum" type="string"/>
</sequence>
</complexType>
</element>
</schema>



The code in the transformation is as below:-

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
xmlns:ns0="http://www.w3.org/2001/XMLSchema"
xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:ns1="http://xmlns.oracle.com/SampleJDE_BioprodProcess"
exclude-result-prefixes="xsl ns0 ns1 xref xp20 bpws ora ehdr orcl ids hwf">
<xsl:template match="/">
<ns1:SampleJDE_BioprodProcessProcessResponse>
*<xsl:for-each select="/ns1:SampleJDE_BioprodProcessProcessRequest/ns1:billToNumber">*
*<xsl:sort select="/ns1:SampleJDE_BioprodProcessProcessRequest/ns1:billToNumber"/>*
*<xsl:copy-of select="."/>*
*</xsl:for-each>*
</ns1:SampleJDE_BioprodProcessProcessResponse>
</xsl:template>
</xsl:stylesheet>



While testing, i am providing three values for billToNumber i.e. 2,1,9



But in response i am getting is as under:-

<SampleJDE_BioprodProcessProcessResponse ns1="http://xmlns.oracle.com/SampleJDE_BioprodProcess" xmlns="http://xmlns.oracle.com/SampleJDE_BioprodProcess" >
<billToNumber>2</billToNumber>
<billToNumber>1</billToNumber>
<billToNumber>9</billToNumber>
</SampleJDE_BioprodProcessProcessResponse>

It is not able to Sort

Can anyone please help me out here?? i need it very ungently in SOA 10g.. Thanks

Edited by: ArpitSamson on Sep 20, 2012 7:12 AM
This post has been answered by Eric Elzinga on Sep 21 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 19 2012
Added on Sep 20 2012
14 comments
1,065 views