Slow to get responses

I have created a form which gets uploaded to acrobat.com when the user submits.  I submitted a test form.  I then wait for the submitted form to show up in my responses file on my computer.  I have MyForm_responses.pdf open, and I hit the update button every few minutes.  Each time, it says no new responses found.  I have gone for as long as 20 minutes with no response.
My workaround is to shut down MyForm_responses.pdf and reopen it.  On about the second attempt, it recognizes and downloads the submitted form.  So I can get it down to about a minute wait with this workaround which involves quite a few clicks.
I'm the developer for a software company with many thousands of users who would love to use Acrobat if we build a forms import solution that works well with our software.  But I find it very hard to recommend such a clumsy and slow response sequence.
I thought it might be because I was on a trial version of Acrobat, so I bought a license.  Didn't help.  Is it because I'm on the free version of acrobat.com?  Or is there some other possible explanation?

I spent all day on it, but I finally answered my own question.  I had been frustrated with the fact that my users would have to download the pdf, so I had created a link on my website that brought up the pdf immediately.  Unfortunately, the browser plugin is underpowered for submitting forms, and was causing me to not receive my forms in a timely manner.  So I added http header info to the downloaded file to force the save/open dialog to come up when the user clicks.  Naturally, they will click Open.  Problem solved.
For the techies, here's how to add the header info.  Create a file called, for example, pdfforcesave.php.  The contents of the file should be as follows:
<?php
header('Content-disposition: attachment; filename=PatientInfo2_distributed.pdf');
header('Content-type: application/octet-stream');
readfile('PatientInfo2_distributed.pdf');
?>
Now instead of linking directly to your pdf (PatientInfo2_distributed.pdf in my case), link to pdfforcesave.php instead.  If you have a lot of pdf's that you are providing for download, there's probably a slick way to have just one php file and pass in the name of the pdf you want to open.  But I don't have time to figure that out.
Adobe, can you please tell your programmers that they need to do something like this so that users don't have to save the pdf file and then try to open it?  This way is much more user friendly.

