Simple HTTP request

Hello all,
Hope u all will be fine and fit. I want to make an http get request to my server and the response to that request would be an xml file. Do anyone knows how to do this in a simpler way. I just need a sample code to send and receive a http request and response.
Currently i m doing in this way
NSData *nsDataObject = [[NSData alloc] initWithContentsOfURL:URLObjectForMyServer]];
Also please tell me if this is the correct way of doing it?
Quick replies will be highly appreciated.
Regards,
Obaid

Hi Obaid,
I thnk you should fire request like that and u want xml file as response so that u have to write code in your server side that will covert data into xml format and return as a string....
NSString *post = [[NSString alloc] initWithFormat:your query string];
//NSLog(post);
NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];
NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
[request setURL:[NSURL URLWithString:@"url of ur server"]];
[request setHTTPMethod:@"POST"];
[request setValue:postLength forHTTPHeaderField:@"Content-Length"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody:postData];
NSURLConnection *conn=[[NSURLConnection alloc] initWithRequest:request delegate:self];
if (conn){
NSLog(@"Data Recieved");
receivedData = [[NSMutableData data] retain];
else{
any error is occured
hope that it will help to u

Similar Messages

  • Java service invocation with HTTP Request

    A simple HTTP Request containing the SOAP envelope is a valid way of calling a web service, right?
    It seems simpler and more efficient than the "traditional" ways (Axis, JAX-RPC, etc), so what are the disadvantages?
    Thanks in advance
    Pedro

    kept the jars under APP-INF/lib

  • How to pass a HTTP request from a simple java class

    Is it possible to pass an HTTP request from a simple java class.if yes how?

    Is it possible to pass an HTTP request from a simple
    java class.if yes how?If you're talking about creating a HttpRequest object and passing it to a servlet, that would be a red flag to me that your design is flawed. You shouldn't have to do that - the application server (Tomcat, Weblogic, etc) should be the only thing that has to worry about creating that kind of object and passing it to you.

  • Null values in Weblogic 7 HTTP Request Parameters

    It appears weblogic 7 handles nulls passed from the request object
              differently than the previous versions. In my jsp's, if a parameter
              was not passed, I used to get a java null value:
              String s = request.getParameter("something_not_passed");
              if(s == null) {
              //do stuff
              Now, weblogic seems to return the string literal "null" so I would
              have to use:
              if(s.equals("null")) {
              //do stuff
              Is this a bug or am I missing something?
              Thanks,
              Paul
              

    HI, Thanks for the reply. I am using getString() to fetch values.
    DO u think its due to driver incompatibility?? Because, BEA claims WL7.0 supports
    Oracle 8.1.7 onwards!
    Thanks,
    Yogesh
    Joseph Weinstein <[email protected]> wrote:
    >
    >
    Yogesh wrote:
    Hi, I have ported my web application from weblogic 5.1 to weblogic 7.Set up is weblogic
    7 with database Oracle 8.1.6 and i am using OCI driver for DB connectionpool. I
    am facing some problems like, the values that were retrieved as blanksin weblogic
    5.1 are being retrieved as null(string literal value) in 7. The same thinghappens
    when parameters were passed through HTTP request object. Any idea aboutthis?
    Thanks,
    YogeshHi. This sounds like a driver bug. Let's isolate it to a simple standalone
    program
    that uses our driver to select null data. How are you asking for the object?
    GetString(),
    GetObject()?
    Joe

  • The MAC signature found in the HTTP request '***' is not the same as any computed signature. Server used following string to sign: 'POST

    Hi,
    When trying with Postman sending a REST call to Azure Storage Queues I get:
    The MAC signature found in the HTTP request '***' is not the same as any computed signature. Server used following string to sign: 'POST.
    The code I have for creating the Authorization Header:
    var accountName = "my_account";
    string key = ConfigurationManager.AppSettings["my_access_key"];
    DateTime dt = DateTime.Now;
    string formattedDate = String.Format("{0:r}", dt);
    var canonicalizedHeaders = "x-ms-date:" + formattedDate + "\n" + "x-ms-version:2009-09-19" + "\n" ;
    var canonicalizedResource = "/my_account/myqueue/messages";
    var stringToSign = String.Format("POST,\n\n\n\n\n\n\n\n\n\n\n{0}{1}", canonicalizedHeaders, canonicalizedResource);
    stringToSign = HttpUtility.UrlEncode(stringToSign);
    HMACSHA256 hmac = new HMACSHA256(Encoding.UTF8.GetBytes(key));
    var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(stringToSign)));
    var authorizationHeader = String.Format(CultureInfo.InvariantCulture, "SharedKey {0}:{1}", accountName, signature);
    return authorizationHeader;
    Anyone any idea what I'm missing/doing wrong?
    Additional question: do i have to create for every message I want to send a new Authorization header? Or is there an option (as with Service Bus Topics) to create a header that can be used for a certain timeframe?
    Thanks.

    One issue is with this line of code:
    HMACSHA256 hmac = new HMACSHA256(Encoding.UTF8.GetBytes(key));
    Please use the following:
    HMACSHA256 hmac = new HMACSHA256(Convert.FromBase64String(key));
    and that should take care of the problem.
    Regarding your question, "do i have to create for every message I want to send a new Authorization header? Or is there an option (as with Service Bus Topics) to create a header that can be used for a certain timeframe?"
    With your current approach, the answer is yes. What you can do is create a Shared Access Signature on the queue which will be valid for certain duration and then use that for posting messages to a queue using simple HttpWebRequest/HttpWebResponse.
    Hope this helps.

  • Firefox aborts its http request silently within 60 seconds

    duplicate of [/questions/1047223]
    *Summary
    Firefox aborts its http request within almost 60 seconds(period till
    timeout varies) and tells nothing to users. This happened with both of
    Nginx and Apache.
    *Environment
    Client browser: Firefox 35.0.1
    Client OS: Windows 7 Enterprise 32bit SP1
    Web Server: Apache 2.2.3-91 & Nginx 1.6.2-1
    Server OS: CentOS 5.11
    PHP: 5.3.3
    FastCGI: spawn-fcgi-1.6.3-1
    *Description of the issue
    I have noticed that nginx logs http response code 499 so often.
    We use nginx almost only for two web applications, the one based on PHP
    and others on ruby. We experiences this problem in both apps. The server and client PC belong to the same subnet.
    Since last month, nginx logged 624 errors for Firefox and 16 for other
    browsers(almost IE).
    So for test, I wrote the simple PHP (see the bottom of this article) and tried to access it
    through both of Apache & Nginx with Firefox 35.0.1 and IE 11. IE11
    waited 120 seconds and returned html successfully through both of nginx
    and Apache, but Firefox failed either.
    Let me describe Firefox's behaviour.
    1. Enter the test php url at location bar and press enter.
    2. The message 'waiting server response' appears at status bar for a while.
    3. Watching network conversation through Wireshark, 'Keep Alive' signals
    are repeated some times between server and client, and after that,
    4. The message dissappears. 'FIN' signal is sent to the server from the client just after that. Firebug logs 'Aborted' at the almost the same time.
    5. The server responses 'FIN ACK.'
    There is a bit difference with nginx and Apache in behaviour after 'FIN
    ACK'.
    A.Nginx
    Nginx logs '499' error and finish conversation immediately.
    B.Apache doesn't log anthying at this step. After 120 seconds(sleep timer
    in PHP) from request it returns expected html. Of course Firefox don't render it but I could confirm both of request and response from Wireshark's 'Follow TCP Stream' function. Finally it is logged with http status code 200 at httpd log file.
    I repeated this test several times. Actual timeout period varies from 22
    to 70 seconds but results are same.
    With my understanding, the browser is expected to show 'time out error'
    after such situation but it doesn't show anything. So end user can't
    know what happend.
    *What I tried to solve the problem
    *disabled all extentions other than firebug.
    *set 'network.tcp.keepalive.enabled' to false at about:config.
    *set 'network.http.spdy.enabled' to false, too.
    *set 'network.http.response.timeout' to 0.
    *disabled IPV6 and DNS prefetch seeing the following help.
    https://support.mozilla.org/en-US/kb/websites-dont-load-troubleshoot-and-fix-errors
    *changed Timeout to 0 at apche's http.conf.
    My purpose is make our web apps to work properly in our working environment. I've recommended Firefox to our collegues because it was very cool application. Changing the default brawser is nightmare to me. Any suggestions are welcome.
    <test php>
    <?php sleep(120); ?>
    <?php echo time(); ?>

    duplicate of [/questions/1047223]
    *Summary
    Firefox aborts its http request within almost 60 seconds(period till
    timeout varies) and tells nothing to users. This happened with both of
    Nginx and Apache.
    *Environment
    Client browser: Firefox 35.0.1
    Client OS: Windows 7 Enterprise 32bit SP1
    Web Server: Apache 2.2.3-91 & Nginx 1.6.2-1
    Server OS: CentOS 5.11
    PHP: 5.3.3
    FastCGI: spawn-fcgi-1.6.3-1
    *Description of the issue
    I have noticed that nginx logs http response code 499 so often.
    We use nginx almost only for two web applications, the one based on PHP
    and others on ruby. We experiences this problem in both apps. The server and client PC belong to the same subnet.
    Since last month, nginx logged 624 errors for Firefox and 16 for other
    browsers(almost IE).
    So for test, I wrote the simple PHP (see the bottom of this article) and tried to access it
    through both of Apache & Nginx with Firefox 35.0.1 and IE 11. IE11
    waited 120 seconds and returned html successfully through both of nginx
    and Apache, but Firefox failed either.
    Let me describe Firefox's behaviour.
    1. Enter the test php url at location bar and press enter.
    2. The message 'waiting server response' appears at status bar for a while.
    3. Watching network conversation through Wireshark, 'Keep Alive' signals
    are repeated some times between server and client, and after that,
    4. The message dissappears. 'FIN' signal is sent to the server from the client just after that. Firebug logs 'Aborted' at the almost the same time.
    5. The server responses 'FIN ACK.'
    There is a bit difference with nginx and Apache in behaviour after 'FIN
    ACK'.
    A.Nginx
    Nginx logs '499' error and finish conversation immediately.
    B.Apache doesn't log anthying at this step. After 120 seconds(sleep timer
    in PHP) from request it returns expected html. Of course Firefox don't render it but I could confirm both of request and response from Wireshark's 'Follow TCP Stream' function. Finally it is logged with http status code 200 at httpd log file.
    I repeated this test several times. Actual timeout period varies from 22
    to 70 seconds but results are same.
    With my understanding, the browser is expected to show 'time out error'
    after such situation but it doesn't show anything. So end user can't
    know what happend.
    *What I tried to solve the problem
    *disabled all extentions other than firebug.
    *set 'network.tcp.keepalive.enabled' to false at about:config.
    *set 'network.http.spdy.enabled' to false, too.
    *set 'network.http.response.timeout' to 0.
    *disabled IPV6 and DNS prefetch seeing the following help.
    https://support.mozilla.org/en-US/kb/websites-dont-load-troubleshoot-and-fix-errors
    *changed Timeout to 0 at apche's http.conf.
    My purpose is make our web apps to work properly in our working environment. I've recommended Firefox to our collegues because it was very cool application. Changing the default brawser is nightmare to me. Any suggestions are welcome.
    <test php>
    <?php sleep(120); ?>
    <?php echo time(); ?>

  • File.upload on Air SDK for iOS devices failed to send http request to server.

    I am trying to use ActionScript's File.upload to upload a file on Air SDK for iOS8 environment, but the File.upload does not work properly. No handler about the file upload is executed after File.upload is invoked, and no exception is caught. When I check the network traffic of the server side, I found that no http request even hit the server after File.upload is executed. The code snippet here is very simple.
      private var file:File;
      private var dir:File;
      //This method is executed to create a file and upload it when the Upload Button is pressed.
      protected function OnUploadButtonPressed(event:MouseEvent):void{
      var str:String = 'This is test';
      var imageBytes:ByteArray = new ByteArray();
      for ( var i:int = 0; i < str.length; i++ ) {
      imageBytes.writeByte( str.charCodeAt(i) );
      try{
      dir = File.applicationStorageDirectory
      var now:Date = new Date();
      var filename:String = "test" + now.seconds + now.milliseconds + ".txt";
      file = dir.resolvePath( filename );
      var stream:FileStream = new FileStream();
      stream.open( file, FileMode.WRITE );
      stream.writeBytes( imageBytes );
      stream.close();
      file.addEventListener( Event.COMPLETE, uploadComplete );
      file.addEventListener( IOErrorEvent.IO_ERROR, ioError );
      file.addEventListener( SecurityErrorEvent.SECURITY_ERROR, securityError );
      file.addEventListener(ErrorEvent.ERROR, someError);
      file.addEventListener(ProgressEvent.PROGRESS, onProgress);
      file.upload( new URLRequest("http://10.60.99.31/MyPath/fileUploadTest.do"));//This line does not work. No handler is executed. No http request hit the server side.
      } catch( e:Error ) {
      trace( e );
      //Complete Handler
      private function uploadComplete( event:Event ):void
      trace( "Upload successful." );
      //IOError handler
      private function ioError( error:IOErrorEvent ):void
      trace( "Upload failed: " + error.text );
      //SecurityError handler
      private function securityError(error:SecurityErrorEvent):void{
      trace( "Security error:" + error.text );
      //Other handler
      private function someError(error:ErrorEvent):void{
      trace("some error" + error.text);
      //Progress handler
      private function onProgress(event:ProgressEvent):void{
      trace("progressHandler");
    When executed on Air Simulator, it works fine as expected, and the file is successfully uploaded to the server. But When executed on iOS devices(in my case, iPad), as I explain early, no handler about the file upload is executed, and no the http request even hit the server. So I think the problem may be in the client side. It seems that the Air SDK for iOS just failed to send the http request for some reason.
    To make my problem more clear, I list my environment below:
    Development Environment:  Windows7 (64bit)  / Mac os 10.9.4 (Tested on  OS platforms.)
    IDE: Flash Builder 4.7
    Air SDK:  3.8 / 16.0.0 (After I updated to the lastest Air SDK 16.0.0 , the problem still exists.)
    Application Server:  Tomcat7 + Spring
    Target OS: iOS 8
    I have been struggling for this for days. So I really appreciate it if anyone has any idea about this.
    Thanks in advance.

    Hi bluewindice ,
    As you have quoted ( ActionScript's File.upload does not work on Air SDK for iOS devices ) , this issue has been replicated at our end, and our team will be working on it.
    Thanks,
    Tushar

  • Scorm-based test causes too many Blackboard http requests

    We are looking into a problem with scorm-based tests and learning  modules created in Adobe Captivate. Viewing the scorm content in our Blackboard LMS generates ridiculous amounts of network traffic. A simple click in the scorm module triggers  anything between 10 and 100+ http-requests, even if no interaction with  the server is required. The same click sometimes results in 5 requests, other times in 50  requests or more.It's always a sequence of the same two requests, see below (only the max value in "Keep-Alive: timeout=10, max=98" counts down).
    If these scorm modules are taken by a group of students, the enormous amount of http requests put a lot of pressure on our Blackboard system, which results in a slow behaviour of the modules. Has anyone seen this behaviour and does anyone know of a way to prevent it?
    (below, part of the http headers collected with the Firefox Live HTTP Headers Add-on)
    https://...cc.kuleuven.be/courses/1/a-C112956-K/content/_7409447_1/SCORM_support/scorm_sup port.swf?invokeMethod=methodToExecute&lc_name=lc_name&param=tempVar|true
    GET /courses/1/a-C112956-K/content/_7409447_1/SCORM_support/scorm_support.swf?invokeMethod=me thodToExecute&lc_name=lc_name&param=tempVar|true HTTP/1.1    
    Host: ...cc.kuleuven.be    
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US;     rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12    
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8    
    Accept-Language: en-us,en;q=0.5     Accept-Encoding: gzip,deflate    
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7    
    Keep-Alive: 115    
    Connection: keep-alive    
    Referer: https://...cc.kuleuven.be/courses/1/a-C112956-K/content/_7409447_1/ABT%20Excel%20Toets4.ht m    
    Cookie: JSESSIONID=2FFDF51EB1DFD4B73B539C63607A9177.root;     __utma=137656618.1128290341.1286972380....
    If-Modified-Since: Mon, 06 Dec 2010 17:40:03 GMT
    If-None-Match: W/"149-1291657203000"
    HTTP/1.1 304 Not Modified
    Date: Fri, 10 Dec 2010 09:00:13 GMT    
    Server: Apache/1.3.41 (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8i mod_jk/1.2.27    
    X-Blackboard-appserver: ...cc.kuleuven.be    
    X-Blackboard-product: Blackboard Learn&#8482; 9.0.505.0    
    Set-Cookie: session_id=80EA2381B7970776B9C3202ADBDEC94E; Path=/    
    Set-Cookie: s_session_id=FB7D2433E54EFA941E49E6C79B536CDA; Path=/;     Secure    
    Etag: W/"149-1291657203000"    
    Content-Length: 0    
    Keep-Alive: timeout=10, max=100   
    Connection: Keep-Alive    
    Content-Type: text/plain; charset=iso-8859-1
    https://../courses/1/a-C112956-K/content/_7409447_1/SCORM_support/scorm_support.swf?invoke Method=methodToExecute&lc_name=lc_name&param=tempVar|true    
    GET /courses/1/a-C112956-K/content/_7409447_1/SCORM_support/scorm_support.swf?invokeMethod=me thodToExecute&lc_name=lc_name&param=tempVar|trueHTTP/1.1    
    Host: ...kuleuven.be    
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US;     rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12    
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8    
    Accept-Language: en-us,en;q=0.5    
    Accept-Encoding: gzip,deflate    
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7    
    Keep-Alive: 115    
    Connection: keep-alive    
    Referer:     https://../courses/1/a-C112956-K/content/_7409447_1/ABT%20Excel%20Toets4.htm    
    Cookie: JSESSIONID=2FFDF51EB1DFD4B73B539C63607A9177.root;     __utma=137656618.1128290341.1286972380...
    If-Modified-Since: Mon, 06 Dec 2010 17:40:03 GMT    
    If-None-Match: W/"149-1291657203000"   
    HTTP/1.1 304 Not Modified    
    Date: Fri, 10 Dec 2010 09:00:13 GMT    
    Server: Apache/1.3.41 (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8i mod_jk/1.2.27    
    X-Blackboard-appserver: ...cc.kuleuven.be    
    X-Blackboard-product: Blackboard Learn&#8482; 9.0.505.0    
    Set-Cookie: session_id=80EA2381B7970776B9C3202ADBDEC94E; Path=/    
    Set-Cookie: s_session_id=FB7D2433E54EFA941E49E6C79B536CDA; Path=/; Secure    
    Etag: W/"149-1291657203000"    
    Content-Length: 0    
    Keep-Alive: timeout=10, max=98    
    Connection: Keep-Alive    
    Content-Type: text/plain; charset=iso-8859-1

    Simply add the call to your exception hander. E.g.
    EXCEPTION
             WHEN OTHERS
             THEN
                   UTL_TCP.Close_All_Connections;
                   INSERT INTO excep_trans (P_WORD_EXP, UPDATE_TIME, COUNTER)
                     VALUES (VC1.RAW_VAL_TXT, SYSDATE, cnt);
    ..etc..
    END;Also consider using proper coding standards. There is NO modern day programming language standard that says to write (selective) reserved words in uppercase. Write in lowercase. Use camelcase and pascalcase for variable names and procedures/functions/methods. Restrict the use of uppercase to defining identifiers such as compiler macros or constants.
    Do yourself a favour and read, understand and apply the basic naming standards as detailed in .Net Guidelines for Names and Code Conventions for the Java Programming Language.

  • "http request error" - SQL call sometimes works, sometimes doesn't

    Hello everyone,
    A bit of a random question, maybe someone has an idea...
    I have a flex app that queries data from a mySQL service via http service. Overall, things work great! The queries are quick to return a result and without issues. But, when I view the website from my work PC, I get this error "HTTP Request Error", and none of the SQL calls work. Any ideas? I know my work has very tight security regulations, but I would still think it would be able to work.
    I can't get a better security message because I can't set up and run flex to debug the issue, all I get is "HTTP Request Error", so who knows what it could be. I have tested my website from about 15 computers/different networks, and they all work, except my work PC. Any ideas?
    And yes, the flash version is current.
    Thanks!

    it sounds like the work security is blocking it
    can you write a simple html page that fetches the data and displays it?It might give you a better idea what is happening behind flex

  • How to call JSP that outputs XML without HTTP request

    It should be a simple solution but I can't seem to find a concise recommendation anywhere. We are building a B2B subsytem for our app and we need to send XML to our vendor. I'm evaluating the possibility of using JSPs for that and everything looks good until the time you actually want to invoke it. It's obvious how to code the JSP itself, but I'm looking for an efficient way to call it to generate XML. We do not have an HTTP request or a servlet, the communication is on the EJB level. So I can't get a RequestDispatcher for example, and we don�t have HttpServletRequest/HttpServletResponse either. It is NOT a servlet or JSP calling another JSP, it's a regular Java class or EJB.
    Ideally, I would rather bypass the whole HTTP infrastructure and just use JSP as a formatter. So it boils to a question of how to invoke it and how to pass the parameters without HTTP session or request. One of the alternatives we are reviewing is using XSP but we would prefer JSPs if we can figure out how to call it efficiently. HttpUrlConnection is not a good option, we'd like a direct call.
    Any suggestions will be greatly appreciated.

    Thanks for the response. Let me clarify the requirements for the question. The way we are supposed to send XML to the vendor is via CORBA (don't ask me why:-) where the only parameter essentially is a string containing the XML document. So the quesiton is not how to send it to the vendor, but how to format our JavaBeans into XML.
    We can't use JAXB because it doesn't support schema. We tried a few libraries out there but they stumble on our schema and we can't change it because it comes from the vendor. So it sounds like our only choice for today is to generate XML ourselves.
    The data is stored in JavaBean packet objects and that's our input. Our output should be a string with XML document conforming to the schema. Posting a request to ourselves will of course work, but that's too much unnecessary overhead. Another option is implementing HttpServletRequest and HttpServletResponse and calling service method directly. Better suggestions?

  • Persistent HTTP Requests in BSP: Can you Flush the Response without Ending It?

    Hello all,
    I have been looking for a way to implement a persistent HTTP Request in a BSP.  This means the server keeps the request open as long as possible and sends data periodically to the browser without closing the request.  In other development environments, there would be a way to flush the response to the client, separate from closing the connection, thus making this possible.  I have looked and do not see any way to do this.
    Also, if it is not possible with a BSP, is there another way to do this via the Web Application Server?
    Thanks for any help,
    -Chris

    There are various limits: the number of sockets / file descriptors that the operating system lets a program have open, the amount of socket buffer space in the operating system, the number of simultaneous connections that the web server allows. Each of these can be configured.
    One problem is that a web server starts a thread for each hit. If you have 1000 simultaneous active hits you have 1000 threads. That is quite a lot. I've seen server OSes start buckling at around 400-500 threads. Given a suitable OS you may get higher with a bit of configuration, but I'd say the number of threads is rather a big concern. 100,000 threads? That dog don't hunt.
    An alternative would be not to use a regular web server, but to use a NIO select -based server. Then you can have one thread that handles all the connections. I once did that to write a stock ticker applet. But if you want to do fully standards compliant HTTP implementation that's not trivial.
    If you are writing the client applet as well as the server, consider using a simpler protocol than HTTP and writing a NIO server. NIO isn't quite trivial to get really right; look at examples and tutorials; google is your friend. If you can keep each client's connection open do so; establishing and tearing down hundreds or thousands of connections a second, and sending HTTP request and reply headers, is going to eat network and CPU resources.
    If you are really targeting 100,000 clients at 5 seconds between messages, that comes to 20,000 messages per second. That's a lot; plan for a load balanced server cluster.

  • Error log on http request from business connector (BC)

    Hi all,
    We are sending http requests from our business connector to one client but the messages keep having log errors :
    server.log details :
    003C24  [B2BCORE.0064.0014] Opening Socket https://www.qab2b.xxx.com:443/invoke/wm.b2b.cxml:receiveCXML  proxy=10.28.38.27:80
    003C25  [B2BCORE.0038.0002] --> CONNECT www.qab2b.xxx.com:443 HTTP/1.0
    003C26  [B2BCORE.0038.0002] --> User-Agent: Mozilla/4.0 [en] (WinNT; I)
    003C27  [B2BCORE.0038.0002] --> Accept: image/gif, /
    003C28  [B2BCORE.0038.0002] --> Host: www.qab2b.xxx.com:443
    003C29  [B2BCORE.0038.0002] --> Proxy-Authorization: Basic YWJ1c2luZXNzY29ubmVjdG9yOmFidXNpbjA0
    003C2A  [B2BCORE.0038.0002] --> Authorization: Basic U0ZSQ2VnZXRlbDoyMDA3KkVBSV9TRlI=
    003C2B  [B2BCORE.0038.0002] > Content-type: multipart/mixed; boundary="--=_Part_0_1941981.1219399983635"
    003C2C  [B2BCORE.0038.0002] --> Message-ID: <7159395.1219399983666.JavaMail.SYSTEM@sw0030>
    003C2D  [B2BCORE.0038.0002] --> Mime-Version: 1.0
    003C2E  [B2BCORE.0040.0001] HTTP/1.1 200
    003C2F  [B2BCORE.0064.0017] Proxy Header <--Connection established
    003C30  [B2BCORE.0038.0002] --> POST /invoke/wm.b2b.cxml:receiveCXML HTTP/1.0
    003C31  [B2BCORE.0038.0002] --> User-Agent: Mozilla/4.0 [en] (WinNT; I)
    003C32  [B2BCORE.0038.0002] --> Accept: image/gif, /
    003C33  [B2BCORE.0038.0002] --> Host: www.qab2b.xxx.com:443
    003C34  [B2BCORE.0038.0002] --> Proxy-Authorization: Basic YWJ1c2luZXNzY29ubmVjdG9yOmFidXNpbjA0
    003C35  [B2BCORE.0038.0002] --> Authorization: Basic U0ZSQ2VnZXRlbDoyMDA3KkVBSV9TRlI=
    003C36  [B2BCORE.0038.0002] > Content-type: multipart/mixed; boundary="--=_Part_0_1941981.1219399983635"
    003C37  [B2BCORE.0038.0002] --> Message-ID: <7159395.1219399983666.JavaMail.SYSTEM@sw0030>
    003C38  [B2BCORE.0038.0002] --> Mime-Version: 1.0
    003C39  [B2BCORE.0038.0002] --> Content-Length: 188225
    003C3A  [B2BCORE.0040.0001] HTTP/1.0 200
    003C3B  [B2BCORE.0041.0001] ssnid=86087kPxFCsECcmXU5DHUAInKY9mEIIU-9355222; path=/;
    003C3C  [B2BCORE.0038.0002] <-- Set-Cookie: ssnid=86087kPxFCsECcmXU5DHUAInKY9mEIIU-9355222; path=/;
    003C3D  [B2BCORE.0038.0002] <-- Content-Type: multipart/mixed; boundary="----=_Part_0_1941981.1219399983635"
    003C3E  [B2BCORE.0038.0002] <-- Connection: Close
    003C3F  [B2BCORE.0038.0002] <-- Content-Length: 0
    003C40  [B2BCORE.0049.0008] Sequence : index=8 depth=3
    003C41  [B2BCORE.0049.0008] Sequence : index=6 depth=2
    003C42  [B2BCORE.0049.0008] Sequence : index=1 depth=3
    003C43  [B2BCORE.0049.0005] Invoke : index=1 depth=4
    003C44  [B2BCORE.0049.0008] Sequence : index=2 depth=3
    003C45  [B2BCORE.0049.0005] Invoke : index=1 depth=4
    003C46  [B2BCORE.0049.0008] Sequence : index=3 depth=3
    003C47  [B2BCORE.0049.0005] Invoke : index=1 depth=4
    003C48  [B2BSERV.0048.9999] Array index out of range: -1
    003C49  [B2BCORE.0049.0008] Sequence : index=4 depth=3
    003C4A  [B2BCORE.0050.0004] Copy failed: (Simple) No source data available: to=/returnedStatusCode(0), from=/returnHttp(0)/cXML(0)/Response(0)/Status(0)/@code(0)
    003C4B  [B2BCORE.0050.0004] Copy failed: (Simple) No source data available: to=/returnedMessage(0), from=/returnHttp(0)/cXML(0)/Response(0)/Status(0)/*body(0)
    003C4C  [B2BCORE.0050.0004] Copy failed: (Simple) No source data available: to=/returnedText(0), from=/returnHttp(0)/cXML(0)/Response(0)/Status(0)/@text(0)
    003C4D  [B2BCORE.0049.0008] Sequence : index=5 depth=3
    003C4E  [B2BCORE.0049.0008] Sequence : index=6 depth=3
    003C4F  [B2BCORE.0049.0008] Sequence : index=7 depth=2
    003C50  [B2BCORE.0049.0008] Sequence : index=2 depth=1
    003C51  [B2BSERV.0056.0003] Unable to send mail. Illegal address
    error java log on server>logs>error:
    2008-08-22 12:16:33 CEST java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1
         at com.wm.util.List.elementAt(List.java:101)
         at com.wm.lang.xml.token.BlockInputBuffer.getChar(BlockInputBuffer.java:59)
         at com.wm.lang.xml.TextNode.appendSqueezedText(TextNode.java:178)
         at com.wm.lang.xml.ElementNode.appendSqueezedText(ElementNode.java:333)
         at com.wm.lang.xml.ElementNode.getTextOfChildren(ElementNode.java:309)
         at com.wm.lang.xml.Document.getTextOfChildren(Document.java:542)
         at com.wm.app.b2b.services.DocumentToRecordService.recursiveCollect(DocumentToRecordService.java:661)
         at com.wm.app.b2b.services.DocumentToRecordService.bind(DocumentToRecordService.java:356)
         at pub.web.documentToRecord(web.java:667)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:281)
         at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:693)
         at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:140)
         at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:292)
         at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:559)
         at com.wm.lang.flow.FlowState.step(FlowState.java:430)
         at com.wm.lang.flow.FlowState.invoke(FlowState.java:400)
         at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1786)
         at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:693)
         at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:455)
         at com.wm.app.b2b.server.Service.doInvoke(Service.java:495)
         at com.wm.app.b2b.server.Service.doInvoke(Service.java:392)
         at wm.PartnerMgr.gateway.transport.B2B.OutboundProcess(B2B.java:157)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:281)
         at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:693)
         at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:140)
         at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:292)
         at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:559)
         at com.wm.lang.flow.FlowState.step(FlowState.java:430)
         at com.wm.lang.flow.FlowState.invoke(FlowState.java:400)
         at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1786)
         at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:693)
         at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:455)
         at com.wm.app.b2b.server.Service.doInvoke(Service.java:495)
         at com.wm.app.b2b.server.Service.doInvoke(Service.java:464)
         at wm.PartnerMgr.gateway.runtime.InboundProcess(runtime.java:423)
         at pub.sap.transport.RFC.InboundProcess(RFC.java:190)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:281)
         at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:693)
         at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:455)
         at com.wm.app.b2b.server.Service.doInvoke(Service.java:495)
         at com.wm.app.b2b.server.Service.doInvoke(Service.java:464)
         at com.wm.pkg.sap.rfc.Listener.handleRequest(Listener.java:286)
         at com.sap.mw.jco.JCO$Server.dispatchRequest(JCO.java:6022)
         at com.sap.mw.idoc.jco.JCoIDoc$Server.dispatchRequest(JCoIDoc.java:10120)
         at com.wm.pkg.sap.rfc.Listener.dispatchRequest(Listener.java:186)
         at com.sap.mw.jco.rfc.MiddlewareRFC$Server.nativeListen(Native Method)
         at com.sap.mw.jco.rfc.MiddlewareRFC$Server.listen(MiddlewareRFC.java:1070)
         at com.sap.mw.jco.JCO$Server.listen(JCO.java:5797)
         at com.sap.mw.jco.JCO$Server.run(JCO.java:5731)
         at com.wm.pkg.sap.rfc.Listener.run(Listener.java:101)
         at java.lang.Thread.run(Thread.java:479)
    Thanks for your support on this eai.
    Regards,
    Laurent.

    ok, I think we do not need the save/loadPipeline things, because you can debug the flow without that. I first thought you act as HTTP server, but you issue the client call in the flow itself.
    Looking at the logs more carefully, it shows for example:
    Copy failed: (Simple) No source data available: to=/returnedStatusCode(0), from=/returnHttp(0)/cXML(0)/Response(0)/Status(0)/@code(0)
    But you say have that input:
    <?xml version="1.0"?>
    <!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.011/cXML.dtd">
    <cXML version="1.2.011" payloadID="20080825171850716.18637uTQ9ExzheaK+H6b7O9oCAQWPzHA-9355222.8b3632def70da7220004d0b6" timestamp="2008-08-25T17:18:50-CEST">
    <Response>
    <Status code="500">No cXML document received from sender.</Status>
    </Response>
    </cXML>
    So we see that your mappings assumptions do not match the result structure.
    The other problem is that you get a status 500 and do not receive a cXML document, but that might be ok, depending on what parameters you pass to the other HTTP server. At least, you get a meaningful error message back from the server, meaning communication is ok.
    I suggest you first correct those "copy failed" issues and then check by single-stepping where exactly the flow fails and check that input again.
    By the way, when I feed the above cXML into recordToDocument, it works fine. Did you specify other input parameters besides "node" (e.g. recordName) ? And again, are you on Core Fix 8 ?
    CSY

  • HTTP Request in post

    Hi all,
        I want to implement an interface between SAP and a bank.
        The bank provide a HTTP server, when I sent a HTTP request in post method with an XML body to the server, it will answer a response with an XML body to me.
        I search lots of topic about HTTP request in ABAP, then I know I must create a object ref to IF_HTTP_CLIENT, but I don't know which parameter I need to input, and how can I receive the response, and so on.....
        So, I want some simple code, can you help me? thanks in advance!
        PS: Does I need to configure a HTTP Adapter? I never use XI so I don't know any adapter, I just want to sent a request and receive a response in ABAP
    Edited by: Wei Jie Pan on Mar 23, 2009 3:54 AM

    you can use HttpURLConnection to POST or GET request in your backing bean
    See this example
        public void youTubeServerAction(ClientEvent clientEvent) {
          URL               url;
          HttpURLConnection conn;
          StringBuffer strBuffer = new StringBuffer();
            try {
                url = new URL("http://gdata.youtube.com/feeds/users/thomasthiele/uploads?alt=json-in-script&callback=showMyVideos&max-results=50");
                conn = (HttpURLConnection) url.openConnection();
                conn.setDoOutput(true);
                conn.setRequestMethod("GET");                   // >> set here POST request
                InputStream in = conn.getInputStream();
                int c;
                while ((c = in.read()) != -1)
                    strBuffer.append((char)c);
                System.out.println(strBuffer.toString());
                in.close();
                conn.disconnect();           
            } catch (Exception e) {
                e.printStackTrace();
            FacesContext fctx = FacesContext.getCurrentInstance();
            ExtendedRenderKitService serv =
                Service.getRenderKitService(fctx, ExtendedRenderKitService.class);
            System.out.println("SOURCE " + strBuffer.toString());
            serv.addScript(fctx, strBuffer.toString());       
        }Good luck.
    Thomas

  • Most Http Requests going into endless loop

    Hello,
    We are currently using JSF 1.1 with Oracle ADF Faces and running on a JBoss 4.0.3 application server running Java 1.5. We have been developing a large application for months with the usual various small problems. This week we've had a large number of continuous users on the system and have experienced a phenomenon where our Http Request threads will one-by-one fall into endless loops consuming alot of resources. This has happened with up to 30 threads before we were forced to restart the server.
    All the threads are stuck in the same piece of JSF code. And looking at the thread dump stack traces, some are in the ApplyRequestValues Phase while others are in the RenderResponse Phase.
    Here are two dumps from two threads, each one stuck in a different phase but you can see they are hung at the same spot in the code, apparently in an endless loop because the CPU times for these threads just keep increasing. Like they are continuously reading from the map, endlessly.
    Thread: http-0.0.0.0-8080-1 : priority:5, demon:true, threadId:79, threadState:RUNNABLE, threadLockName:null
        java.util.HashMap.get(HashMap.java:329)
        com.sun.faces.el.impl.JsfParser.parse(JsfParser.java:15)
        com.sun.faces.el.ValueBindingImpl.getNode(ValueBindingImpl.java:66)
        com.sun.faces.el.ValueBindingImpl.isReadOnly(ValueBindingImpl.java:145)
        oracle.adfinternal.view.faces.renderkit.core.xhtml.EditableValueRenderer.getReadOnly(EditableValueRenderer.java:211)
        oracle.adfinternal.view.faces.renderkit.core.xhtml.EditableValueRenderer.wasSubmitted(EditableValueRenderer.java:109)
        oracle.adfinternal.view.faces.renderkit.core.xhtml.EditableValueRenderer.decode(EditableValueRenderer.java:48)
        oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.decode(InputLabelAndMessageRenderer.java:34)
        oracle.adf.view.faces.component.UIXComponentBase.__rendererDecode(UIXComponentBase.java:937)
        oracle.adf.view.faces.component.UIXComponentBase.decode(UIXComponentBase.java:577)
        oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:676)
        oracle.adf.view.faces.component.UIXEditableValue.processDecodes(UIXEditableValue.java:269)
        oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
        oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
        oracle.adf.view.faces.component.UIXForm.processDecodes(UIXForm.java:53)
        javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)
        javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:306)
        com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:79)
        com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
        com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        com.paetec.paonline.web.PAStatisticsFilter.doFilter(PAStatisticsFilter.java:68)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        com.paetec.paonline.web.PATransactionFilter.doFilter(PATransactionFilter.java:353)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        com.paetec.paonline.web.PALoggingFilter.doFilter(PALoggingFilter.java:102)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
        oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
        oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
        oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
        org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
        org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
        org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:481)
        org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:150)
        org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        java.lang.Thread.run(Thread.java:595)
    Thread: http-0.0.0.0-8080-2 : priority:5, demon:true, threadId:85, threadState:RUNNABLE, threadLockName:null
        java.util.HashMap.get(HashMap.java:329)
        com.sun.faces.el.impl.JsfParser.parse(JsfParser.java:15)
        com.sun.faces.el.ValueBindingFactory.createValueBinding(ValueBindingFactory.java:44)
        com.sun.faces.application.ApplicationImpl.createValueBinding(ApplicationImpl.java:263)
        oracle.adf.view.faces.webapp.UIXComponentTag.createValueBinding(UIXComponentTag.java:357)
        oracle.adf.view.faces.webapp.UIXComponentTag.setProperty(UIXComponentTag.java:139)
        oracle.adfinternal.view.faces.taglib.UIXSelectItemTag.setProperties(UIXSelectItemTag.java:41)
        oracle.adfinternal.view.faces.taglib.core.input.CoreSelectItemTag.setProperties(CoreSelectItemTag.java:68)
        oracle.adf.view.faces.webapp.UIXComponentTag.setProperties(UIXComponentTag.java:126)
        javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:1008)
        javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1027)
        javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:740)
        javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:429)
        oracle.adf.view.faces.webapp.UIXComponentTag.doStartTag(UIXComponentTag.java:85)
        org.apache.jsp.main.financial_jsp._jspx_meth_af_selectItem_1(org.apache.jsp.main.financial_jsp:2221)
        org.apache.jsp.main.financial_jsp._jspx_meth_af_forEach_7(org.apache.jsp.main.financial_jsp:2197)
        org.apache.jsp.main.financial_jsp._jspx_meth_af_selectOneChoice_1(org.apache.jsp.main.financial_jsp:2171)
        org.apache.jsp.main.financial_jsp._jspService(org.apache.jsp.main.financial_jsp:859)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
        org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
        org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
        org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
        com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
        com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
        oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
        com.paetec.paonline.web.app.PAOViewHandler.renderView(PAOViewHandler.java:114)
        com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
        com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
        com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        com.paetec.paonline.web.PAStatisticsFilter.doFilter(PAStatisticsFilter.java:68)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        com.paetec.paonline.web.PATransactionFilter.doFilter(PATransactionFilter.java:353)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        com.paetec.paonline.web.PALoggingFilter.doFilter(PALoggingFilter.java:102)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
        oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
        oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
        oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
        org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
        org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
        org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:481)
        org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:150)
        org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        java.lang.Thread.run(Thread.java:595)

    I wanted to mention, when it occurs while rendering the page (as can be seen from the stack traces) that its occurring when rendering a tag. Here is one of the tags in my JSP page, specifically one where I think it could be hanging. Does anyone see anything fishy? This tag is an Oracle ADF tag and the "param" variable is a local loop variable. I jus recently added the " || !financialBean.profitAssistant.paDataEditable" part but I don't know if thats the cause of the problem. This does not occur everytime, it just seems like when there is a good amount of load on the system.
    <af:inputText simple="true"
         id=         "tlInputTextParam"
         value=      "#{param.textValue}"
         rendered=   "#{param.rendered}"
         disabled=   "#{param.disabled  || !financialBean.profitAssistant.paDataEditable}"
         styleClass= "#{param.styleClass}"
         inlineStyle="#{param.style}"
         columns=    "#{param.componentSize}"
         onchange=   "#{param.onChangeJS}"
         onclick=    "#{param.onClickJS}"
         onkeydown=  "#{param.onKeyDownJS}"
         onfocus=    "#{param.onFocusJS}"
         onblur=     "#{param.onBlurJS}"
         onmouseover="try{this.title='#{param.description}';#{param.onMouseOverValueJS}}catch(e){}"
         />

  • How hard is it to create a simple http server in java?

    how hard is it? where do i read on how to do it?

    Here is a class I called EchoServer. It simply receives an HTTP request wraps some HTML around it and sends it back to your browser. It should give you an idea of a simple structure and the API's to look at.
    Hope it helps.
    import java.io.IOException;
    import java.io.InterruptedIOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.net.ServerSocket;
    import java.net.Socket;
    public class EchoServer extends Object
         public static void main(String args[])
              throws IOException
              if ( args.length != 1)
                   System.out.println("try: java EchoServer <port>");
                   System.exit(-1);
              // Make sure port is numeric
              int port = -1;
              String portString = args[0];
              try
                   port = Integer.parseInt(portString);
              catch(NumberFormatException nfe)
                   System.out.println("port: " + portString + " is not a valid port number, try again");
                   System.exit(-1);
              // Create server socket and loop forever handling each request as it is received
              ServerSocket server = null;
              try
                   server = new ServerSocket( port );
                   System.out.println( server );
                   while ( true )
                        // this next line will wait until a client hits this port
                        Socket client = server.accept();
                        respond( client );
                        client.close();
              catch(Exception e)
                   e.printStackTrace();
              finally
                   if ( server != null )
                        server.close();
         public static void respond(Socket client)
              String request = getRequest( client);
              // Send request back wrapped in HTML
              OutputStream os = null;
              try
                   os = client.getOutputStream();
                   String response = "HTTP/1.0 200 Ok" + "\n"
                        + "Server: Echo Server" + "\n"
                        + "Content-type: text/html" + "\n"
                        + "\n"
                        + "<h2>The request you made was</h2>\n"
                        + "<pre>\n"
                        + "-------------------------------------\n"
                        + request
                        + "-------------------------------------\n"
                        + "</pre></html>\n";
                   os.write(response.getBytes());
              catch(InterruptedIOException iioe)
              catch(IOException ioe)
                   System.out.println(ioe.getMessage());
         private static String getRequest(Socket client)
    String request = "";
    byte[] iobuff = new byte[512];
    int bytes;
              try
              // Wait 100 milliseconds before assuming the complete request has been received
              // Note: when this test wasn't here the server seemed to hang. If you find a better solution please let me know
              InputStream is = client.getInputStream();
              client.setSoTimeout(100);
    while ( (bytes = is.read( iobuff )) != -1 )
    String temp = new String( iobuff, 0, bytes );
    request += temp;
    //                    System.out.println(temp);
              catch(InterruptedIOException iioe)
                   // this exception handles the socket timeout
              catch(IOException ioe)
                   request = ioe.getMessage();
              return request;

Maybe you are looking for

  • Creating Check Manually for Vendor Invoice

    I want to create a Check in SAP from a Vendor invoice manually. What steps do I need to take to do so? I am creating vendor invoice in FB60 I can create a outgoing Payment F-07 How do I create a Payment document in reference to the vendor invoice? I

  • Settings Screen is shaking sometimes

    When I am switching the app ,from some app to Settings ,the screen is shaking including the parent layout fastly/(From left to right).This behaviour is very critical.

  • Mavericks update for MacBook Air

    Since updating my MacBook Air software last week, I have slow internet connectivity and I am also finding it almost impossible to connect to FB.  The mobile app is working fine.

  • Transfer pc dvd

    I need to store the DVD's I made on PC  for safekeeping but I use an iMAC Lion now and it will not let me save the DVD's.  Apple tech suggested I put my DVD's onto my PC laptop and its backup then use this backup to bring into iMAC.  He also suggeste

  • BI Integrated Planning

    Hi Friends i was going through new functions in 2004s . and found out this BI Integarated planning. i have doubts on please clarfify them . 1. Is this a part of bussiness panning and simulation? 2. can this be used without using BPS? 3. do i need any