Splitting the XML Payload in BPEL

Hi
<Sales order>
<order>
<orderno>1200</orderno>
<ordered details>testing</ordered details>
</order>
<order>
<orderno>1201</orderno>
<ordered details>testing2</ordered details>
</order>
</sales order>
i need to split the XML payload and send the different request.
Example 5 sales order details are there in the XML payload. i need to send 5 different request.
Can you anyone guide me using BPEL.
Thanks Rahul

http://clemensblog.blogspot.com/2006/03/bpel-looping-over-arrays-collections.html
http://oraclebpelindepth.blogspot.com/2008/09/arrays-in-bpel_21.html
with the while loop you can loop over your orders in the array, and for every order do for example the invoke to your other service

Similar Messages

  • In PI how do I convert the XML payload (input) to a text file and send out

    I am extracting data from SAP and sending thru XI / PI to a file (non-sap system).
    On the receiving end, I need the file to be a text file, with one row for each "FTZ_Row concatenated_data" tag in the input.  It needs to be just a plain text file with no XML tags.
    Currently the file gets one record which matches exactly to the XML payload below.
    I want it to create a file that looks like this :
               CONCATENATED DATA 1
               CONCATENATED DATA 2
                012345678912345678MAKTX-TEST LB 123123123123 01/02/2009 Z001WCHA9876543210.12
    here is the payload going thru XI
      <?xml version="1.0" encoding="utf-8" ?>
    - <n0:FTZ_Concatenated_Row xmlns:n0="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone" xmlns:prx="urn:sap.com:proxy:FI0:/1SAI/TAS0C0412CDBC3E782D0219:700:2008/06/25">
      <FTZ_Row concatenated_data="CONCATENATED DATA 1" />
      <FTZ_Row concatenated_data="CONCATENATED DATA 2" />
      <FTZ_Row concatenated_data="012345678912345678MAKTX-TEST LB 123123123123 01/02/2009 Z001WCHA9876543210.12" />
      </n0:FTZ_Concatenated_Row>
    thanks
    jay

    thanks for the input but I am still having issues - I get an empty file when I use the content conversion option.
    My payload coming into XI is :
            <?xml version="1.0" encoding="utf-8" ?>
    - <n0:FTZ_Concatenated_Row xmlns:n0="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone" xmlns:prx="urn:sap.com:proxy:FI0:/1SAI/TAS0C0412CDBC3E782D0219:700:2008/06/25">
    <FTZ_Row concatenated_data="CONCATENATED DATA 1" />
    <FTZ_Row concatenated_data="CONCATENATED DATA 2" />
    <FTZ_Row concatenated_data="012345678912345678MAKTX-TEST LB 123123123123 01/02/2009 Z001WCHA9876543210.12" />
    </n0:FTZ_Concatenated_Row>
    Here is the layout of my data type - I am using the same for input & output
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone" targetNamespace="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone">
       <xsd:complexType name="FTZ_Concatenated_Row">
          <xsd:sequence>
             <xsd:element name="FTZ_Row" maxOccurs="unbounded">
                <xsd:complexType>
                   <xsd:attribute name="concatenated_data" type="xsd:string" />
                </xsd:complexType>
             </xsd:element>
          </xsd:sequence>
       </xsd:complexType>
    </xsd:schema>
    I mapped these items :  FTZ_Concatenated_Row & FTZ_Row & concatenated_data
    I set up my content convesion with :
      recordset structure   FTZ_Row
    FTZ_Row.fieldSeparator     #
    FTZ_Row.endSeparator     'nl'
    I am not sure why the following row looks like this ??
        <FTZ_Row concatenated_data="CONCATENATED DATA 1" />
    I thought FTZ_Row would be one tag and "concatenated_data" would be another one.
    any help would be appreciated.
    I have read many entries/blogs/etc in SDN but and tried many different setups, but nothing is working.
    thanks

  • Getting BAM Error: BAM-06008: The XML payload is invalid; extra contents we

    Hi All,
    Version: 11.1.1.4
    We are getting the BAM Error: "BAM-06008: The XML payload is invalid; extra contents were found" after I added a another field to a BAM Object. I can see the new field in BAM and I can also see it when I pull up and map to a BAM adapter in my SOA composite. However, when I have the process send a payload with the newly added field it fails with the above error. However, if I add a new data object in BAM with the field it works fine. What would be causing BAM to think that the newly added field should be in payload?
    Any suggestions would be greatly appreciated.
    --S                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    If the layout of the data object changes then you need to restart BAM server for changes to take effect. Also make sure, your mapper file isn't adding extra elements than expected.
    Thanks
    Jahangir Pasha

  • Logging the XML payload in Oracle Sales Cloud

    How can xml payloads for inbound and outbound web service call be logged in Oracle Sales Cloud?
    We need to capture the xml payloads as part of web service calls (inbound/outbound) and store it on server/objects.
    Is it possible to achieve this and if so how can this be done?
    Thanks,
    Abhishek

    For outbound invocations from Sales Cloud, how are you invoking the web services today?
    If you are using groovy scripts to invoke, you can using a println after the invocation and view the messages through the "Runtime logging" feature.
    This should work if you want to view the payload for debugging purposes
    However, I also see that you need to store the response. Are you trying to implement auditing?

  • BAM-06008: The XML payload is invalid; extra contents were found.

    Hi All,
    Version:11.1.1.6
    We are getting the BAM Error: "BAM-06008: The XML payload is invalid; extra contents were found" after I added a another field to a BAM Object.I have added that extra field to corresponding data objects .wsdl file as well as in the .xsd. I can see the new field in the BAM DO. However, when I used to send a payload with the newly added field it fails with the above error. However, if I add a new data object in BAM with the field it works fine.
    Why  am  I getting this error?
    Thanks,
    Rahul

    I have followed the following steps:-
    1.Make entry of new field in ".wsdl" file which is in the BAM folder.
    2.Make entry of new filed in ".xsd" file.
    3.Make appropriate mappings in ".xsl" file corresponding to the sensor's action.
    Initially i was only restarting BAM and was facing above mentioned error. After restarting SOA as well as BAM server, it started working.

  • How to get the XML Payload of called process from calling process?

    I have two SOA processes say process A and process B.
    Process B is called by process A.In process A I, am using the getRequestMessage() method in Java code to get the XML payload of process A.
    But i want the XML payload of process B in process A.How can i achieve it?

    Doug,
              I used the property loader method but I could not load the limits of any sub sequence call calling an external sequence file.
    I took the FlowRate_test.seq example from the NI Example folder "C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 4.2.1\Examples\PropertyLoader\LoadingLimits\LimitsFromExcelFile\UsingCVI". I created a sequence called PumpTest.seq in the same folder path. I then moved the Pump Test step from the FlowRate_test.seq to the PumpTest.seq. Now created a sequence call in the FlowRate_test.seq and called the PumpTest.Seq as the module path. When I execute the FlowRate_test.seq , I get the error as shown below:
    Attached is the Flowrate_Test.seq and the PumpTest.seq which should be there in the folder path "C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 4.2.1\Examples\PropertyLoader\LoadingLimits\LimitsFromExcelFile\UsingCVI".
    Let me know whether I am doing something wrong in this method. 
    My idea is to alter the runstate variable High and Low of Pump Test in the PumpTest.seq and then run the Flowrate_Test.seq.
    Attachments:
    PumpTest.seq ‏6 KB
    FlowRate_test.seq ‏11 KB

  • Passing the XML payload to the cursor in the Oracle Database

    Hi Experts,
                      I am trying to insert multiple records in the table of oracle database. I am sending 5000 records per message. I am using a stored procedure to insert the records. I want to make a single call to the stored procedure and insert all the records.
    I dont want to call SP for each record.
    Please suggest the way to implement this (Using Cursor/Loop) .
    Thanks
    Ajay

    Hi
    Use these link to insert multiple record in single call using stored procedure.
    http://www.vikramlakhotia.com/Inserting_multiple_records_using_one_stored_procedure.aspx
    http://weblogs.sqlteam.com/travisl/archive/2005/01/04/3931.aspx
    use this thread
    http://forums.asp.net/t/1235809.aspx

  • Adding up of amount fields in the xml payload

    HI ,
    I have a issue on hand in mapping .
    I am using message mapping to map the source to the target.
    The issue is I have a item data in the source message which contains the Amount field . also it has some charge nodes also under it which also has a amount field.
    what i need to do is to add all the amount fields from the charge item into the amount of the item field and then map it to the target.
    the Source struct is some what as below
    Item
      |->Amount
      |-> ChargeItem
            |-> Amount
      |-> ChargeItem
            |-> Amount
    Item(2)
      |->Amount
      |-> ChargeItem
            |-> Amount
      |-> ChargeItem
            |-> Amount
    The target required is somewhat like below
    Item
    |-> Amount (item(amount) + charge (amount))
    Item (2)
    |-> Amount (item(amount) + charge (amount))
    Hope u can get the issue
    Thanks
    Nikhil

    Hi Bhavesh,
    Thanks for the reply. but i have a question.
    this will deal with the amount of the charge item but what about the amount of the amount field in item.
    how can we take care of that too. as cannot map more than 1 field to the target.
    and more over we have to add that field too to the sum of charge item
    Thanks
    Nikhil

  • SSL/TLS security certificate data match with XML Payload in SAP PI

    Hi,
    We are working on a solution where we would want to use SSL/TLS or WS Security with client server mutual authentication using client server certificates.
    But, once the sender is authenticated using the certificates, can the XML payload be matched for the correctness with the certificate information? Is this available to PI integration engine at any time? Like Sender A autheticated as A using certificates, must be stopped if his XML payload is saying that he is sender B (which is most unlikely if we trust the senders but did not want to leave a loophole).
    Any ideas here?
    Thanks and Regards,
    Vijay

    Hi Wolfgang,
    Cross-posting is discouraged and against the forum rules, because it is misused and makes a mess of the search due to distributed discussions and answers.
    I will move it to the PI forum and add a watch on it as it is security forum related.
    Unfortunately, the forum software does not have the option to "mirror" threads.
    Cheers,
    Julius
    Edited by: Julius Bussche on Sep 14, 2009 9:50 PM

  • Reading XML payload from text file

    Hello,
    I have a text file with XML payload in it. The text file has some header information and then the XML payload. How do I read only the XML payload for processing in PI?
    the structure of the text file is something like this..
    Header Information
    Payload
    Sample:
    #Datetime: 20140318-09:28:50.129
    #MessageID: sample123
    #Sender: TEST
    #SenderParty: TEST
    #ReceiverService:
    #ReceiverParty: Test
    #Interface: Test123
    #InterfaceNamespace: http://test.com
    <?xml version="1.0" encoding="UTF-8"?>
    <Sample ><Header>......
    Please advise.
    Thank you.
    Larry.

    package com.learning.utils;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.Reader;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class FetchPayload extends AbstractTransformation {
      String strData = null;
      @Override
      public void transform(TransformationInput arg0, TransformationOutput arg1)
      throws StreamTransformationException {
      // TODO Auto-generated method stub
      getTrace().addInfo("File Reading started ");
      String strData = convertStreamToString(arg0.getInputPayload()
      .getInputStream());
      getTrace().addInfo("File Reading successfully completed ");
      try {
      getTrace().addInfo("Generating XML started");
      strData.substring(strData.indexOf("<?xml"), strData.length());
      arg1.getOutputPayload().getOutputStream().write(
      strData.getBytes("UTF-8"));
      getTrace().addInfo("Generating XML started");
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      public String convertStreamToString(InputStream in) {
      StringBuffer sb = new StringBuffer();
      try {
      InputStreamReader isr = new InputStreamReader(in);
      Reader reader = new BufferedReader(isr);
      int ch;
      while ((ch = in.read()) > -1) {
      sb.append((char) ch);
      reader.close();
      } catch (Exception exception) {
      return sb.toString();
    and u can get  the xml as a resultant which  u can use as input for next message mapping.
    thanks and regards,
    Praveen T

  • Namespace in XML Payload for HTTP Sender

    Hello,
    I have just configured my snychronous HTTP <--> RFC Scenario. When I want to test it with some XML payload in the HTTP testing tool I get a mapping runtime exception.
    After some investigation using the test tab in the message mapping I realized that missing namespace in the XML payload caused the error. I tried to add manually a namespace to the XML and then it worked
    This is very strange I though that the namespace of the sender interface is automatically added to the XML payload?
    Do you have any information on this?

    Hi,
    U need to copy the payload from Message mapping test message tab and use that payload.
    or u can use the HTTP test client for testing the same.
    sample HTML code to create HTTP Client:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/66dadc6e-0a01-0010-9ea9-bb6d8ca48cc8
    You can also use the Wfetch application by Microsift for the same..
    download the same from below link
    http://www.iisfaq.com/Default.aspx?tabid=2975
    Thnx
    Chirag

  • XML Payload with attachment idoc to rnif

    Hi Experts,
    I am doing the scenario Idoc to RNIF. i have to pick up some1234 .pdf , fieldticket.pdf files and attached to the xml payload of out put and send it to the customers. How can we do this. please any one help me. If you have any documents please send me.

    Anyone working/worked with RNIF adapter would like to share their experience.

  • XML Payload extraction from XI Message

    Hi to all,
    I use the SXI_MONITOR transaction to see the XML Payload of XI Messages. In this transaction, each successfully message has a field "MainDocument" under "Response" section that contains the XML Payload of the message.
    <B>There is a function module that I can use to extract the XML from MainDocument field?</B> I've tryed to look into SXMSCLUP and SXMSCLUR abap data tables but here I founded only the SOAP Header and SOAP Body data of the message. Here I can't see the "Payloads" data, so the MainDocument tag.
    Can anyone help me?
    Thanks!

    Ciao Gabriele,
    there are differente way to do it.
    one time I got same issue and I got some answer on the community.
    Unfortunately there was no more need for it so i did not implement but
    easily speaking in all the mapping got the payload therefore u need just to create a full mapping adn to process the data u get.
    In java for example is given as input stream that u can store some where and process.
    I pasted the result below:
    IN java
    How to get the whole payload
    in abap
    /people/udo.martens/blog/2006/02/16/own-logging-of-xi-messages
    please rewars point is useful thanks.
    regards,
    Giamma

  • Xml payload in a single field

    Hi All,
    I hve a scenario like this ERP->XI->Monitoring system
    In the mapping, I need to assign the outbound payload (whole xml) to a field in the target
    message field since the (Target) Monitoring system wants to receive the whole xml message in single field.
    How can i achieve this?
    Thanks
    Deno

    try this.. some of the imports are not required.. however I just copied from my code..
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import com.sap.aii.af.mp.module.Module;
    import com.sap.aii.af.mp.module.ModuleContext;
    import com.sap.aii.af.mp.module.ModuleData;
    import com.sap.aii.af.mp.module.ModuleException;
    import com.sap.aii.af.ra.ms.api.Message;
    import com.sap.aii.af.service.trace.Trace;
    import java.util.Hashtable;
    //XML Parsing and Transformation classes
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.io.InputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.StringWriter;
    import com.sap.aii.af.ra.ms.api.XMLPayload;
    import com.sun.org.apache.xml.internal.serialize.OutputFormat;
    import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
    import javax.xml.transform.*;
    import javax.xml.transform.Source;
    import javax.xml.transform.Result;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;     
    Object obj = null; //Handler to get principal data
              Message msg = null;// Handler to get message object
              String getXMLtoField = null;
              try {
                   obj = inputModuleData.getPrincipalData();
                   msg = (Message)obj;
                   XMLPayload xmlpayload = msg.getDocument();
                        DocumentBuilderFactory factory;
                        factory =DocumentBuilderFactory.newInstance();
                        DocumentBuilder builder = factory.newDocumentBuilder();
                        // parse the XML Payload
                        Document document = builder.parse((InputStream)
                        xmlpayload.getInputStream());
                        OutputFormat format = new OutputFormat(document);    // Serialize DOM
                        StringWriter stringOut = new StringWriter();    // Writer will be a String
                        XMLSerializer serial = new XMLSerializer(stringOut, format);
                        serial.asDOMSerializer();                       // As a DOM Serializer
                        serial.serialize(document.getDocumentElement());
                        String FileContent = stringOut.toString();
              return getXMLtoField;

  • XML payload in RESTful webservice

    Hi all,
    Can anyone please suggest on how to call the RESTful webservice (which is used by our client) by passing an XML payload from a PL SQL stored procedure? It is for the authentication purpose. And the username and password has to be passed as the XML payload to the RESTful webservice . Please help, it's a bit urgent.
    Thanks in advance
    Geethu
    Edited by: 982489 on Mar 22, 2013 3:02 AM

    Hi all,
    Can anyone please suggest on how to call the RESTful webservice (which is used by our client) by passing an XML payload from a PL SQL stored procedure? It is for the authentication purpose. And the username and password has to be passed as the XML payload to the RESTful webservice . Please help, it's a bit urgent.
    Thanks in advance
    Geethu
    Edited by: 982489 on Mar 22, 2013 3:02 AM

Maybe you are looking for

  • My itunes says 'you must connect to wifi network or download on your computer' when i am already on my computer and connected to internet?!

    I am trying to rent some movies in the iTunes store but regardless of what account I use it keeps popping up with the message of: "This iteam cannot be downloaded on this network, you must connect to a wifi network or download it on your computer" My

  • HELP! watching movies from ipod to tv

    I've bought three different cables and now I have a dock. I have set it to tv out on and ask, and when i select a movie it says to atach video accessory so i do and nothing happens the screen stays the same! i've tried it on three different TV's and

  • How can i get my mac to trust my iPhone when i have smashed the screen

    I have smashed the screen on my iPhone 6 and it is not recognising finger touch at all. I have plugged it into my Mac so I can back it up. My mac is recognising the phone but as I have not used my phone with my mac before it is asking me to press tou

  • Execute Menu Function on click of the button

    Hi All, I have a requirement, where we have to convert the Interactive form to XML on click of the button. This button is also available on the form. In the PDF we have option in Documents --> Form Data --> Export Data from Form Is there any way I ca

  • RMAN Message

    Hi, I am using a Backup Application "Omniback" from HP. This Application uses RMAN internally to manage the Backup. Here are some messages that I get and I am not sure what it means. Can someone help with this ? RMAN-08013: channel dev_0: piece 1 cre