Testcase, how to split up an xml message and call a BPEL process.

Another question.
Considering the following XML message.
<?xml version="1.0" encoding="UTF-8"?>
<rows>
<row>
<id>10</id>
<naam>A</naam>
</row>
<row>
<id>20</id>
<naam>B</naam>
</row>
</rows>
An input message can consist of 1 to about 20000 <row></row> elements. I would like to split up this message into individual <row></row> and call a BPEL process for further processing.
I've tried to use the file adapters feature "Files contain Multiple Messages" Publish Messages in batches of.." This did not work. ( root element expected exceptions ).
I've also tried to invoke an extra async routing service with a mapping which removes the root element. This also doesn't work as it leaves the following ( incorrect ) xml message at the end.
<row>
<id>10</id>
<naam>A</naam>
</row>
<row>
<id>20</id>
<naam>B</naam>
</row>
Which is logical considering how an XSL transformation works.
Is there any way to achieve this?
Any help is appreciated!

You shoul create a while loop, that loops through XML payload for each row. Than you can process each individual row. See also example:
C:\orabpel\samples\tutorials\112.Arrays\ArraySample.bpel

Similar Messages

  • How to loop through many XML messages and parse them ?

    Hi All
    I have been trying very hard to loop through many XML messages and process each of them. Let me first explain the problem -
    Suppose I have the following String -
    <xyz>
    <abc>happy</abc>
    </xyz>
    <xyz>
    <abc>new</abc>
    <xyz>
    <xyz>
    <abc>year</abc>
    </xyz>
    I have to process each message within the <xyz></xyz> tag and find the falue of <abc> element (happy, new and year).
    The extraction of <abc> value is very simple, I am using SAX parser's startElement() method to check every element's name and if the element's name is <abc> pick up the value. But I am not able to loop through the different messages within the <xyz></xyz> tag.
    I am thinking of using another DOM parser -
    DOMParser domParser = new DOMParser();
    StringReader rdr = new StringReader(inputXML);
    InputSource src = new InputSource(rdr);
    domParser.parse(src);
    Document doc = domParser.getDocument();
    NodeList nodeList = doc.getElementsByTagName("xyz");
    Now I can loop through this nodeList, but not able to. Is using the DOM parser and NodeList the preferable way of lopping through the messages, then how I can loop through ? Or is there any other way ?
    I have been trying on this for quite a few days, but not able to. Can you please help me out ?
    Thanking you in advance ....
    Nirmalya Sinha

    Hi,
    Try using the SAX reader from the dom4j package. The document object that you receive contains methods for getting the root elements and with that you can traverse down to the sub elements of it.
    Hope this was of some help.

  • How to use AQ Adapter for Enqueue and Dequeue in BPEL process

    Can anyone help me how to use Enqueue and Dequeue in BPEL process ? Any good sample or material /tutorial??
    Thanks

    You shoul create a while loop, that loops through XML payload for each row. Than you can process each individual row. See also example:
    C:\orabpel\samples\tutorials\112.Arrays\ArraySample.bpel

  • How to create and deploy a JSP which calls a BPEL process in JDEVELOPER

    Hi Gurus,
    I don't know how to create a JSP in JDEVELOPER which call a BPEL process. I have gone through the tutorials. Since, I am new to JDEVELOPER I need some help.
    1. How to create a JSP (I know creating application and project, also I know JSP coding)
    2. How to deploy this JSP?
    3. For the Synchronos BPEL project, the build.xml is created automatically, in this forum, I see people talking about ear war .deploy etc. How do we get them automatically created. Or do we need to create them manually. If it has to be manual some sample scripts would be of great help.
    Any help in this regard would be really great.
    Thanks in advance,
    Sankar.

    I found the following tutorial which clearly explains how to deploy J2EE apps.
    http://www.oracle.com/technology/obe/obe1013jdev/deployment/deployment.htm
    I created a simple jsp file in a project, followed the steps in the tutorial and it got deployed onto: http://localhost:9700
    For invoking BPEL process through JSP, I have reused the jsp files available in : 102.InvokingProcesses\jsp and changed the processes and input accordingly.
    Please post me a query in this thread, if any of you want any specific details.

  • How do I block messages and calls on the iPhone 5?

    Hey people, how do I block irritating message and calls on the iPhone?

    I'm having the same issue. It had the feature before and worked beautifully, and now when I try I do the same pinching/stretching method and nothing happens. I don't have an option to zoom anywhere in photo or video.

  • How can i transfer video recordings, messages and contacts to computer?

    Hi
    how can i transfer video recordings, messages and contacts to computer... please guide me through..
    regards

    You should read the iPhone user guide. Answers all these questions.

  • My Gf has my iphone. How can I see recent messages and calls from another device?

    My Gf has my iphone. How can I see recent messages and calls from another device?

    Depending on your carrier, you may be able to see recent calls by logging into your account on the carrier's web site, if they offer such a feature, though incoming calls being shown is not usual. There will, as diesel said, be no way to see messages already received, either SMS/MMS or iMessages, without having the phone.
    Regards.

  • How do you differentiate IDOC XML format and ordinary XML format

    how do you differentiate IDOC XML format and ordinary XML format since they are used by IDOC adapter and RFC adapter???

    Hi,
    Cremas Structure starts with Header and followed by Segments...
    Normally it begins like this
    <CREMAS03><IDOC BEGIN="1">
    The second node is Idoc in the header..
    Thanks
    Anju

  • I have an iphone 4, how do I take stored voice messages and record them to a stick?

    I have an iphone 4, how do I take stored voice messages and record them to a stick?  A family member passed away and I want to keep their voice.

    Hey there!
    Sadly, there is no way to do this.
    I'm sad to hear you've lost a familymember.
    Try this: Move in a quiet-room. Play his/her voice over speaker of your iphone and record it with free recording-softwarefor windows or mac.
    Hope this will help you keeping the memory.

  • How to split the blob byte array and insert in oracle

    how to split the blob byte array and insert in oracle
    I am having a string which is of more than lenght 4000 so i am using BLOB datatype as input to get the string.
    need to split the blob in oracle and store in the different column
    The string is of bytearray i need to strore it in each column based on the byte array.

    this will be my input i need to split the above and store it in different columns in a table.
    for spliting say
    Column1 -1 byte
    Column2-3 byte
    Column3-5 byte
    ColumnN-5 byte
    Table will have corresponding data type
    Column1 - number(10,2)
    Column2 - Float
    Column3 - Float
    ColumnN-Float
    here Column2 datatype is float but it will always have 3 byte information.
    where as Column3 datatype is also float but it will always have 5 byte information.
    Say N is Column 120

  • Sending an XML message and using proxy at receiver end

    hi all,
    please suggest me the steps to be followed in order to send a XML message and accepting this message using proxies.
    please help me out with detailed procedure.
    thanks+regards,
    Ujwalkumar

    Hi UjwalKumar,
    Follow this link:
    /people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy
    This blog gives an excellent description of 'FILE to Proxy' scenario.
    what you need is XML to proxy...i.e. your scenario is very similar to this one...only diffrence is  that  , you wont be using FCC .since your source msg is in XML format..
    Hope this helps..
    Regards ,
    Sushil

  • How do I get my I message and FaceTime to activate on the iPhone 5s

    How do I get my I message and FaceTime to activate on the iPhone 5s?

    settings>messages>turn on
    settings>facetime>turn on
    if those dont work then go to settings>general>Reset>reset all settings
    -Nothing will be deleted, you just have to go through the setup process again, setup as new ipad/iphone/ipod do not restore from back up, sign in with your apple id, and you should be good to go just make sure that both facetime and imessage are turned on

  • How to split multivalues in Search refiners and show them as single value.

    How to split multivalues in Search refiners and show them as single value.
    I have values in refinement panel like "KA;#XA;#BA" and I want to show them as
    KA
    XA
    BA
    Any help will be greatly appreciated.
    Thanks in advance...
    BKPA

    Hi Baskaran,
    From your description, I understand you would like separator in multi-value refiner. I found some similar cases for your reference:
    http://searchunleashed.wordpress.com/2011/08/19/working-with-fast-search-for-sharepoint-and-multivalued-properties/#create-custom-processing-component
    http://searchunleashed.wordpress.com/2011/08/19/working-with-fast-search-for-sharepoint-and-multivalued-properties/
    http://sharepoint.stackexchange.com/questions/79289/refiners-for-multi-valued-managed-properties-in-sharepoint
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Question: How to call a BPEL process from a PL/SQL procedure

    Hi All,
    Greetings to all BPEL people. I have a question on how can we call a BPEL process from a PLSQL procedure. It might be a stupid question but i wanted to know whether this fetaure is available in BPEL as our scenario requires us to explore if this functionality is available in BPEL.
    Please let me know and also if possible please send me the links for the tutorials if it is available.
    Thanks In Advance,
    Dibya

    Yes u can do it. there are two ways.
    1) First one is using utl_http package of PL/SQL
    In this case u can create SOAP request message & send it as Http request to your deployed BPEL process.
    This package provides some methods like
    set_header,write_text,get_response,read_text etc..
    Following is part of code which may be helpful to you.
    create or replace package body test_book_order_sub_pkg
    is
    FUNCTION test_book_order_sub(p_subscription_guid IN RAW,
    p_event IN OUT WF_EVENT_T
                                            Return VARCHAR2 IS
    soap_request varchar2(30000);
    soap_respond varchar2(30000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    launch_url varchar2(240) ;
         begin
         DBMS_OUTPUT.Put_Line('Subscription : Order has been booked');
         soap_request:='<?xml version="1.0" encoding="UTF-8"?>
         <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header/>
    <soap:Body xmlns:ns1="http://xmlns.oracle.com/BES_BookOrder">
    <ns1:BES_BookOrderProcessRequest>
    <ns1:input>725</ns1:input>
    </ns1:BES_BookOrderProcessRequest>
    </soap:Body>
    </soap:Envelope>';
    http_req:= utl_http.begin_request
    ('http://172.28.5.191:8888/orabpel/default/BES_BookOrder/1.0',
    'POST',
    'HTTP/1.1'
    utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
    utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
    utl_http.set_header(http_req, 'SOAPAction', 'initiate');
         utl_http.write_text(http_req, soap_request) ;
    http_resp:= utl_http.get_response(http_req) ;
    utl_http.read_text(http_resp, soap_respond) ;
    utl_http.end_response(http_resp) ;
    DBMS_OUTPUT.Put_Line(soap_respond);
    return('SUCCESS');
    end test_book_order_sub;
    end test_book_order_sub_pkg;
    2) Second way is make your BPEL process listening to some database Queue(use AQ Adapter). & then put some message in tht queue from ur Pl/SQL code . This will also initiate BPEL instance. Check out AQAdapter tutorials.
    /mishit

  • How to pass a document as an attachment to a BPEL process?

    Hi Guys,
    Currently I have a BPEL process that get's invoked from a JSP page with some scriplets in it. The following bit of code calls the BPEL process in the JSP scriplet:
    try{       
    String givenNames = request.getParameter("givenNames");
    String sex = request.getParameter("sex");
    String title = request.getParameter("title");
    String staffMemberInd = request.getParameter("staffMemberInd");
    String deceasedInd = request.getParameter("deceasedInd");
    String archiveExclusionInd = request.getParameter("archiveExclusionInd");
    String archiveDt = request.getParameter("archiveDt");
    String purgeExclusionInd = request.getParameter("purgeExclusionInd");
    String purgeDt = request.getParameter("purgeDt");
    String birthDt = request.getParameter("birthDt");
    String salutation = request.getParameter("salutation");
    String preferredGivenName = request.getParameter("preferredGivenName");
    String emailAddr = request.getParameter("emailAddr");
    String autoEnableInd = request.getParameter("autoEnableInd");
    String xml = "<AddUserProcessRequest xmlns=\"http://xmlns.oracle.com/callistaAddUser\">"
    +"<surname>"+surname+"</surname>"
    +"<givenNames>"+givenNames+"</givenNames>"
    +"<sex>"+sex+"</sex>"
    +"<title>"+title+"</title>"
    +"<staffMemberInd>"+staffMemberInd+"</staffMemberInd>"
    +"<deceasedInd>"+deceasedInd+"</deceasedInd>"
    +"<archiveExclusionInd>"+archiveExclusionInd+"</archiveExclusionInd>"
    +"<archiveDt>"+archiveDt+"</archiveDt>"
    +"<purgeExclusionInd>"+purgeExclusionInd+"</purgeExclusionInd>"
    +"<purgeDt>"+purgeDt+"</purgeDt>"
    +"<birthDt>"+birthDt+"</birthDt>"
    +"<salutation>"+salutation+"</salutation>"
    +"<preferredGivenName>"+preferredGivenName+"</preferredGivenName>"
    +"<emailAddr>"+emailAddr+"</emailAddr>"
    +"<autoEnableInd>"+autoEnableInd+"</autoEnableInd>"
    +"</AddUserProcessRequest>";
    Locator locator = new Locator("default","bpel");
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart("payload" , xml );
    NormalizedMessage res = deliveryService.request("AddUser", "process", nm);
    Map payload = res.getPayload();
    Element partEl = (Element) payload.get("payload");
    In my BPEL process I have a human task that I want to attach a document (WORD, PDF etc) to.
    My question is, how can I attach and pass a document as an input parameter to my BPEL process? and what kind of element do I need to create in the XSD file to hold the attached document?
    Any help with this is greatly appreciated.
    Thanks.
    Edited by: user9972209 on Aug 31, 2008 10:57 PM

    In our application, an attachment surfaces in the middle of the lifecycle, but not from the start.
    We were using the following to accommodate the attachment as the part of the payload ...
    <xsd:element name="AttachementMimeType" type="xsd:string"/>
    <xsd:element name="AttachmentMIMEStream" type="xsd:string"/>
    Hope this helps.

Maybe you are looking for

  • Weblogic Error when Starting AdminServer for OracleBI

    Hi all, I have the following error over Oracle BI 11.1.1.7 with Weblogic server. I was trying to integrate LDAP Authentication and the server refuse to start. Regards, VG ####<03-Jul-2013 11:09:29 o'clock IST> <Error> <Security> <OMEG6116> <AdminServ

  • About invoice verification without GR-based indicator set in PO

    Dears, As I know, when carry out invoice verification for a PO without GR-based IV set in PO/Vendor/PIR, there will be no reference invoice quantity and value in item lines of the invoice. User must input them manually according to real values in the

  • Regarding DIM ID & MASTER TABLES

    hi Can any one explain 1) At what time Dimension ID's are created? 2) If i incude 3 char's in one dimension,hoe many dim ID's are create? 3)At what time X and Y tales are filled? 4) How can i delete and restore the X table ,with out deleting the mast

  • W520 "Power Manager has stopped working" then "finterpri​nt software error"

    For the last 6 months, I have not done any lenovo updates,and stuck with old working versions of bios, powermanager, nvidia drivers etc (having lived though the nightmanre of the fist 6 months with CPUs stuck at min on mains and max on batteries etc)

  • Error while building iFolder client code on Ubuntu 11

    I have checked out the code from the SVN repository and now want to change some source code and then build it. I ran - ./configure and then, make but I get the following error - Makefile:1: *** missing separator. Stop. This is what beginning of my Ma