Https URL Connection Issue

Posted on 2009-04-29
Last Modified: 2012-05-06
Created URL object. Server returned HTTP response code: 411 for URL: https://ABCD
      at Source)
      at Source)

Authenticator.setDefault(new MyAuthenticator());


			Class clsFactory = Class.forName("");

			if ((clsFactory != null) && (Security.getProvider("SunJSSE") == null))




			URL myURL = new URL("https://ABCD");

			System.out.println("Created URL object.");

			 // Install the custom authenticator


			HttpsURLConnection connection = (HttpsURLConnection)myURL.openConnection();



			connection.setRequestProperty("Content-Type", "text/xml; charset=UTF-8"); 

			connection.setRequestProperty("Authorization", "Basic " + "Q1RJUFJPRDpQI0NUSTA5");


Open in new window

Question by:Sujay1000
    1 Comment
    LVL 51

    Accepted Solution

    411 Length Required

    you need to pass a proper Content-Length: header also

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
    By default, Carbonite Server Backup manages your encryption key for you using Advanced Encryption Standard (AES) 128-bit encryption. If you choose to manage your private encryption key, your backups will be encrypted using AES 256-bit encryption.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now