BPEL- To split XML message before sending

I get Orders -XML from ERP System , and I am sending this XML data to external system(using web services).
So, if one or more Orders fail to validate, then none of them get into Database.
Using a loop by sending each Order at a time is the best way?
Thanks
Edited by: user13374451 on Sep 14, 2010 2:45 PM

Oh yes we can achieve this. I did it in one of my processes. Probably this is what you can do.
1. Take a count variable and based on your required count the number of time you need to send the XML content. In my case, I was receiving many protocol informations in a single XML payload and I had to call the web service for each of these protocols. So say if i had 5 protocols in my XML, I need to break it into 5 and post it to the Web service 5 times.
2. Take a while loop and use increment counter.
3. break the XML code for each of your entry using incrememtn count variable like this /ns5:NewDataset/LotCountryReleaseMessage[bpws:getVariableData("IncrementCount")] and copy it to another variable (which is of same structure).
4. Increment count value.
5. Post it to ur target. This way, the web service is called for each of your entry.
Let me know if this was clear.
Thanks,
Gautham

Similar Messages

  • Encription of the xml message before sending it out of xi

    Hi
    I have to send xml message out of xi.
    I am using the xi adapter to do so.
    I have to encript the message.
    how can i achieve this
    Thanks
    Nikhil

    Hi
    You can use Java Mapping or user-Modules to do this.
    Go thru this link:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/unkown/webinars/how to handle unstructured source content for adapters/the pdf presentation of how to handle unstructured source content for adapters.pdf
    Hope it helps.
    Regards
    Arpit Seth

  • Droid X, review lengthy text message before sending?

    When composing a long text message I find it very difficult to review the entire message before sending it. Is there a way to do this that is not obvious? I have tried scrolling line by line and I end up changing words unintentionally. Holding your finger over the text pops out a magnifying glass, but even that is not very useful.

    Unfortunately there is not an option within the device to change to make viewing your text messages any easier. You will have to scroll through the message. 
    Hope this helps!

  • Splitting xml message using XSLT

    Hi,
    I have XML message that I want to split up using XSLT. Following is the structure of the XML message.
    <Meters>
    <Meter>
    <ID>1</ID>
    <Type>A</Type>
    <Reading ref="1A" />
    </Meter>
    <Meter>
    <ID>2</ID>
    <Type>A</Type>
    <Reading ref="2A" />
    </Meter>
    <Meter>
    <ID>3</ID>
    <Type>B</Type>
    <Reading ref="3B" />
    </Meter>
    <Reading>
    <refLink>1A</refLink>
    <quantity>Watts</quantity>
    <value>221.00</value>
    </Reading>
    <Reading>
    <refLink>2A</refLink>
    <quantity>Wh d</quantity>
    <value>0.00</value>
    </Reading>
    <Reading>
    <refLink>3B</refLink>
    <quantity>Wh r</quantity>
    <value>3.00</value>
    </Reading>
    </Meters>
    The split up should happen on the <Meter> tag. Currently, this message has three <Meter> elements. The output should result in 3 different XML messages each having its own <Meter> element. Also, please note that each <Meter> has <Reading> which is linked to the actual <Reading> data using "ref" attribute and "refLink". The value of "ref" attribute will be unique through out the XML message.
    Expected output: 1.xml
    <Meters>
    <Meter>
    <ID>1</ID>
    <Type>A</Type>
    <Reading ref="1A" />
    </Meter>
    <Reading>
    <refLink>1A</refLink>
    <quantity>Watts</quantity>
    <value>221.00</value>
    </Reading>
    </Meters>
    and similarly 2 more XMLs.
    Please let me know if anyone has done this kind of work in XSLT.

    You are right I see that xsl:document is in 1.1 recommendation, but was referred by
    XSLT books I have.
    I found one site that's explaining this
    http://www.vbxml.com/xsl/elmxsl_document.asp
    http://www.w3.org/TR/xslt11/#multiple-output
    I am almost trying now to reverting to using java.util.regex and doing the split
    brutforce.. :))))
    - Ravi

  • Edit a mail message before sending

    How do I edit an email in Mail while spell-checking? Sounds simple, but my stupidity means I can't find out how to do it.
    Here's my scenario: I write a message, hit send and it brings up the spellchecker. Then while doing the spellcheck, I realise that I want to add or alter something in the email. So I come out of the spellchecker, either by closing it or just clicking on the body of the message, and try to edit the email. But when I then click in to the text I want to change and hit a key, any key it seems. the email just sends - doesn't give an opportunity to make those changes.
    This has to be something so obvious that I will cringe with embarrassment when I read the answer, but I hope someone will take pity on me and give me the answer!
    Thanks to that person!
    BTW, the thing is I only started using Mail a short while ago, having been a confirmed Thunderbird user...
    Ian

    Hi Lavakumar,
    Based on my knowledge, getting an alert before sending messages can't be achieved by Exchange Server.
    I would like to know what your purpose is. If you want to avoid users from sending wrong messages, recall feature can help them when they send wrong messages.
    For more information about recall, here is a helpful thread for your reference.
    Recall or replace an email message that you sent
    http://office.microsoft.com/en-us/outlook-help/recall-or-replace-an-email-message-after-it-is-sent-HA010354931.aspx
    Hope it helps.
    If you need further assistance, please feel free to let me know.
    Best regards,
    Amy
    Amy Wang
    TechNet Community Support

  • Alert Message before sending a Mail from Outlook

    Hi Team,
    Can you please suggest how to to get a alert in outlook before sending mail. We have to do this for all of our exchange users. Around 200 people are there in our organization. Please respond to it ASAP.
    Regards,
    Lavakumar Reddy M

    Hi Lavakumar,
    Based on my knowledge, getting an alert before sending messages can't be achieved by Exchange Server.
    I would like to know what your purpose is. If you want to avoid users from sending wrong messages, recall feature can help them when they send wrong messages.
    For more information about recall, here is a helpful thread for your reference.
    Recall or replace an email message that you sent
    http://office.microsoft.com/en-us/outlook-help/recall-or-replace-an-email-message-after-it-is-sent-HA010354931.aspx
    Hope it helps.
    If you need further assistance, please feel free to let me know.
    Best regards,
    Amy
    Amy Wang
    TechNet Community Support

  • Show HTML Message Before Send..

    Hi All,
    Any help would be greatly appreciated as I am losing sleep, my hair, my
    sanity and any respect I had for groupwise... ; )
    Ok, heres the deal... I am trying to send a HTML formatted EMail
    programmatically using groupwise that the user will be able to edit
    before it is sent...
    I have tried several methods all without success...
    1) I create the Email using Groupware Object Model, attach a file called
    Text.htm. The file is correctly used as the HTML body but then if I
    attempt to show the mail to the user with Groupwise tokens all of the
    address fields (To, CC, BC) are reset???!!!
    2) If I create the whole mail using Tokens there is no way to Set the
    HTML body. If I attach the Text.Htm file then it is not treated as the
    HTML body, it is just shown as a normal attachment!!!
    3) If I use MAPI the TEXT.htm file is not treated as the HTML body and
    there is no way to set the HTML text via the MAPI Api.
    I just want to create a HTML formatted EMail from code... So far I have
    had to use 3 different API's and I am still no further forward.
    Thanks...

    Hi David,
    Thanks for your respone, don't worry on the spelling I am exactly the
    same. Many times I have sent a post only to read it back wincing...
    I notice that the 2 posts have re-appeared, bizarre.
    With regard to your suggestion, can you elaborate?
    In case 1, where I can get the HTML attached to the mail whenever I use
    Groupwise tokens to show the mail for editing it resets all of the address
    fields. Even if I manually fill these in it looses the HTML attachment. If
    I re-attach it using tokens it is treated just as a normal attachment (IE
    is not used as the HTML body). So basically I am stuck at this point. Are
    you suggesting that I write or use another HTML/EMail editor external to
    Groupwise and then just use Groupwise to send the Email?
    I must say that I would have thought that this was a pretty common
    requirement. Has no one at Novell on anywhere else done this before using
    Groupwise?
    Thanks,
    Dhugal.
    David Mair wrote:
    > BTW, spelling is often optional in my posts (I write them very fast and
    > jump from place to place editing them as I write them). Sorry about:
    > "The lack of probably indocates". It should, of course, read: "The lack
    > of a response probably indicates". I actually had to cancel and re-post
    > this one due to two typos. Believe me, English is my first language.
    > David Mair wrote:
    > > Yes, I noticed my message disappeared, let me quote from it:
    > >
    > > "These forums are not staffed by Novell, they are made available by
    > > Novell for peer support (as is the case with other software company NNTP
    > > servers). Several Novell employees "hang out" on the forums (I'm one of
    > > them) but those of us that do are volunteers. The lack of probably
    > > indocates that no-one knows the answer to your question or that someone
    > > with an answer has not seen it yet."
    > >
    > > The comment on how I believe GroupWise handles HTML wasn't intended as
    > > something you needed to know. It was intended to suggest there might be
    > > another way to solve your problem. The case you described that came
    > > closest to functioning, 1) in your OP might be re-workable such that it
    > > does work. My point was that if GroupWise uses external COM objects for
    > > its HTML handling then you might not need to use GroupWise to show the
    > > mail for editing. You could compose it externally from GroupWise and use
    > > the functional parts of your case 1 after the message is composed.
    > >
    > > dhugalleverett wrote:
    > >
    > >> Hi All,
    > >>
    > >> I don't know what is going on but 2 posts have disappeared from this
    > >> thread....
    > >>
    > >> Anyway, to the developer who originally replied:
    > >>
    > >> I am a little confused by your explanation. I do not need to know the
    > >> internals of how Novell handles HTML. I simply want to create a HTML
    > >> formatted EMail programmatically, and open it so that the user can
    > >> edit it
    > >> before it is sent.
    > >>
    > >> In Outlook it is a simple as setting a simple property:
    > >>
    > >> MailItem.HTMLBody = sHTMLString
    > >>
    > >> I have searched the Web, the NDK documentation and the forums and I have
    > >> not been able to find any information on how to do this, let alone
    > >> whether
    > >> it is possible or not.
    > >>
    > >> Could someone at Novell simply confirm whether or not this is possible
    > >> please?
    > >>
    > >> I am in the situation where a client using Novell Groupwise has asked me
    > >> (or my company to be more precise) to develop some software that
    > >> integrates with Novell and I am unable to tell them whether or not
    > >> this is
    > >> possible because none of the documentation covers it and none of the
    > >> Novell developers on this forum have been able to tell me.
    > >>
    > >> Personally I do not see it as a major issue if Groupwise does not support
    > >> this, although I would like to be able meet the clients requirements
    > >> exactly if possible.
    > >>
    > >> Thanks,
    > >>
    > >> Dhugal.
    > >>
    > >> dhugalleverett wrote:
    > >>
    > >>
    > >>> Hi all,
    > >>
    > >>
    > >>
    > >>> I am assuming from the lack of response that there is no way to achieve
    > >>> this?
    > >>
    > >>
    > >>
    > >>> Can someone from Novell confirm whether or not this is the case please?
    > >>> That was I can go back to my client and inform them what the
    > >>> situation is.
    > >>
    > >>
    > >>
    > >>> Thanks,
    > >>
    > >>
    > >>
    > >>> Dhugal.
    > >>
    > >>
    > >>
    > >>> [email protected] wrote:
    > >>
    > >>
    > >>
    > >>>> Hi All,
    > >>
    > >>
    > >>
    > >>>> Any help would be greatly appreciated as I am losing sleep, my hair,
    > >>>> my sanity and any respect I had for groupwise... ; )
    > >>
    > >>
    > >>
    > >>>> Ok, heres the deal... I am trying to send a HTML formatted EMail
    > >>>> programmatically using groupwise that the user will be able to edit
    > >>>> before it is sent...
    > >>
    > >>
    > >>
    > >>>> I have tried several methods all without success...
    > >>
    > >>
    > >>
    > >>>> 1) I create the Email using Groupware Object Model, attach a file
    > >>>> called Text.htm. The file is correctly used as the HTML body but
    > >>>> then if I attempt to show the mail to the user with Groupwise tokens
    > >>>> all of the address fields (To, CC, BC) are reset???!!!
    > >>
    > >>
    > >>
    > >>>> 2) If I create the whole mail using Tokens there is no way to Set
    > >>>> the HTML body. If I attach the Text.Htm file then it is not treated
    > >>>> as the HTML body, it is just shown as a normal attachment!!!
    > >>
    > >>
    > >>
    > >>>> 3) If I use MAPI the TEXT.htm file is not treated as the HTML body
    > >>>> and there is no way to set the HTML text via the MAPI Api.
    > >>
    > >>
    > >>
    > >>>> I just want to create a HTML formatted EMail from code... So far I
    > >>>> have had to use 3 different API's and I am still no further forward.
    > >>
    > >>
    > >>
    > >>>> Thanks...
    > >>
    > >>
    > >>
    > >>
    > >
    > >

  • Show Message Before Send?

    Hi All,
    I think this is my last question (At least I hope so)...
    I am using the Groupwise objects to generate an EMail from my application
    which works fine, however I would like to show the EMail to the user
    before it is sent.
    So I programmatically create the EMail then I would like to open the
    EMail in the Groupwise interface, allow the user to edit it, and when
    they are happy click send.
    Can anyone advise me on how to do this please?
    Thanks,
    Dhugal.

    No you'd have to keep using token api to fill it in (itemsettext and such)
    There's no object connection between the two.
    "Andrew Maxin" <[email protected]> wrote in message
    news:uamTd.3809$[email protected]..
    > Dhugal
    >
    > The way I did this was by using the "Commander"
    >
    > Public g_c3p0Commander as object
    > Set g_c3PoCommander = CreateObject("GroupWiseCommander")
    >
    > g_c3PoCommander.Execute "NewMail()", strRet
    >
    >
    > From here, I believe you can refer to the object via the regular API. What
    > GW does is call the currently open message "X00". Once you have created
    > the message with the token commander, I believe you can fill in the object
    > (haven't tried though). You can get a list of tokens via Novell's
    > developer site.
    >
    > Regards,
    >
    > Andrew
    >
    >
    >
    > <[email protected]> wrote in message
    > news:NNlTd.3764$[email protected]..
    >> Hi Tommy,
    >>
    >> Can you elaborate?
    >>
    >> Cheers,
    >>
    >> Dhugal.
    >>> Use tokens.
    >>> --
    >>> Best Regards
    >>>
    >>> Tommy Mikkelsen
    >>>
    >>> IT Quality A/S
    >>> Denmark
    >>>
    >>> Novell Support Forums SYSOP
    >>>
    >>> Please Report back any success or failure, That way we all learn
    >>>
    >>> Sorry, but no support through email
    >>>
    >>> "I hate bugs".......Tommy Lee Jones, MIB
    >>>
    >>>
    >>> [email protected] wrote:
    >>>
    >>> >
    >>> > Hi All,
    >>> >
    >>> > I think this is my last question (At least I hope so)...
    >>> >
    >>> > I am using the Groupwise objects to generate an EMail from my
    >>> > application which works fine, however I would like to show the EMail
    >>> > to the user before it is sent.
    >>> >
    >>> > So I programmatically create the EMail then I would like to open the
    >>> > EMail in the Groupwise interface, allow the user to edit it, and when
    >>> > they are happy click send.
    >>> >
    >>> > Can anyone advise me on how to do this please?
    >>> >
    >>> > Thanks,
    >>> >
    >>> > Dhugal.
    >>
    >
    >

  • Microsoft Outlook truncates messagies before sending (Outlook Connector)

    Using Outlook Connector, connectod to SUN messaging server, when new message or REPLY is composed, and SENT, outlook sends just a part of a message - last edited lines just disappears. receiver receives truncated message, and truncated message appears in SENT folder.
    It seems to be "Autosave problem". That Outlook sends LAST DRAFT auto saved message version?
    When Outlook autosave is set OFF, composing and sending works fine.
    Problem appears on different workstations: Windows XP, Windows VISTA, Outlook 2003, Outlook 2007....
    Does anybody knows solution for this? Or this is server configuration problem?

    >
    In future please provide the exact version of Outlook Connector that you are running.
    Using Outlook Connector, connectod to SUN messaging server, when new message or REPLY is composed, and SENT, outlook sends just a part of a message - last edited lines just disappears. receiver receives truncated message, and truncated message appears in SENT folder.This sounds like a known issue that was fixed some time ago:
    bug #6441043 - "after autosave and continue to edit text is lost".
    Can you reproduce this problem with the latest version of Outlook Connector (OC7.3 - 139162-01) which can be downloaded via sunsolve.sun.com?
    http://sunsolve.sun.com/search/document.do?assetkey=1-21-139162-01-1
    Regards,
    Shane.

  • How to trigger XML messages for FWO

    Hello Experts,
    I’d like to trigger a XML outbound message after creation of an air forwarding order (FWO) in my TM system. It could not be a confirmation. I need this XML to provide the results of charges calculation in a legacy system (B2B communication).
    Could someone help me in this?
    Regards,
    Alberto.

    Dear Alberto,
    You can follow below steps to achive the same.
    1 You have to setup PPF framework.
    A. You will be having output profile (which is for processing the actions in background) assigned to Air FWO document type.
    B.Go to PPF customizing (Tcode - SPPFCADM) -> Select the Action profile -> Create Action definition ->choose the processing time as 'Processing when saving the document'-> processing type as 'Method call' -> Create the BADI implementation for definition EXEC_METHODCALL_PPF''. Here you can check if any filter before you trigger XML Message.
    2.You have to create a custom Proxy and proxy class to generate the XML message and send to target system.
    You will call this proxy class in BADI implementation EXEC_METHODCALL_PPF and build the XML message with required Charges data.
    After all the setup is done, you can test and make sure you have XML message generated in SXI_MONITOR / SXMB_MONI t-code.
    Let me know any challenges while doing it.
    Thanks,
    Bharath.

  • RE: Validating XML message...

    Actually I stand corrected. XML Spy does seem to provide an OLE API to XML
    validation ( the isValid method on the IDocument class ) although I haven't
    tested it yet.
    In my previous post I was thinking of another XML product I tested earlier
    in the week which did not.
    -----Original Message-----
    From: Shaughnessy, Kevin
    Sent: Friday, April 20, 2001 08:59
    To: 'Rumen Georgiev'
    Cc: [email protected]
    Subject: RE: Validating XML message...
    Rumen,
    One idea that is possible is to use an OLE interface to a 3rd party XML
    product. This assumes your logic which needs to validate is running on a
    Windows box. But if so, it may work. Many products have type libraries which
    can be run through OLEGen to create Forte classes. Then you can use TOOL to
    talk OLE to that product.
    For example, XML Spy 3.5 has a type library from which I created a Forte
    project. Unfortunately this product didn't offer any extra features than
    Forte's XMLParser ( i.e. the API didn't allow me to validate the XML ) so I
    am back to using Forte's parser until I can test another product. If you
    find one that does what you want let me know.
    I've used OLE a lot with Forte to get functionality from other products (
    VISIO, MS Office ) that Forte doesn't provide and it works well. Its a
    platform dependent solution but one that may work for you.
    Kevin
    -----Original Message-----
    From: Rumen Georgiev [mailto:[email protected]]
    Sent: Friday, April 20, 2001 07:21
    To: [email protected]
    Cc: [email protected]
    Subject: RE: Validating XML message...
    Hi Kevin,
    From the answers I've got it seems Forte parser is anon-validating one. So we have to look for an external
    tool to validate these messages. What I am concerned
    about is the integration with Forte.
    Thanks for your help!
    Rumen
    Rumen,
    From Tech Note 11811:
    "ParserFactory.makeParser() will return a default,
    non-validating XML parser."
    My experience is that Forte's default XML parser will
    not validate but will throw an exception if the XML
    document is not well formed. I'm using the DOM
    model and this exception happens on the
    Document.importDocument( ) method.
    If you want anything more than that you'll have to do
    it externally.
    Kevin-----Original Message-----
    From: Rumen Georgiev [mailto:[email protected]]
    Sent: Thursday, April 19, 2001 11:49 AM
    To: [email protected]
    Subject: Validating XML message...
    We have to validate inbound XML messages before
    processing them. The guys on the other side are
    following XMLSchema recommendations to create their
    messages using xsd file for validation. We plan to
    use XMLParser Forte library and as far as I know it
    validates against dtd file (haven't tried yet). If
    this is true we have two options:
    1. Find a program to convert xsd into dtd file and
    use Forte XMLParser for validation.
    2. Validate the message beforehand with an external
    tool. That means integration between Forte and this
    tool.
    I would appreciate any help with either approach. Do
    you know of a program doing xsd into dtd? Have you
    used any existing tool on the market to validate
    using XMLSchema? Or may be there is another solution
    to
    this?
    Thank you in advance,
    Rumen
    =====
    Rumen Georgiev
    Forte Developer
    EXE Technologies
    (610) 872-4400 Ext.222
    Do You Yahoo!?
    Yahoo! Auctions - buy the things you want at great prices
    http://auctions.yahoo.com/

    Hi,
    there is some change in the XMLSPy4.3/XMLType Library 1.2 :
    Validation
    One common task on documents is to validate them against an assigned schema or DTD. If the XML file has no schema or DTD already assigned, use "Document.AssignSchema" or "Document.AssignDTD" to add the necessary references to the document.
    Examples:
    objSpy.ActiveDocument.AssignSchema "C:\mySchema.xsd", False
    or
    objSpy.ActiveDocument.AssignDTD "C:\myDTD.dtd", False
    If you want the user to select a schema or DTD, pass True as the second parameter to these functions to display a file-dialog. These methods only put the reference into the document and do not check the existence of the specified file. If the file path is not valid, the validation will fail.
    After you have assigned a valid schema or DTD reference to your file, you are able to validate it with "Document.IsValid". IsValid needs some out-parameters that must be declared as VARIANTs to be accessible from script languages like VBScript and JavaScript.

  • TCP XML messages parsing time with realtime output.

    I am currently coding a project and I have hit a bit of a roadblock. The basic overview is I need to be able to receive around 3,000 lines of XML per second from a JavaScript sending TCP messages. I have to extract the data to two seperate files, output the data to a text pane and also further seperate that data into a table as well. All this data needs to be updated as soon as it is received. I am currently comfortable with receiving around 700 lines per second without data loss but anything over that I start losing data somewhere. As for the basic over view of my code, I have my main program which creates the GUI and starts a listening thread that listens for "clients"(JavaScripts) to connect.
    Main:
    public static void main(String[] args)
         SplashScreen screen = new SplashScreen();
         screen.showSplashWindow();
         SwingUtilities.invokeLater(new Runnable()
             public void run()
              MainMenu mainmenu = new MainMenu();
              mainmenu.setVisible(true);
              mainmenu.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }Listener Thread:
    final Runnable listener_runner = new Runnable()
              public void run()
                  try
                   startClientListener();
                  catch (Exception e)
             final Thread listener_thread = new Thread(listener_runner,
                  "ListenerThread");
             listener_thread.start();Called from listening thread to setup client:
    public void startClientListener() throws IOException
         ServerSocket serverSocket = null;
         try
             serverSocket = new ServerSocket(XXXX);
         catch (IOException e)
             System.err.println("Could not listen on port: " + portNumber);
         while (true)
             MultiServerThread new_thread = new MultiServerThread(serverSocket
                  .accept(), outputWindow, resultsWindow, prefAttr, runningCount);
             new_thread.start();
        }In my MultiServerThreads runnable I have a BufferedReader to read the input. This reader loops through the input and adds it to a StringBuilder which then passes that data to the output files and the XML parser as seen here:
    in = new BufferedReader(new InputStreamReader(socket
                  .getInputStream()));
             while ((input_line = in.readLine()) != null)
              build.append(input_line + "\n");
              file_out.append(build);  //Text file
              xml_copy_out.append(build);  //XML file
              loadData(build);  //XML parser
              build = new StringBuilder();
             }My XML parser is configured as follows:
    public void loadData(final StringBuilder bufs)
         bufs.insert(0, "<VTR>");
         bufs.append("</VTR>");
         try
             StructuredDocumentHandler par = new StructuredDocumentHandler(
                  runningCount);
             SAXParserFactory spf = SAXParserFactory.newInstance();
             spf.setValidating(false);
             javax.xml.parsers.SAXParser sp = spf.newSAXParser();
             final String s = bufs.toString();
             final ByteArrayInputStream file_buf = new ByteArrayInputStream(s
                  .getBytes());
             final DataInputStream in_data = new DataInputStream(file_buf);
             org.xml.sax.InputSource input = new InputSource(in_data);
             sp.parse(input, par);
         catch (Exception ex)
             ex.printStackTrace();
        }As the parser goes through each XML message it sends the String to an output window that is straight text in a TextArea. It also stores the data in some arrays which then get built into a row that is added to a JTable. Does anyone have any ideas on how I can get up to 3000 lines per second? I'm not sure if my threading scheme is wrong or what. Is Java not powerful enough to handle 3000 TCP messages per second or can the XML parser not handle that much processing that fast? Any help would be much appreciated because I've kind of run out of ideas. Thanks!

    Thanks for the replies. I've trimmed my code down a little bit which has helped. I'm still around 2000 messages a second. Here's where I'm at for an update. Thanks again for all your help. I'm much happier at 2k vs 700 messages per second.
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.ByteArrayInputStream;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileWriter;
    import java.io.InputStreamReader;
    import java.net.Socket;
    import java.util.ArrayList;
    import java.util.Calendar;
    import javax.swing.JOptionPane;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.helpers.DefaultHandler;
    public class MultiServerThread extends Thread
        private final StructuredDocumentHandler par = new StructuredDocumentHandler();
        private final SAXParserFactory spf = SAXParserFactory.newInstance();
        private SAXParser sp;
        public MultiServerThread(final Socket socket,
             final OutputWindow output_window,
             final ResultsWindow results_window,
             final PreferencesDialog.Info attr, final int count)
         try
             spf.setValidating(false);
             sp = spf.newSAXParser();
         catch (Exception ex)
        @Override
        public void run()
         try
             xml_copy_out.append("<VTR>\n");
             in = new BufferedReader(new InputStreamReader(socket
                  .getInputStream()));
             while ((input_line = in.readLine()) != null)
              file_out.append(input_line + StaticVariable.NEW_LINE);
              xml_copy_out.append(input_line + StaticVariable.NEW_LINE);
              loadData(input_line);
             xml_copy_out.append("</VTR>");
             xml_copy_out.close();
             file_out.close();
             in.close();
             attributes.parent.setCheckFailed(runningCount, procPassed);
             socket.close();
         catch (FileNotFoundException ex)
         catch (Exception e)
             e.printStackTrace();
       public void killOuts()
        public void loadData(final String xml_str)
         try
             ByteArrayInputStream file_buf = new ByteArrayInputStream(xml_str.getBytes());
             InputSource input = new InputSource(file_buf);
             sp.parse(input, par);
         catch (Exception ex)
             ex.printStackTrace();
        public void addRowData(boolean procedurePassed)
        public void clearArrays()
        public class StructuredDocumentHandler extends DefaultHandler
         boolean procedurePassed = true;
         boolean isTestCase = false;
         boolean isTestCaseInput = false;
         boolean isTestCaseOutput = false;
         boolean isTestStep = false;
         boolean isComment = false;
         boolean isRequirement = false;
         boolean isEnsure = false;
         boolean isVerify = false;
         boolean isResult = false;
         boolean eval = false;
         public StructuredDocumentHandler()
         public void startElement(String uri, String lname, String qname,
              Attributes attributes)
             if (!qname.equals(StaticVariable.XML_COMMAND))
              eval = true;
              if (qname.equals(StaticVariable.XML_TESTCASE))
                  isTestCase = true;
              else if (qname.equals(StaticVariable.XML_TESTCASEINPUT))
                  isTestCaseInput = true;
              else if (qname.equals(StaticVariable.XML_TESTCASEOUTPUT))
                  isTestCaseOutput = true;
              else if (qname.equals(StaticVariable.XML_TESTSTEP))
                  isTestStep = true;
              else if (qname.equals(StaticVariable.XML_COMMENT))
                  isComment = true;
              else if (qname.equals(StaticVariable.XML_REQUIREMENT))
                  isRequirement = true;
              else if (qname.equals(StaticVariable.XML_MEASUREMENT))
                  String xml_val = attributes
                       .getValue(StaticVariable.XML_VALUE);
                  outputWindow.addData(xml_val + StaticVariable.NEW_LINE);
                  measurementArray.add(xml_val);
              else if (qname.equals(StaticVariable.XML_EXPECTED))
                  String xml_val = attributes
                       .getValue(StaticVariable.XML_VALUE);
                  outputWindow.addData(xml_val + StaticVariable.NEW_LINE);
                  expectedArray.add(xml_val);
              else if (qname.equals(StaticVariable.XML_RESULT))
                  isResult = true;
              else if (qname.equals(StaticVariable.XML_VERIFY))
                  isVerify = true;
                  verifyArray.add(new String(attributes
                       .getValue(StaticVariable.XML_RESULT)));
              else if (qname.equals(StaticVariable.XML_ENSURE))
                  isEnsure = true;
         public void characters(char[] chars, int start, int length)
             if (eval)
              if (isTestCase)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  testCaseArray.add(new String(chars, start, length));
              else if (isTestCaseInput)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  testCaseInputArray.add(new String(chars, start, length));
              else if (isTestCaseOutput)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  testCaseOutputArray.add(new String(chars, start, length));
              else if (isTestStep)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  testStepArray.add(new String(chars, start, length));
              else if (isComment)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  commentArray.add(new String(chars, start, length));
              else if (isRequirement)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  requirementArray.add(new String(chars, start, length));
              else if (isResult)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  resultArray.add(new String(chars, start, length));
              else if (isVerify)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  verifyDescriptionArray
                       .add(new String(chars, start, length));
              else if (isEnsure)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  ensureArray.add(new String(chars, start, length));
         public void endElement(String uri, String lname, String qname)
             if (!qname.equals(StaticVariable.XML_COMMAND))
              if (qname.equals(StaticVariable.XML_VERIFY))
                  addRowData(procedurePassed);
                  clearArrays();
              else if (qname.equals(StaticVariable.XML_END))
                  clearArrays();
              isTestCase = false;
              isTestCaseInput = false;
              isTestCaseOutput = false;
              isTestStep = false;
              isComment = false;
              isRequirement = false;
              isResult = false;
              isVerify = false;
              isEnsure = false;
              eval = false;
    }Any other suggestions on trimming down that I'm not seeing would be much appreciated. Thanks again for all your help.

  • Xml message from XI to Siebel issue

    Hi all,
    I have an issue and I would need some help.
    My scenario is R/3->BAPI->XI->Siebel and the communication channel between XI and Siebel it obviously http based.
    The thing is that for some reason, Siebel it's not receiving the xml message XI sends complete, it is just receiving the 'header' of the xml message, this is:
    <?xml version="1.0" encoding="UTF-8"?>
    and not the rest of the content.
    I have already check that the xml XI is sending is full and completly functional, and I have no clue where it's losing the info.
    Any hint?

    Hi,
    Are you using HTTP protocol get to receive the xml ? it may be possible that there are some length problem after submitting to siebel thru XI. just get confirmed about it. That is why it is getting truncated.
    1 problem may be possible, can tou check the sender and receiver communication channel at RWB about the message payload they are sending. if everything is fine there then check the length of message received by siebel. Problem will be here sumwhere.
    Regards
    Aashish Sinha
    PS ; reward points if helpful

  • Implement HSBC connect through XML MESSAGE

    Hi all,
    We are planning to implement HSBC connect through “HSBC ISO 20022 XML MESSAGE” to send payment file from SAP to HSBC connect for Asia and Middle East region. Can someone please guide me to develop payment file generation program in HSBC ISO 20022 XML MESSAGE format. If any example code is of great help. Sharing your experiences is a great help to me in this regard ..
    Thanks in advance.

    Hi Eman,
    Please go through the design we made for a bank interface.
    - We had generated IDOC XML file, configured partner profiles for the same.
    - These IDOC files were sent to the XI systems where where ISO XML files were generated.
    - These ISO XML's were in sync with the banks ISO XML.
    - They are received from the Banks side and the data is further processed by the banks SAP system.
    I Hope this information will be helpful.
    PS : The bank configurations can be country specific.
    Regards,
    Himanshu.

  • Getting message after Send

    Hi,
    Is it possible using C3PO to intercept a message when it arrives in the
    SentItems folder?
    If not, is there a way to change some hidden property of the message
    before sending it and create an external program that keeps polling the
    SentItems for a message with that hidden property, process it and clears
    the property?
    Thanks,
    John

    John -
    1. No - there is no sentitem trigger - a great weakness of the API -
    the new SOAP stuff may change this, though 2. I don't recall if
    changing custom fields is doable in the Token API with new messages
    (messageid of "X00") - that's the place to look.
    [email protected] (JohnKz) wrote in
    news:2dMee.2648$[email protected]:
    > Hi,
    >
    > Is it possible using C3PO to intercept a message when it arrives in
    > the SentItems folder?
    > If not, is there a way to change some hidden property of the message
    > before sending it and create an external program that keeps polling
    > the SentItems for a message with that hidden property, process it and
    > clears the property?
    >
    > Thanks,
    > John
    >
    >
    Regards,
    Michael Risch
    Developer SysOp 3

