This discussion is archived
1 Reply Latest reply: Dec 19, 2012 5:14 AM by Anuj Dwivedi RSS

Get Sender ID from EDI transaction in BPEL

970002 Newbie
Currently Being Moderated
I have an 856 that comes in maps to XML and comes into a BPEL process. For some reason my XPath to get the Sender ID from the XML isn't working.


When I run this in a BPEL I get : <ISASender xsi:type="def:string">oracle.xml.parser.v2.XMLNodeList@4448441</ISASender>
ora:getNodeValue($receiveIn_receive_InputVariable.body/ns3:Internal-Properties/ns3:Data-Structure[@Name = "Interchange"]/ns3:Lookup[@Name = "InterchangeSenderID"]

I tried the following in XSLT and I still get nothing.
/imp1:Transaction-856/imp1:Internal-Properties/imp1:Data-Structure[@Name = 'Interchange']/imp1:Lookup[@Name = "InterchangeReceiverID"]/text()

Here is the XML that comes into the BPEL process.

<receiveIn_receive_InputVariable>
<part name="body">
<Transaction-856 XDataVersion="2.0" Standard="X12" Version="V4010" CreatedDate="2012-12-17T14:17:53" CreatedBy="XEngine_2956" GUID="{BC10E2C7-FB65-4DB2-ABD5-EB3BEE874817}">
<Internal-Properties>
<Data-Structure Name="Interchange">
<Lookup Name="InterchangeControlVersion">00401</Lookup>
<Lookup Name="InterchangeReceiverID">78786878</Lookup>
<Lookup Name="InterchangeReceiverQual">01</Lookup>
<Lookup Name="InterchangeSenderID">47667</Lookup>
<Lookup Name="InterchangeSenderQual">12</Lookup>
<Lookup Name="InterchangeUsageIndicator">P</Lookup>
<Lookup Name="Standard">X12</Lookup>
<Property Name="ElementDelimiter">0x2a</Property>
<Property Name="InterchangeAckRequested">1</Property>
<Property Name="InterchangeAuthorizationInfo"/>
<Property Name="InterchangeAuthorizationInfoQual">00</Property>
<Property Name="InterchangeChildCount">1</Property>
<Property Name="InterchangeComponentElementSep">0x3a</Property>
<Property Name="InterchangeControlNumber">000000004</Property>
..............
  • 1. Re: Get Sender ID from EDI transaction in BPEL
    Anuj Dwivedi Guru
    Currently Being Moderated
    When I run this in a BPEL I get : <ISASender xsi:type="def:string">oracle.xml.parser.v2.XMLNodeList@4448441</ISASender>
    ora:getNodeValue($receiveIn_receive_InputVariable.body/ns3:Internal-Properties/ns3:Data-Structure[@Name = "Interchange"]/ns3:Lookup[@Name = "InterchangeSenderID"]
    Are you using assign? The above XPath is incorrect. In assign activity, it should be like -

    <assign name="getInterSendId">
    <copy>
    <from variable="receiveIn_receive_InputVariable" part="body"
    query="/ns3:Transaction-856/ns3:Internal-Properties/ns3:Data-Structure[@Name = "Interchange"]/ns3:Lookup[@Name = "InterchangeSenderID"]"/>
    <to variable="InterchangeSenderID"/>
    </copy>
    </assign>

    Please note that receiveIn_receive_InputVariable has a part defined as "body" which contains entire payload. Instead of writing xpath manually, better you use the graphical interface of assign to map values.
    I tried the following in XSLT and I still get nothing.
    /imp1:Transaction-856/imp1:Internal-Properties/imp1:Data-Structure[@Name = 'Interchange']/imp1:Lookup[@Name = "InterchangeReceiverID"]/text()
    Remove the text() from the last and make sure that namespace is correct. It should work. Use the graphical mapper of XSLT to auto-generate mapping instead of writing it manually.

    Regards,
    Anuj

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points