"INFO: Discarding unexpected response: HTTP/1.1 100 Continue" error


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: "INFO: Discarding unexpected response: HTTP/1.1 100 Continue" error

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Posts
    1

    "INFO: Discarding unexpected response: HTTP/1.1 100 Continue" error

    I wrote a program that sends a cradit card authorization request to TransFirst.
    I can successfully send a file with the authorization information and receive a
    response. My problem is that I also get this as an output "INFO: Discarding unexpected response: HTTP/1.1 100 Continue". Does anyone know how to get rid of this output? Thanks in advance.

    My code is:
    Code:
    import java.io.*;
    //import java.util.*;
    import java.security.*;
    
    import org.apache.commons.httpclient.HttpClient;
    import org.apache.commons.httpclient.methods.EntityEnclosingMethod;
    import org.apache.commons.httpclient.methods.PostMethod;
    
    
    public class tfirstComm {
    
    	static String testURL = "https://ePaysecure1.transfirst.com/elink/authpd.asp";	
    	static String hostURL = "https://ePaysecure1.transfirst.com/elink/authpd.asp";
    	
    	
    	 public static void main(String args[]) throws Exception
    	  {
    
    		  // Display usage parameters
    		  if (args.length != 1)
    		  {
    			  System.err.println("usage: java tfirstComm orderID");
    			  System.exit(0);
    		  }
    
    
    			try
    			{
    				
    				String fileRequest = args[0];
    				
    				
    				String fileResponse = "A"+fileRequest+".ret";
    				
    				File tempReta = new File(fileResponse);
    				BufferedWriter wrReta = new BufferedWriter(new FileWriter(tempReta));
    				File tempAuth = new File("TR" + fileRequest + ".aut");
    
    				// Turn on SSL capabilites//////////////////////////////////////////		
    				Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    
    				// Create a TCP connection & POST the XML temp file
    				String workURL = "";
    				workURL = hostURL;
    				
    
    				PostMethod post = new PostMethod(workURL);
    				post.setRequestBody(new FileInputStream(tempAuth));
    				//post.setRequestHeader("Host:", "htt://epay.transfirst.com");
    
    				//post.setRequestHeader("POST",hostURL,"false");
    				post.setRequestHeader("Pragma", "No-Cache");
    				post.setRequestHeader("Stateless-Transaction", "true");
    				post.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    				
    				if (tempAuth.length() < Integer.MAX_VALUE)
    				{
    					post.setRequestContentLength((int)tempAuth.length());
    				}
    				else
    				{
    					post.setRequestContentLength(EntityEnclosingMethod.CONTENT_LENGTH_CHUNKED);
    				}
    
    				HttpClient httpclient = new HttpClient();
    				int result = httpclient.executeMethod(post);
    				//System.out.print(post.getResponseBodyAsString());
    				// Write the response to a temp file
    				wrReta.write(post.getResponseBodyAsString());
    				
    
    				// Close the TCP connection, temp files, & db connection
    				post.releaseConnection();
    				wrReta.close();
    
    			}
    
    			catch (IOException e)
    			{
    				System.err.println("Communication Error - Retry the Authorization");
    				System.out.println(e.toString());
    				System.exit(-1);
    				e.printStackTrace();
    			}
    			catch (Exception e)
    			{
    				System.out.println(e.toString());
    				e.printStackTrace();
    				System.exit(1);
    			}
    	  }
    	
    
    }
    Last edited by Hack; 11-12-2007 at 01:24 PM. Reason: Added Code Tags

  2. #2
    Join Date
    Sep 2005
    Location
    istanbul / Turkey
    Posts
    133
    you can change logging level from INFO to WARN,
    or log into a file instead of console.

    first find out which logging library in use.
    log4j or java's logging API are known ones.

Similar Threads

  1. Re: Error handling in components called from ASP
    By James Barbetti in forum ASP.NET
    Replies: 2
    Last Post: 11-06-2001, 02:13 PM
  2. DTS/linked server error #6
    By John M. in forum Database
    Replies: 0
    Last Post: 05-17-2001, 04:01 PM
  3. NullPointerException when reading text file
    By Andrew McLellan in forum Java
    Replies: 3
    Last Post: 05-09-2001, 06:34 PM
  4. OLEDB Rich Error info via ADO
    By Jonni Faiga in forum authorevents.vieira
    Replies: 2
    Last Post: 01-26-2001, 05:55 AM
  5. Winsock32, Connect fails to connect to a peer
    By Chris.G in forum VB Classic
    Replies: 4
    Last Post: 11-13-2000, 04:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center