Maybe you are looking for

  • Is text search possible in a portfolio on iPad?

    Search works fine on an individual page in a portfolio and will run across pages in a multisheet .pdf. I frequently use this tool on portfolios in the Windows version of Reader and cannot find it on my iPad when I open a portfolio.

  • OSX web browsers - image issues on one Mac, not on others

    I know this will seem very vague and could have any of a number of causes, but I am just totally stumped on this. On my MBP (details below), some images and pages in web browsers simply will not load. No "broken image" icon, just nothing there - a bl

  • Posting IDOCs with partner type SP ?

    We have to post IDOCs to SAP where the partner type is SP . How do we configure XI to achieve this ? We are disabling the control record and so not looking at the option of hardcoding the EDI_DC record. I understand we need to specify Alternate ident

  • Different behaviour ABAP vs JAVA Runtime for mixed value in total row

    Hello to all (BW 7.01 Support package 08) I hope you may have anr good idea on my issue as I couldn't find anything in OSS messages or other source to solve the issue. Description: I have a query ,where we calculate sales variance ( current versus pr

  • AS2 - FLVPlayback progressive download video doesn't play until fully downloaded, and sometimes it d

    I'm loading video content paths from an external XML file into the FLVPlayback component. The issue I'm having is that the progressive download action is so inconsistent, sometimes it plays the video right away as the video is playing, and sometimes