Similar Messages

  • Get response & slow performance

    Internal authenticate method when the RSA 2K RSA key is used returns 256 bytes. The applet does not support the extended length. Because of it, the internal authenticate method returns 255 in the first launch. After the get response is called and the rest (1 byte) is returned. Get response function lasts unexpectedly slow. More than 300 ms. This code handle get response:
    if (apdu.getCurrentState() != APDU.STATE_OUTGOING) {
                        apdu.setOutgoing();
                   apdu.setOutgoingLength(length);
                   apdu.sendBytesLong(tmpBuffer.data, remainingDataOffset, length);I am aware that in order to return the rest of the message, the array has to be iterated on the appropriate position (255). Is there any way how this can be optimized under the prerequisite that the extended length is not used?

    This is just the extract of my code. There is a part of code in which I am checking if the command is GET RESPONSE.
    Can you see in this code what makes the get response acts slow. In the second launch, only one bate is resturned. This
    byte is at the offset 255 of the tmpBuffer.data variable
    Extract from the process method:
    The instance variables:
    private static final byte INS_GET_RESPONSE = (byte) 0xC0;
    private byte[] remainingDataLength;
         private byte[] remainingDataOffset;
         The constructor:
    remainingDataLength = JCSystem.makeTransientByteArray((short) 2,
                        JCSystem.CLEAR_ON_DESELECT);
              remainingDataOffset = JCSystem.makeTransientByteArray((short) 2,
                        JCSystem.CLEAR_ON_DESELECT);
    byte[] buffer = apdu.getBuffer();
              byte ins = buffer[OFFSET_INS];
              if (ins == INS_GET_RESPONSE) {
                   if (Util.getShort(remainingDataLength, (short) 0) <= 0) {
                        ISOException.throwIt(SW_CONDITIONS_NOT_SATISFIED);
                   sendData(apdu, Util.getShort(remainingDataLength, (short) 0));
                   return;
              else {
                   Util.setShort(remainingDataOffset, (short) 0, (short) 0);
                   Util.setShort(remainingDataLength, (short) 0, (short) 0);
              }The called sendData method:
    private void sendData(APDU apdu, short length) {
              short remainingDataOffsetTmp = Util.getShort(remainingDataOffset, (short) 0);
              short remainingDataLengthTemp = Util.getShort(remainingDataLength, (short) 0);
              if (length > RESPONSE_LENGTH) {
                   if (apdu.getCurrentState() != APDU.STATE_OUTGOING) {
                        apdu.setOutgoing();
                   apdu.setOutgoingLength(RESPONSE_LENGTH);
                   apdu.sendBytesLong(tmpBuffer.data, remainingDataOffsetTmp, RESPONSE_LENGTH);
                   remainingDataOffsetTmp += RESPONSE_LENGTH;
                   remainingDataLengthTemp = (short) (length - RESPONSE_LENGTH);
                   Util.setShort(remainingDataOffset, (short) 0, remainingDataOffsetTmp);
                   Util.setShort(remainingDataLength, (short) 0, remainingDataLengthTemp);
                   ISOException
                             .throwIt((short) (ISO7816Ext.SW_MORE_DATA + ((remainingDataLengthTemp > RESPONSE_LENGTH) ? RESPONSE_LENGTH
                                       : remainingDataLengthTemp)));
              else if (length > 0 && length <= RESPONSE_LENGTH) {
                   if (apdu.getCurrentState() != APDU.STATE_OUTGOING) {
                        apdu.setOutgoing();
                   apdu.setOutgoingLength(length);
                   apdu.sendBytesLong(tmpBuffer.data, remainingDataOffsetTmp, length);
                   Util.setShort(remainingDataOffset, (short) 0, (short) 0);
                   Util.setShort(remainingDataLength, (short) 0, (short) 0);
         }

  • Multiple (but separate) domain problem & Apple's slow and useless response

    I am having problem with multiple (but separate) domain. I opened a ticket.
    Here is Apple's slow and useless response and my follow up.
    This follow up is not going to resolve the issues I am having. The sites are not in one domain file. I have split them into separate domains. I found that the simplest change to any page made the publishing process extremely and reasonably slow. If I updated a single site, iWeb republishes the whole conglomeration; hardly the most efficient way.
    I have several directories under the ~/Library/Application Support/iWeb/ directory with separate Domain.sites2 files for each site:
    consultingAM.com
    DarkAssassinMovie.com
    Fuzzy Llama Junior Optimist Club
    GulfportOptimist.com
    OptimistView
    pAwesomeProductions.com
    www.nfdoi.com
    With the previous version of iWeb, I navigated to a specific ~/Library/Application Support/iWeb/ directory, selected the Domain.site file, and opened it. This would open iWeb with the selected domain. Several of the sites have their blog page with the RSS subscribe option.
    Once I made the update, all I usually had to do was publish site and all was well. Occasionally, I would have to do a publish all if I changed domains. All in all, I had no problems with publishing once I found the right steps to be able to maintain multiple domains.
    Now, using the default publish or publish all process, all I get is the last site I published. In order to get things semi-functional, I published a site, then I would go to iDisk/Web/Sites/ directory, select the folder name for the site I had just published, then copy it or move it to iDisk/Web/Sites/iWeb directory. This was rather slow and I suspect it is not an approved solution, but it semi-worked. My sites are back up, but they are not fully functional.
    Is there anyway to get back to using the ~/Library/Application Support/iWeb/ directory (separate Domain.sites file for each site) process to publish multiple sites? If not, is there any way to suck in the various domains back into one? If that is possible, will it take hours to publish the combined 2-3GB like it did with the previous version?
    How do I reverse the 'personal domain' process? I do not want to do this at this time. I just wanted to see what the steps were. I have done the first step, but not the second.
    I was glad to see some of the changes made in the upgrade (web widgets, maps, html snippets, theme switching), but I am too happy about the changes made by the upgrade process. In the past, I upgraded my Apple related stuff as soon as it came out. Based on this upgrade, that won't happen again.
    It took you guys 5 days to get back to me (during which time several of my sites were down) and I do not believe the information you provided is going to solve my specific problems. I am very disappointed with the results of this upgrade. Clearly there was inadequate testing of this product before it was released. I cannot recall seeing the Apple discussion forums with hundreds of topics and thousands of posts within a week or two of a new release. Apple had to upgrade iWeb in the first week, another poor sign.
    Apple is beginning to slip back to the pack; all vendors all below average. Apple is getting more like Microsoft everyday. First Apple delays the release of an OS upgrade so they can concentrate on a freaking phone, now you release software that is so buggy it should be classified as beta at best.
    Some of the changes/problem I am seeing since the upgrade (in addition to the problems mentioned previously) are:
    layout changes; some of my pages no longer look the same; same of the changes are so bad the pages are unreadable
    broken photo pages; some of my photo pages no longer work; some of them have no text or pictures
    file/page name changes; why would Apple change the location of the files; now my domains are not pointing right location; special characters (like spaces, ampersands, etc.) are handled differently in this version; specifically, I see that spaces are changed to underscores (_); iWeb used to use '%20' for spaces; what was Apple thinking?
    broken 3rd party themes; I know Apple is not responsible for 3rd party themes, but you should certainly be aware that they exist
    Based on what I am seeing online, most of the people who are complaining about major iWeb issues are not newbies; based on the technical details in the threads, there are clearly some experienced people who are trying to figure things outw. I have lost many hours trying to figure this mess out. I now have to review hundreds of pages to try get things to look and work the way they did before the upgrade. I have had to handle dozens of phone calls and emails from my viewers and subscribers trying to explain the situation.
    I googled 'iweb 08 *****' and got nearly 50,000 hits! I think Apple better get in front of this train before it gets run over.
    On Aug 19, 2007, at 11:09 AM, .Mac Support wrote:
    Dear David,
    I understand that you are experiencing an issue viewing some of your websites published in iWeb:
    I have examined all of the published pages and they appear to load and function as expected. If you published your website to .Mac, you can visit it either of these ways:
    - In iWeb, click the Visit button in the lower-left corner.
    - Enter the following URL into a web browser:
    http://web.mac.com/daviddawley/
    If you have published more than one website, the URL above will take you to the default website, which is the first website listed in iWeb. To visit another website you have created in iWeb, use the following URL format:
    http://web.mac.com/daviddawley/iWeb/YourSiteName
    Using this form, the web addresses for the two sites you mentioned would be:
    http://web.mac.com/daviddawley/iWeb/FuzzyLlamaJuniorOptimist.com
    http://web.mac.com/daviddawley/iWeb/pAwesomeProductions.com
    To change the default website, simply open iWeb, and in the Site Organizer, drag the desired default website to the top and republish to .Mac.
    NOTE: Be sure to give each website a unique name. This will help prevent one website from overwriting another. For further information, refer to the following article:
    iWeb: Do not use similar names for your sites
    http://www.info.apple.com/kbnum/n303042
    If you still experience issues with the website, try the following troubleshooting steps:
    WAIT SEVERAL MINUTES
    If your website has movies, you may need to wait several minutes after going to the website before the movies are ready to play. The QuickTime Player icon indicates that a movie is still loading.
    CLEAR YOUR BROWSER CACHE
    If you use Safari, you can clear your browser cache by choosing Empty Cache from the Safari menu. If you use another browser, consult that browser’s documentation if you need assistance in clearing your browser cache.
    UPDATE YOUR BROWSER
    Make sure you are using the latest available version of your web browser when viewing pages published in iWeb. If you use Safari, you can check for updates by choosing Software Update from the Apple menu. If there are any available Safari, Security, or Mac OS X updates, install those updates and try looking at your website again.
    If you use another browser, consult that browser’s documentation if you need assistance in updating the browser.
    TRY ANOTHER BROWSER
    If you use a Mac, try viewing your website with Safari or Firefox. If you use Windows, try Internet Explorer 6 or Firefox. Firefox is a free download available here: http://getfirefox.com
    TRY ANOTHER NETWORK
    If possible, try viewing your website from another network or Internet connection. If you can successfully view the website from another network, please consult your network administrator or Internet service provider (ISP) to resolve this issue.
    Important: Mention of third-party websites and products is for informational purposes only and constitutes neither an endorsement nor a recommendation. Apple assumes no responsibility with regard to the selection, performance, or use of information or products found at third-party websites. Apple provides this only as a convenience to our users. Apple has not tested the information found on these sites and makes no representations regarding its accuracy or reliability. There are risks inherent in the use of any information or products found on the Internet, and Apple assumes no responsibility in this regard. Please understand that a third-party site is independent from Apple and that Apple has no control over the content on that website.
    Sincerely,
    Mel
    .Mac Support
    http://www.apple.com/support/dotmac
    http://www.mac.com/learningcenter
    Support Subject : iWeb
    Sub Issue : I can't publish to .Mac from iWeb
    Comments : I was interested in forwarding one of several iWeb based sites to one of my domains. I wanted to see what the steps were. I believe I inadvertently started the process for moving the site to www.nfdoi.com site. I have several sub directories under the ~/Library/Application Support/iWeb directory with separate domain.sites files (now domain.sites2).
    I was going through all of my domain.sites files and opening them in iWeb08; then publishing them. Somewhere along the line everything blew up. Most of my iWeb sites no longer function, It appears that every other iweb site other www.nfdoi.com is down EXCEPT the last one I published. I have made a mess of things and would appreciate any help.
    Don't work:
    http://web.mac.com/daviddawley/FuzzyLlamaJuniorOptimist.com
    http://web.mac.com/daviddawley/pAwesomeProductions.com
    Works:
    http://web.mac.com/daviddawley/Optimist_View/OptimistView.com/OptimistView.com.h tml
    ========= PLEASE USE THE SPACE ABOVE TO DESCRIBE THE ISSUE BASED ON THE QUESTIONS BELOW =========
    1. What version of iWeb are you using to publish to .Mac? iLife 08
    2. When did you first notice this issue? After publishing a few sites.
    3. What happens, including any error messages, when you try to publish your site?
    --------------------- Additional Info -------------------------
    Alternate email address : [email protected]
    OS Version : Mac OS X 10.4.10
    Browser Type : Safari 2.x
    Category : I can't publish to .Mac from iWeb
    Connection Type :Other
    TrackID: 4154168

    Just got off the phone with Apple Support.  There procedure was the following:
    1.  Go to the Apple TV, select settings, general and scroll down to reset.
    2.  Select reset and then select reset all
    Apple TV will go through a restart after the reset and you will have to select your network then log in with your network or Airport Express password.  You will then have to turn on home sharing and It will then ask you for your Apple ID for the iTunes store and then the password.  At this point you may not see your library, because the Apple TV wants you to turn on home sharing on your home computer that is hosting the movie library.  Turn off home sharing on that computer, restart iTunes and turn on home sharing again.  After this is done you should be able to see you library listed under the computer.
    After going through these steps, when I select an HD movie from my iTunes library the movie comes up after about a 5 second delay.
    Hope this helps!  I am back up for business.

  • WordPress Admin on A1 and D1-Series Windows 2012 R2 VM is Slow with Erratic Response - Can Improve?

    Is there a way to make standard, small VMs more responsive and less erratic within WordPress admin?
    This week I provisioned an A1 Ubuntu (LAMP) VM and an A1 Windows 2012 R2 (WIMP) to run WordPress sites with WooCommerce shopping carts (five to start with), and was disappointed with the slow TCP/IP response and processing, which made working in /wp-admin/
    almost unbearably slow. The installs were primarily by-the-book default, having followed Azure documentation.
    I decided I needed more power behind the VM so I provisioned a "Standard" WEST US - D1 Series, 1 core, 3.5 GB RAM 50 GB SSD VM with 2012 R2 and a WAMP stack installed via Web Platform Installer. This was a "stock" install with WP talking
    to an localhost MySQL engine. The D1 experience was very similar to the A1 experience with a CPU in the teens-to-less than 50%. Memory usage never exceeded 50%, yet /wp-admin/ was very slow. Frequently database-heavy jobs, like WP-Optimize would time out.
    *Note* Both A1 and D1 VM served up cached (front-end) web pages in around two seconds. Barely acceptable, but acceptable.
    Throughout the week I noticed that the instance would slow to a crawl or become unresponsive. No HTTP response, and I could not RDP or FTP into the instance. PHP logs showed time-out errors as did MySQL logs. This happened two or three times a day. On Wednesday,
    my instance rebooted automatically with a kernel stop error in the event logs. TCP/IP response was erratic and slowdown were sporadic.
    *Note* Azure Status showed all green checks for the WEST US region whenever I had sporadic slowdowns or issues.
    Late yesterday I provisioned a Rackspace Dallas Fort Worth Windows 2012 R2 2-thread core, 2 GB RAM, 50 GB raid-10 SSD VM with the same installation (Web PI WIMP - "stock"). The difference in response times is striking. Rackspace is around a second
    faster for most network GETs. 
    I've invested a lot of time in Azure (have thirty small non-VM web-sites) and like the flexibility, but not the slow and erratic VM response. I've researched a lot of blog posts here and on Stackoverflow but haven't been able to speed things up. Is there something
    special that can be done to improve processing WordPress on Azure VMs?

    Hi,
    Based on my experience, in general, you can get better performance with a larger size of an Azure VM.
    Why don't to create a WordPress website from the gallery in Azure and select the region closest to you as the hosting location?
    Create a WordPress website from the gallery in Azure
    Besides,
    an unexpected restart of an Azure VM may be
    due to
    Windows Azure deploys updates to the host OS to provides a reliable, efficient and secure platform for hosting your applications. If the VM is not in an availability set, the notification would be sent to the Account administrators.
    It is recommended to add two or more virtual machines in an Availability Set. This configuration ensures that during either a planned or unplanned maintenance event, at least
    one virtual machine will be available and meet the 99.95% Azure SLA.
    Why
    did my Azure VM restart?
    Manage the availability of virtual machines
    Best regards,
    Susie
    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]

  • Issue: Not getting response when the document is having special chars

    Please help following issue: Not getting response when the document is having special chars(Use any doc with special char(ex: &, $, <, >,.....) TestErrorFour.doc
    Error message:
    System.FormatException: Invalid length for a Base-64 char array. at
    System.Convert.FromBase64String(String s) at
    Summarize.Summarizer.AccumulateBroadcast(String filedata, String givenWords) in
    c:\DocumentSummarizer\App_Code\Summarizer.cs:line 66
    Code:
    File 1:
    import java.io.BufferedReader;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.net.HttpURLConnection;
    import java.net.URL;
    import java.net.URLConnection;
    import java.util.Properties;
    import org.apache.poi.poifs.filesystem.POIFSFileSystem;
    import org.apache.poi.hwpf.*;
    import org.apache.poi.hwpf.extractor.*;
    import com.lowagie.text.Document;
    import com.lowagie.text.pdf.PRTokeniser;
    import com.lowagie.text.pdf.PdfReader;
    public class DocumentSummarizerClient {
         static Properties loadProperties() {
              Properties prop = new Properties();
              try {
                   prop.load(DocumentSummarizerClient.class.getClassLoader().getResourceAsStream("vep.properties"));
              } catch (Exception ioe) {
                   ioe.printStackTrace();
              return prop;
         public String getSummary(String fileName,String noOfWordsOrPercentage ){
              String summaryInputData ="";
              String summarizedData="";
              String summarizerURL = loadProperties().getProperty("Summarizer.serviceURL");
              try {
                   String fileExtension=fileName.substring(fileName.lastIndexOf(".")+1, fileName.length());
                   if (fileExtension.equalsIgnoreCase("doc")|| fileExtension.equalsIgnoreCase("txt")|| fileExtension.equalsIgnoreCase("pdf")) {
                                  if (fileExtension.equalsIgnoreCase("txt")) {
                                       BufferedReader bufferedReader = new BufferedReader(
                                                 new FileReader(fileName));
                                       String line = null;
                                       while ((line = bufferedReader.readLine()) != null) {
                                            summaryInputData += line;
                                  if(fileExtension.equalsIgnoreCase("doc")){
                                       POIFSFileSystem fs = null;
                                        fs = new POIFSFileSystem(new FileInputStream(fileName));
                                         HWPFDocument doc = new HWPFDocument(fs);
                                         WordExtractor we = new WordExtractor(doc);
                                         String[] paragraphs = we.getParagraphText();
                                         for( int i=0; i<paragraphs .length; i++ ) {
                                            paragraphs[i] = paragraphs.replaceAll("\\cM?\r?\n","");
                                  summaryInputData+= paragraphs[i];
                                  if(fileExtension.equalsIgnoreCase("pdf")){
                                       Document document = new Document();
                   document.open();
                   PdfReader reader = new PdfReader(fileName);
                   int pageCount =reader.getNumberOfPages();
                        for(int i=1;i<=pageCount;i++){
                                  byte[] bytes = reader.getPageContent(i);
                                  PRTokeniser tokenizer = new PRTokeniser(bytes);
                                  StringBuffer buffer = new StringBuffer();
                                  while (tokenizer.nextToken()) {
                                  if (tokenizer.getTokenType() == PRTokeniser.TK_STRING) {
                                  buffer.append(tokenizer.getStringValue());
                                  summaryInputData += buffer.toString();
                   else{
                        System.out.println("This is Invalid document. Presntly we support only text,word and PDF documents ");
                   // String encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
                        String encoded=Base64Utils.base64Encode(summaryInputData.getBytes());
                   // encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
                        String parameters= "base64String="+encoded+"&noOfWordsOrPercentage="+noOfWordsOrPercentage;
                        summarizedData= postRequest(parameters,summarizerURL);
                        String slength= "<string xmlns=\"http://tempuri.org/\">";
                        if(summarizedData.contains("</string>")){
                        summarizedData= summarizedData.substring(summarizedData.indexOf(slength)+slength.length(),summarizedData.indexOf("</string>"));
                        summarizedData = replaceVal(summarizedData);
                        //System.out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?><![CDATA["+summarizedData+"]]>");
                        // System.out.println("Summarized data "+summarizedData);
                        if(summarizedData.contains("Please enter the percentage")){
                             summarizedData="Data given cannot be summarized further";
                   else{
                        System.out.println("Data given cannot be summarized further");
                        summarizedData="";
              } catch (FileNotFoundException e) {
                   return("The File is not found \n\n"+e.toString());
              } catch (IOException e) {
                   return("The File is already in use \n\n"+e.toString());
              } catch (Exception e) {
                   return(e.toString());
              return summarizedData;
         public static String postRequest(String parameters,String webServiceURL) throws Exception{
              Properties systemSettings = System.getProperties();
              systemSettings.put("http.proxyHost", loadProperties().getProperty("proxyHost"));
         systemSettings.put("http.proxyPort", loadProperties().getProperty("proxyPort"));
         System.setProperties(systemSettings);
              String responseXML = "";
              try {
                   URL url = new URL(webServiceURL);
                   URLConnection connection = url.openConnection();
                   HttpURLConnection httpConn = (HttpURLConnection) connection;
                   byte[] requestXML = parameters.getBytes();
                   httpConn.setRequestProperty("Content-Length", String
                             .valueOf(requestXML.length));
                   httpConn.setRequestProperty("Content-Type",
                             "application/x-www-form-urlencoded");
                   httpConn.setRequestMethod("POST");
                   httpConn.setDoOutput(true);
                   httpConn.setDoInput(true);
                   OutputStream out = httpConn.getOutputStream();
                   out.write(requestXML, 0, requestXML.length);
                   out.close();
                   InputStreamReader isr = new InputStreamReader(httpConn
                             .getInputStream());
                   BufferedReader br = new BufferedReader(isr);
                   String temp;
                   String tempResponse = "";
                   while ((temp = br.readLine()) != null)
                        tempResponse = tempResponse + temp;
                   responseXML = tempResponse;
                   br.close();
                   isr.close();
              } catch (java.net.MalformedURLException e) {
                   System.out
                             .println("Error in postRequest(): Secure Service Required");
              } catch (Exception e) {
                   System.out.println("Error in postRequest(): " + e.getMessage());
              return responseXML;
         public String replaceVal(String value) {
                   if (value == null) {
                        value = "";
                   value = value.replace("&lt;", "<");
                   value = value.replace("&gt;", ">");
                   value = value.replace("&amp;", "&");
                   return value;
              public static void main(String[] args) {  
                   DocumentSummarizerClient testdoc=new DocumentSummarizerClient();
                   System.out.println("hello");               
                   testdoc.getSummary("C:\\working_folder\\vep\\UnitTestCases\\VEP1.0\\DocumentSummarizerTestData\\TestErrorFour.doc","100%");     
    Note: Use any doc with special char(ex: &, $, <, >,.....) TestErrorFour.doc
    File 2:
    ---------public class Base64Utils {
    private static byte[] mBase64EncMap, mBase64DecMap;
    * Class initializer. Initializes the Base64 alphabet (specified in RFC-2045).
    static {
    byte[] base64Map = {
    (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F',
    (byte)'G', (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L',
    (byte)'M', (byte)'N', (byte)'O', (byte)'P', (byte)'Q', (byte)'R',
    (byte)'S', (byte)'T', (byte)'U', (byte)'V', (byte)'W', (byte)'X',
    (byte)'Y', (byte)'Z',
    (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f',
    (byte)'g', (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l',
    (byte)'m', (byte)'n', (byte)'o', (byte)'p', (byte)'q', (byte)'r',
    (byte)'s', (byte)'t', (byte)'u', (byte)'v', (byte)'w', (byte)'x',
    (byte)'y', (byte)'z',
    (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5',
    (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'+', (byte)'/'};
    mBase64EncMap = base64Map;
    mBase64DecMap = new byte[128];
    for (int i=0; i<mBase64EncMap.length; i++)
    mBase64DecMap[mBase64EncMap[i]] = (byte) i;
    * This class isn't meant to be instantiated.
    private Base64Utils() {
    * Encodes the given byte[] using the Base64-encoding,
    * as specified in RFC-2045 (Section 6.8).
    * @param aData the data to be encoded
    * @return the Base64-encoded <var>aData</var>
    * @exception IllegalArgumentException if NULL or empty array is passed
    public static String base64Encode(byte[] aData) {
    if ((aData == null) || (aData.length == 0))
    throw new IllegalArgumentException("Can not encode NULL or empty byte array.");
    byte encodedBuf[] = new byte[((aData.length+2)/3)*4];
    // 3-byte to 4-byte conversion
    int srcIndex, destIndex;
    for (srcIndex=0, destIndex=0; srcIndex < aData.length-2; srcIndex += 3) {
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] >>> 2) & 077];
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] >>> 4) & 017 |
    (aData[srcIndex] << 4) & 077];
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+2] >>> 6) & 003 |
    (aData[srcIndex+1] << 2) & 077];
    encodedBuf[destIndex++] = mBase64EncMap[aData[srcIndex+2] & 077];
    // Convert the last 1 or 2 bytes
    if (srcIndex < aData.length) {
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] >>> 2) & 077];
    if (srcIndex < aData.length-1) {
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] >>> 4) & 017 |
    (aData[srcIndex] << 4) & 077];
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] << 2) & 077];
    else {
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] << 4) & 077];
    // Add padding to the end of encoded data
    while (destIndex < encodedBuf.length) {
    encodedBuf[destIndex] = (byte) '=';
    destIndex++;
    String result = new String(encodedBuf);
    return result;
    * Decodes the given Base64-encoded data,
    * as specified in RFC-2045 (Section 6.8).
    * @param aData the Base64-encoded aData.
    * @return the decoded <var>aData</var>.
    * @exception IllegalArgumentException if NULL or empty data is passed
    public static byte[] base64Decode(String aData) {
    if ((aData == null) || (aData.length() == 0))
    throw new IllegalArgumentException("Can not decode NULL or empty string.");
    byte[] data = aData.getBytes();
    // Skip padding from the end of encoded data
    int tail = data.length;
    while (data[tail-1] == '=')
    tail--;
    byte decodedBuf[] = new byte[tail - data.length/4];
    // ASCII-printable to 0-63 conversion
    for (int i = 0; i < data.length; i++)
    data[i] = mBase64DecMap[data[i]];
    // 4-byte to 3-byte conversion
    int srcIndex, destIndex;
    for (srcIndex = 0, destIndex=0; destIndex < decodedBuf.length-2;
    srcIndex += 4, destIndex += 3) {
    decodedBuf[destIndex] = (byte) ( ((data[srcIndex] << 2) & 255) |
    ((data[srcIndex+1] >>> 4) & 003) );
    decodedBuf[destIndex+1] = (byte) ( ((data[srcIndex+1] << 4) & 255) |
    ((data[srcIndex+2] >>> 2) & 017) );
    decodedBuf[destIndex+2] = (byte) ( ((data[srcIndex+2] << 6) & 255) |
    (data[srcIndex+3] & 077) );
    // Handle last 1 or 2 bytes
    if (destIndex < decodedBuf.length)
    decodedBuf[destIndex] = (byte) ( ((data[srcIndex] << 2) & 255) |
    ((data[srcIndex+1] >>> 4) & 003) );
    if (++destIndex < decodedBuf.length)
    decodedBuf[destIndex] = (byte) ( ((data[srcIndex+1] << 4) & 255) |
    ((data[srcIndex+2] >>> 2) & 017) );
    return decodedBuf;
    issue 2: Exception when passing 2MB .txt file
    Steps to reproduce:
    Call getSummary() with 2MB .txt file
    Actual:
    The following exception has occured:
    1. Error in postRequest(): Unexpected end of file from server
    java.lang.NullPointerException
    Please provide your precious feedback/suggestions.
    Thanks in advance…..
    Edited by: EJP on 15/03/2011 16:52: added code tags. Please use them. Code is unreadable otherwise.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Thanks for your response….
    This is enhancement project and some one develops long back.
    Regarding point (b) You should be using the java.net.URLEncoder to encode URL parameters, not a base64 encoder.
    DocumentSummarizerClient.java I am using base64
    Ex:
    // String encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
                        String encoded=Base64Utils.base64Encode(summaryInputData.getBytes());
                   // encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
                        String parameters= "base64String="+encoded+"&noOfWordsOrPercentage="+noOfWordsOrPercentage;
                        summarizedData= postRequest(parameters,summarizerURL);
                        String slength= "<string xmlns=\"http://tempuri.org/\">";
                        if(summarizedData.contains("</string>")){
                        summarizedData= summarizedData.substring(summarizedData.indexOf(slength)+slength.length(),summarizedData.indexOf("</string>"));
                        summarizedData = replaceVal(summarizedData);
                        //System.out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?><![CDATA["+summarizedData+"]]>");
                        System.out.println("Summarized data "+summarizedData);
                        if(summarizedData.contains("Please enter the percentage")){
                             summarizedData="Data given cannot be summarized further";
    Above specific please I need to modify to resolve above issue.
    Could you please suggest me what changes I need to do.
    Waiting for positive response.

  • How to get response from an asynchronous BPEL process in Java

    I'm experimenting with BPEL and doesn't seem to be able to get response from an asynchronous BPEL process. Here's the deal:
    I have a BPEL process that takes a string as input, and gives another string as output. This is a asyncronous process.
    I want to initiate this BPEL process as a web service so I generate a Webservice Proxy in JDeveloper 10g (10.1.3.0.4). The function to call the process is now called "initiate" and takes three arguments: the input string, a "org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType replyTo" and a
    "org.xmlsoap.schemas.ws._2003._03.addressing.AttributedURI messageID".
    HTTP-Analyzer shows that invoking the BPEL process with initiate("somestring", null, null) results in sending a SOAP message to the BPEL process, which returns a "202 Accepted". How do I get the response from the process? My intuition tells me that I have to use that second argument, that EnpointReferenceType thing. How do I use that?
    Another question: If a asynchronous BPEL process does not exists (so the endpoint does not exist) the Java proxy does not throw an error when runned. It does not even sends a message. It exits with status 0! (This happens for example when deploying a new version of a process and when the "old" version is undeployed). Calling a non-existing synchronous BPEL process, the Java proxy DOES throw an error.

    Clemens,
    That all sounds logical. But somehow it is still a mystery for me ... Somehow I don't see what should be done.
    To call the async BPEL process I have the following procedure:
    initiate(String input, org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType replyTo, org.xmlsoap.schemas.ws._2003._03.addressing.AttributedURI messageID)
    The first argument is the input for my BPEL process. The second is the address to a webservice that should handle the callback, right? The third is a messageID (makes sense, but why of the type AttributedURI?).
    Here lies my problem. It is not clear to me how these EndpointReferenceType & AttributedURI work. I can't find anything on the net about it. The AXIS examples as where mentioned earlier use other types (namely the "org.xmlsoap.schemas.ws.addressing.MessageID" and "org.xmlsoap.schemas.ws.addressing.ReplyTo") which are completely different.
    What I did so far:
    - I created an webservice proxy that listens on the onResult endpoint of the BPEL process.
    - I created an webservice proxy that calls the BPEL process through the initiate procedure, but it is not completely clear to me how to construct the EndPointreferenceType replyTo, and the MessageID. I did something like this:
    EndpointReferenceType replyTo = new EndpointReferenceType();
    // callback service running on local machine
    // This URI class is the java.net's version
    URI replyToURI = new URI("http://vaccinatie:8988/syncro-callback-context-root/stringconcatCallbackBindingPort");
    // This AttributedURI is the org.xmlsoap.schemas.ws._2003._03.addressing's version
    AttributedURI address = new AttributedURI();
    // the only public methos that made sense to me:
    address.set_value(replyToURI);
    replyTo.setAddress(address);
    // call the BPEL process
    myPort.initiate("test123", replyTo, address);
    But the above doesn't work (largely because I don't know what I'm doing here prob.:-) ) It does send the "test123" message, and the BPEL process does process it, but I don't seem to get the callback right.
    I hope this makes my problems somewhat clearer. I hope someone can help me, because I'm just a beginner in this whole "web service area" and seems to do something terribly wrong here, because it should be very simple. Thx.

  • My 24" IMac is slow and getting slower and over heats

    24" IMac 2.8Ghz, 4G of Ram 320G Intel HD O/S Mavericks 10.9.5
    Computer is slow and getting slower.
    Seems to overheat and freeze when processing video
    Sepearte issue blue tooth not working Computer says now hardware

    EtreCheck version: 1.9.15 (52)
    Report generated 7 October 2014 3:14:24 pm AEDT
    Hardware Information: ?
      iMac Intel Core 2 Duo (aluminum enclosure) (Early 2008)
      iMac - model: iMac8,1
      1 2.8 GHz Intel Core 2 Duo CPU: 2 cores
      4 GB RAM
    Video Information: ?
      ATI Radeon HD 2600 Pro - VRAM: 256 MB
      iMac 1920 x 1200
    System Software: ?
      OS X 10.9.5 (13F34) - Uptime: 0 days 1:3:9
    Disk Information: ?
      WDC WD3200AAJS-40VWA1 disk0 : (320.07 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted>: 209.7 MB
      Macintosh HD (disk0s2) / [Startup]: 319.21 GB (179.11 GB free)
      Recovery HD (disk0s3) <not mounted>: 650 MB
    USB Information: ?
      Apple, Inc. Keyboard Hub
      Mitsumi Electric Apple Optical USB Mouse
      Apple, Inc Apple Keyboard
      Apple Inc. Built-in iSight
      Apple Computer, Inc. IR Receiver
    Gatekeeper: ?
      Mac App Store and identified developers
    Kernel Extensions: ?
      [not loaded] com.elgato.driver.DontMatchAfaTech (1.1) Support
      [not loaded] com.elgato.driver.DontMatchCinergy450 (1.1) Support
      [not loaded] com.elgato.driver.DontMatchCinergyXS (1.1) Support
      [not loaded] com.elgato.driver.DontMatchEmpia (1.1) Support
      [not loaded] com.elgato.driver.DontMatchVoyager (1.1) Support
      [not loaded] com.microsoft.driver.MicrosoftMouse (7.0.0) Support
      [not loaded] com.microsoft.driver.MicrosoftMouseBluetooth (7.0.0) Support
      [not loaded] com.microsoft.driver.MicrosoftMouseUSB (7.0.0) Support
      [not loaded] com.wdc.driver.1394HP (1.0.9) Support
      [not loaded] com.wdc.driver.USBHP (1.0.11) Support
    Startup Items: ?
      EyeConnect: Path: /Library/StartupItems/EyeConnect
    Launch Daemons: ?
      [loaded] com.adobe.fpsaud.plist Support
      [running] com.wdc.SmartwareDriveService.plist Support
      [running] com.wdc.WDSmartWareService.plist Support
    User Launch Agents: ?
      [loaded] com.adobe.ARM.[...].plist Support
      [loaded] com.divx.agent.postinstall.plist Support
      [loaded] com.google.keystone.agent.plist Support
    User Login Items: ?
      iTunesHelper
      AdobeResourceSynchronizer
      Skype
      EyeTV Helper
      MicrosoftMouseHelper
      Dropbox
      WDQuickView
    Internet Plug-ins: ?
      Google Earth Web Plug-in: Version: 5.1 Support
      Default Browser: Version: 537 - SDK 10.9
      Flip4Mac WMV Plugin: Version: 3.2.0.16   - SDK 10.8 Support
      OfficeLiveBrowserPlugin: Version: 12.3.3 Support
      OVSHelper: Version: 1.1 Support
      AdobePDFViewerNPAPI: Version: 10.1.12 Support
      FlashPlayer-10.6: Version: 15.0.0.152 - SDK 10.6 Support
      DivXBrowserPlugin: Version: 2.1 Support
      Flash Player: Version: 15.0.0.152 - SDK 10.6 Support
      iPhotoPhotocast: Version: 7.0 - SDK 10.8
      QuickTime Plugin: Version: 7.7.3
      AdobePDFViewer: Version: 10.1.12 Support
      EPPEX Plugin: Version: 10.0 Support
    Safari Extensions: ?
      DivXHTML5
    Audio Plug-ins: ?
      BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
      AirPlay: Version: 2.0 - SDK 10.9
      AppleAVBAudio: Version: 203.2 - SDK 10.9
      iSightAudio: Version: 7.7.3 - SDK 10.9
    iTunes Plug-ins: ?
      Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
    3rd Party Preference Panes: ?
      DivX  Support
      Flash Player  Support
      Flip4Mac WMV  Support
      Microsoft Mouse  Support
    Time Machine: ?
      Skip System Files: NO
      Auto backup: YES
      Time Machine not configured!
    Top Processes by CPU: ?
          2% WindowServer
          0% fontd
          0% MicrosoftMouseHelper
          0% Dropbox
          0% aosnotifyd
    Top Processes by Memory: ?
      221 MB Safari
      147 MB com.apple.IconServicesAgent
      139 MB com.apple.WebKit.WebContent
      135 MB com.apple.WebKit.Plugin.64
      131 MB Solitaire
    Virtual Memory Information: ?
      604 MB Free RAM
      1.93 GB Active RAM
      1010 MB Inactive RAM
      504 MB Wired RAM
      451 MB Page-ins
      0 B Page-outs

  • How  to get  response from such a  function

    How  to get  response from such a  function (in MODULE USER_COMMAND_0010 INPUT I get "ODGOVOR" 'X'
    FUNCTION Z_SEENKRAT.
    ""Local Interface:
    *"  EXPORTING
    *"     REFERENCE(ODGOVOR) TYPE  MSEG-KZEAR
    DATA ok_code LIKE sy-ucomm.
    DATA: test like mseg-kzear.
    BREAK-POINT.
    call screen 10.
    test = ODGOVOR.
    ENDFUNCTION.
    *&      Module  CLEAR_OK_CODE  OUTPUT
          text
    MODULE clear_ok_code OUTPUT.
      CLEAR ok_code.
    ENDMODULE.                 " CLEAR_OK_CODE  OUTPUT
    *&      Module  USER_COMMAND_0010  INPUT
          text
    MODULE USER_COMMAND_0010 INPUT.
    DATA odgovor LIKE mseg-KZEAR.
    CASE ok_code.
        WHEN 'DA'.
        ODGOVOR = 'X'.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0010  INPUT

    Hi,
    You need to declare the ODGOVOR variable in the TOP include, then you will get the value
    Regards
    Sudheer

  • Why im getting too long time in getting response from server in RMI???

    I'm using RMI architecture. On my server side I put this method getRubricHierarchy() which returns the ArrayList of Test class objects. everything is working properly fine.
    Im getting response properly, problem is its taking very long time in getting the response. method populate and create ArrayList in 0 second at server side but its taking more than 20 seconds to get response at client side.
    My arraylist size is 30,000.
    Any suggestions to reduce the time.
    below you can see the code.
    public List<Test> getRubricHierarchy(String strTree,String gblCombinedRepSectionID,String gblCompleteRepSectionID,String gblCompleteRepertoryID,Map authMap) {
            Connection con=null;
              ResultSet rs = null;
              List<Test> l = new ArrayList<Test>();
              List allList = new ArrayList();
              con = createDBCon();
              rs = con.createStatement().executeQuery("select * from rubric where sectionid='"+gblCombinedRepSectionID+"' order by orders");
              Map parentMap = new HashMap();
              while (rs.next()) {
                   Test rNode = new Test();
                String rubrid = rs.getString("id");
                   final String desc = rs.getString("name");
                   rNode.setRubricName(desc);
                   rNode.setRubricID(rubrid);
                   rNode.setAuthor(rs.getString("repid"));
                   final int levlId = rs.getInt("levelid");
                   rNode.setRubLevel(levlId);
                   rNode.setCrossRef(rs.getString("CROSSREFERENCE"));
                   final String parentID = rs.getString("PARENTID");
                   rNode.setParentID(parentID);
                   rNode.setSectionID(rs.getString("sectionid"));
                   if (parentID.equals("0")) {
                        l.add(rNode);
                   allList.add(rNode);
                   List rmdyLst = (List) parentMap.get(parentID);
                   if (rmdyLst == null) {
                        rmdyLst = new ArrayList();
                        parentMap.put(parentID, rmdyLst);
                   rmdyLst.add(rNode);
              rs.close();
              for (Iterator iterator = allList.iterator(); iterator.hasNext();) {
                   Test rNodes = (Test) iterator.next();
                   List remdyLst = (List) parentMap.get(rNodes.getRubricID());
                   if (remdyLst != null) {
                        rNodes.setChildren(remdyLst);
                        for (Iterator iterator2 = remdyLst.iterator(); iterator2.hasNext();) {
                             Test rn = (Test) iterator2.next();
                             rn.setParent(rNodes);
            }catch(Exception e){
                e.printStackTrace();
              return l;
         }here is my Test Class
    public class Test implements  Serializable,Cloneable , MutableTreeNode{
            private String strRubricID,strOldRubricID,strRubricName,strCrossRef,Author,strParentID,strSectionID;
            private int rubLevel;
            private List remedyList;
            private List children = new ArrayList();
            private Test parent;
            private int order;
            private String AuthorName="";
            private String abbr;
            private String treeType="";
            private int noRem=-1;
            private boolean isAddAsChild=false;
            private String strRubricHie="";
            private String user="";
            public static final Enumeration<TreeNode> EMPTY_ENUMERATION = new Enumeration() {
                public boolean hasMoreElements() {
                    return false;
                public TreeNode nextElement() {
                    throw new NoSuchElementException("No more elements");
            public Test(){
            public void setUser(String user){
                this.user = user;
            public String getUser(){
                return user;
            public void setRubricHierarchy(String s){
                this.strRubricHie=s;
            public String getRubricHierarchy(){
                return strRubricHie;
            public Test(String treeType){
                this.treeType = treeType;
            public void setAddAsChild(boolean b){
                this.isAddAsChild=b;
            public boolean isAddAsChild(){
                return isAddAsChild;
            public Test getUserObject(){
                return this;
            public  void setRubricID(String id){
                this.strRubricID = id;
            public  String getRubricID(){
                return strRubricID ;
            public  void setOldRubricID(String id){
                this.strOldRubricID = id;
            public  String getOldRubricID(){
                return strOldRubricID ;
            public  void setParent(Test r){
                this.parent = r;
            public  Test getParent(){
                return parent;
            public  void setParentID(String id){
                this.strParentID = id;
            public  String getParentID(){
                return strParentID;
            public  void setSectionID(String id){
                this.strSectionID= id;
            public  String getSectionID(){
                return strSectionID;
            public  void setRubricName(String name){
                this.strRubricName = name;
            public  String getRubricName(){
                return strRubricName;
            public  void setAuthorName(String name){
                this.AuthorName = name;
            public  String getAuthorName(){
                return AuthorName;
            public  void setAuthorAbbrivation(String a){
                this.abbr = a;
            public  String getAuthorAbbrivation(){
                return abbr;
            public void setRubLevel(int rubLevel) {
                this.rubLevel = rubLevel;
            public int getRubLevel() {
                return rubLevel;
            public void setCrossRef(String strCrossRef) {
                this.strCrossRef = strCrossRef;
            public String getCrossRef() {
                return strCrossRef ;
            public void setRemedyList(List remedyList) {
                this.remedyList = remedyList;
            public List getRemedyList() {
                return remedyList;
            public void setAuthor(String Author) {
                this.Author = Author;
            public String getAuthor() {
                return Author;
            public void setChildren(List list) {
                this.children = list;
            public List getChildren() {
                return children;
            public void setOrder(int o){
                this.order = o;
            public int getOrder(){
                return order;
            public void setNumberOfRemedies(int no)
                this.noRem = no;
            public int getNumberOfRemedies()
                return noRem;
            public String toString() {
                String value="";
                value=strRubricName+ " ("+abbr+")";
                return value;
            public Object clone(){
                Test rubric = new Test();
                rubric.Author = Author;
                rubric.children = children;
                rubric.order = order;
                rubric.parent = parent;
                rubric.remedyList = remedyList;
                rubric.rubLevel = rubLevel;
                rubric.strCrossRef = strCrossRef;
                rubric.strParentID = strParentID;
                rubric.strRubricID = strRubricID;
                rubric.strRubricName = strRubricName;
                rubric.strSectionID = strSectionID;
                return rubric;
         @Override
         public TreeNode getChildAt(int paramInt) {
              if (this.children == null) {
                   throw new ArrayIndexOutOfBoundsException("node has no children");
              final TreeNode node = (TreeNode) children.get(paramInt);
              return node;
         @Override
         public int getChildCount() {
              if (this.children == null) {
                   return 0;
              return children.size();
         @Override
         public int getIndex(TreeNode paramTreeNode) {
              // TODO Auto-generated method stub
              return 0;
         @Override
         public boolean getAllowsChildren() {
              return true;
         @Override
         public boolean isLeaf() {
              return children.isEmpty();
         @Override
         public Enumeration children() {
              if (this.children == null) {
                   return EMPTY_ENUMERATION;
              Vector v = new Vector(this.children);
              return v.elements();
         @Override
         public void insert(MutableTreeNode newChild, int paramInt) {
              if (newChild == null) {
                   throw new IllegalArgumentException("new child is null");
              MutableTreeNode oldParent = (MutableTreeNode) newChild.getParent();
              if (oldParent != null) {
                   oldParent.remove(newChild);
              newChild.setParent(this);
              if (children == null) {
                   children = new ArrayList();
              children.add(paramInt, newChild);
         @Override
         public void remove(int childIndex) {
              MutableTreeNode child = (MutableTreeNode) getChildAt(childIndex);
              children.remove(childIndex);
              child.setParent(null);
         @Override
         public void remove(MutableTreeNode aChild) {
              if (aChild == null) {
                   throw new IllegalArgumentException("argument is null");
              if (!isNodeChild(aChild)) {
                   throw new IllegalArgumentException("argument is not a child");
              remove(getIndex(aChild)); // linear search
         public boolean isNodeChild(TreeNode aNode) {
              boolean retval;
              if (aNode == null) {
                   retval = false;
              } else {
                   if (getChildCount() == 0) {
                        retval = false;
                   } else {
                        retval = (aNode.getParent() == this);
              return retval;
         @Override
         public void setUserObject(Object paramObject) {
              // TODO Auto-generated method stub
         @Override
         public void removeFromParent() {
              MutableTreeNode parent = (MutableTreeNode) getParent();
              if (parent != null) {
                   parent.remove(this);
         @Override
         public void setParent(MutableTreeNode paramMutableTreeNode) {
              parent = (Test) paramMutableTreeNode;
          * Returns the path from the root, to get to this node. The last element in
          * the path is this node.
          * @return an array of TreeNode objects giving the path, where the first
          *         element in the path is the root and the last element is this
          *         node.
         public TreeNode[] getPath() {
              return getPathToRoot(this, 0);
          * Builds the parents of node up to and including the root node, where the
          * original node is the last element in the returned array. The length of
          * the returned array gives the node's depth in the tree.
          * @param aNode
          *            the TreeNode to get the path for
          * @param depth
          *            an int giving the number of steps already taken towards the
          *            root (on recursive calls), used to size the returned array
          * @return an array of TreeNodes giving the path from the root to the
          *         specified node
         protected TreeNode[] getPathToRoot(TreeNode aNode, int depth) {
              TreeNode[] retNodes;
               * Check for null, in case someone passed in a null node, or they passed
               * in an element that isn't rooted at root.
              if (aNode == null) {
                   if (depth == 0)
                        return null;
                   else
                        retNodes = new TreeNode[depth];
              } else {
                   depth++;
                   retNodes = getPathToRoot(aNode.getParent(), depth);
                   retNodes[retNodes.length - depth] = aNode;
              return retNodes;
        }

    You have an O(N**2) algorithm at the end that is rather ill-considered. It seems to me at first glance that it could be combined int the previous loop.

  • Not getting Response from RFC

    Hi,
        I am doing RFC to File. I could generate the FILE successfully. But I am not getting Response from RFC. I am getting empty payload. I am doing with out BPM. I did succesfully File-RFC-File. but here RFC is the sender. I have some doubts  in defining Interface mapping and Message Mapping. Is this a Syscronous scenario by default ?
    If I want to get the resonse of RFC to a file. How many Receivers and Senders do i need to create?
    Regards,
    Varun
    Edited by: Varun on Sep 9, 2008 1:00 PM

    hi,
    Map Rfc.response to the File; hence rfc sender adapter and file receiver adapter..one sender n 1 receiver.Remember:
      1. In the report that makes the call to XI , make sure that you use call RFC in a background task.
      2. Make sure you use Commit Work at the end of the report.
    Follow:
    Send RFC to SAP XI – Asynchronous
    Also pls visit
    Re: RFC to FILE
    for the same scenario.
    Thanks,
    Durga
    Edited by: NagaDurga Nannapaneni on Sep 9, 2008 10:55 AM

  • 2 finger scroll doesnt work in Finder after Mavericks update. Macbook pro seems slow and less responsive after the update.

    2 finger scroll doesnt work in Finder after Mavericks update. Macbook pro seems slow and less responsive after the update.

    nateshns wrote:
    2 finger scroll doesnt work in Finder after Mavericks update.
    In any particular app, or all of them?

  • Get Response after HTTP Request

    Is it possible to display the response after a http request in forms? the response comes from a kind of reader which sends the reading-result as parameters after a request.

    Hello Henry,
    We are firing the CREATE/POST operation in the BATCH mode exactly with the same type of PAYLOAD what you have shared here and we are correctly getting response.
    1st operation was successful and we have got content with 201 Created Status Code.
    2nd operation failed and got 400 bad request with some error.
    3rd operation was successful and we have got the content with 201 Created Status Code.
    I am unable to replicate your problem in my case. Everything is working fine for me.
    Your problem is strange.
    Regards,
    Ashwin

  • 'Get Response' APDU command in a script for apdutool

    Dear all,
    I'm facing some problems with apdutool (javacard 2.2.2 distribution) in executing the 'Get Response' command.
    In fact its syntax differs from the one specified for other APDU commands accepted by apdutool, as Lc is replaced by the expected response lenght, i.e. by Le.
    I tried inserting a fake P3 (Lc), but I always get ParseException errors.
    All previous commands in the script are properly executed, including the one for which the subsequent 'Get Response' is tried. In particular, the SW2 byte returned by the latter command contains the right expected length.
    I'm working with T0 algorithm and non-extended mode is specified in the APDU script.
    Thank you very much to anyone who could help.
    Best regards
    Marco

    Hi,
    You could ensure that both of the text fields are not empty on your 'dashboard' before executing the FS00 tcode. This would negate the popup from ever appearing.
    To do this you can use the "IF <text field control ID> Is Empty" statement in your script and then output a custom error message to another text box if the condition is true. then use an "IF <text field control ID> Is NOT Empty" statement to copy the value/s execute the FS00 tcode if the condition is true.
    Now if you're going to check multiple fields for entries before executing the FS00 you'll have to get a little more creative and do something like I did in one my scripts (thanks again to Steve Rumsby for the tips) and create a 'check field' where you can enter values for items checked successfully and then use a little bit of javascript to count up the checks and check the result before executing the next part of the script.
    Another idea is to check for the existence of the popup and navigate past it in your script, to do this you can use the "IF <control ID> control exists" statement.
    Either one should work.

  • Getting response from a server

    im working on a simple smtp mail sender and i want to get responses to the commands that i post to the DataOutputStream. in all examples on java.sun.com and the net, there is a while block used for reading response from the server.
    while((c=is.read()) != -1)
    sb.append((char)c);
    this code did not work on my application, i changed a bit like below:
    /**Get a response from server */
    private String getResponse() throws IOException {
    int CR = 0, LF = 0;
    int c;
    char ch;
    int count = 0;
    StringBuffer sb = new StringBuffer();
    while (true) {
    c = is.read();
    count++;
    ch = (char) c;
    if (c == -1) {
    break;
    else if (ch == '\r') {
    CR = count;
    else if (ch == '\n') {
    LF = count;
    if (LF - 1 == CR) { //CRLF seen
    sb.append(ch);
    break;
    sb.append(ch);
    return sb.toString();
    and i use this function in my code as
    os.write( ("QUIT\r\n").getBytes());
    System.out.println("QUIT : " + getResponse());
    this works, because it returns a single line that has a CRLF at the and of line, but if i want to read multi-line responses like greeting messages, i tried to change the code as on the examples like:
    /**Get a response from server */
    private String getResponse() throws IOException {
    int c;
    StringBuffer sb = new StringBuffer();
    while((c=is.read()) != -1)
    sb.append((char)c);
    return sb.toString();
    this code does not work, because i cannot reach the end of stream. i want to post one command and get one response for that command.
    how an algorithm i can develop to solve this problem?
    thanks for all help.

    i changed the code and it's working well now:
    /**Get a response from server */
    private String getResponse() throws IOException {
    int c;
    if((c=is.read()) != -1) {
    byte[] b = new byte[is.available()];
    StringBuffer sb = new StringBuffer();
    is.read(b);
    sb.append((char)c);
    for(int i=0; i<b.length; i++) {
    sb.append((char)b);
    return sb.toString();
    return "";
    if you directly use is.available() when there is no response currently available, it returns 0. we wait for the first character of server response, and then use is.available(). thanks to Kay_Kadner for the idea.
    (im a newbie, and dont know how to convert byte[] to String, tried b.toString() but only got meaningless values)

  • Could not get response for challenge?

    I could succefully use podcast capture to post video to groupblog.
    But when I used command line "pcastaction groupblog", it always said that
    "ERROR: could not get response for challenge"
    But "pcast_post2groupblog" works well for me. I wonder why this happened?
    P.S:
    I've updated my server to the latest version.

    If you look at the workflow, there is probably something in there like this:
    <string>--otp=##Groups Administrator Username:Groups Administrator Password##</string>
    That's a one time pad. I ran into this when troubleshooting our iTunes U workflow from the command line. To get my iTunes U stuff to work from the command line I had to generate a OTP each time, like so:
    $sudo pcastconfig --add_access "token" --properties "iTunes U Shared Secret"
    Except yours will be different because it's for group blog.... if indeed this is your problem. I only guessed this looking at the stock blog workflow, it uses an OTP.
    Hope that was helpful and not way off the mark.

Maybe you are looking for

  • Problem printing from Win 7 PC to AE Base Station connected Network Printer

    Hi, i have an AE 802.11g version 5.7 software with an IP4800 canon printer attached via USB. i can print perfecrtly to it from both my macs (G5 desktop and Intel laptop) running 10.5.8. recently i connected my girl's Vaio laptop running Windows 7 and

  • Having problem with Dr Watson error

    I am running a web form in forms6i. If I write any messages in post-query trigger at block level, I am getting a Dr Watson Application error and simply exits the form. If I remove the messages, form is running fine.Is there any fix for this error? Pl

  • Internet is very slow but says i have a good connection ?

    My internet is very slow but yet i have a good connection please help

  • Why "RequestContext had not been properly released on earlier request"?

    Hi all, When looking at the server logs, it shows this line: <Warning> <org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl> <BEA-000000> <RequestContext had not been properly released on earlier request.>. What could be the cause for t

  • MSS: Approve working times

    Dear experts, a user runs a MSS transaction "Approve working times" but he receives the message: "No data exists that needs to be approved". The user who runs this transaction is holder of chief position in the organizational plan and one position re