Problem setting Https proxy

hello
i want to connect to a secure http url ie https://url....for this i tried setting proxy in my java code as follow
System.setProperty("https.proxyHost","192.168.20.10") ;
System.setProperty("https.proxyPort", "8080") ;
and
System.getProperties().put("proxySet",true);
System.getProperties().put("https.proxyHost", "192.168.20.10");
System.getProperties().put("https.proxyPort", "8080");
but i am getting " Logon Exception generated :: java.security.AccessControlException: access denied
(java.util.PropertyPermission http.proxyHost write)" error.Please help me to remove this error.

hii,
for example
ByteArrayOutputStream bos = new ByteArrayOutputStream();
            String ret = null;
            String ret1 = null;
            String toDatum = calendarDate.getText();
            try {
                String UrlString = "http://www.someWeb";
                URL url = new URL(UrlString);
                String proxyUser = "userName";
                String proxyPassword = "pasword";
                String proxyAddress = "proxyServerDnsOrIP";
                int proxyPort = 8080;
                InetSocketAddress sa = new InetSocketAddress(proxyAddress, proxyPort);
                Proxy proxy = new Proxy(Proxy.Type.HTTP, sa);
                URLConnection conn = url.openConnection(proxy);
                //URLConnection conn = url.openConnection();
                conn.setRequestProperty("Accept-Charset", "cp1250");
                conn.setRequestProperty("Proxy-Authorization", "Basic " + new sun.misc.BASE64Encoder().encode((proxyUser + ":" + proxyPassword).getBytes()));
                InputStream in = null;
                in = conn.getInputStream();
                int len;
                byte[] buf = new byte[1024];
                while ((len = in.read(buf)) > 0) {
                    bos.write(buf, 0, len);
                String charEncoding = Charset.defaultCharset().name();
                /*String fileEncoding = System.getProperty("file.encoding");
                System.out.println("File Encoding: " + fileEncoding);
                System.out.println("Char Encoding: " + charEncoding);
                System.out.println("Char Encoding: " + Charset.availableCharsets());*/
                charEncoding = "cp1250";
                ret = new String(bos.toByteArray(), charEncoding);
                ret1 = bos.toString(charEncoding);
                groupImport = ret;
                ret1 = groupImport;
                in.close();
                proxy = null;
                conn = null;
                //removeHtmlData();
            } catch (IOException ioException) {
                ioException.printStackTrace();
                JOptionPane.showMessageDialog(null, ioException.getMessage(), "Htlm error", JOptionPane.ERROR_MESSAGE);
            }... kopik

Similar Messages

  • Setting http proxy while using utl_dbws?

    How do I set the proxy while using the utl_dbws package to access Web services inside PL/SQL?
    Here is an article about using utl_dbws to invoke Web services.
    http://www.oracle-base.com/articles/10g/utl_dbws10g.php
    If the database is behind a firewall, how to set the http proxy?
    Thanks!

    Are u sure that utl_dbws.set_http_proxy(...) works?
    I got error like " PLS-00302: component 'SET_HTTP_PROXY' must be declared. "
    When I browse through the UTL_DBWS package in the database, I could not find the function set_http_proxy() either.
    Thanks!

  • The problem about http proxy.

    Dear all,
    I am trying develop a java program by following the SAP NetWaver Library.
    http://help.sap.com/saphelp_nw04s/helpdata/en/c4/e1343e8c7f6329e10000000a114084/frameset.htm
    But it always catches the IllegalArgumentException because XI server isn't allowed for the direct connect to the URL like "http://www.w3.org/2001/XMLSchema".
    Please advise me how to establish the connect to the target URL by the proxy server using user authorization and apply to this development.
    The developing code:
    try {
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
    docBuilderFactory.setNamespaceAware(true);
    docBuilderFactory.setValidating(true);
    docBuilderFactory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
    docBuilderFactory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource","Schemafile");
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
    Document doc = docBuilder.parse("myXMLfile");
    } catch(DOMException domException) {
    domException.printStackTrace();
    } catch(IllegalArgumentException illegalArgumentException){
    illegalArgumentException.printStackTrace();
    Thanks & Regards,
    Red

    I think your xml and your xsd are not found on the server.
    What is the exact stack trace?

  • Help Please: Mail will not work when Wifi uses HTTP Proxy

    I am using an IPad 2 under iOS5. At work, I can connect to the internet using Safari via our wifi network with no problems. This requires access via a manually set HTTP Proxy.
    However, all attempts to create or use a (GMail) account have failed. I know that the mail account works because I have used it with no problems via my home wifi network. It would appear that Mail is not using the wifi proxy information in settings.
    The same was true under iOS4, but I would have hoped that a fix would have appeared in iOS5.
    Can anyone offer help or advice as to how I get around this problem?
    Thanks,
    Chris

    Still need help

  • HTTP Proxy setting for SOA server

    Hi,
    my intention is to enable SOA Server to connect through HTTP Proxy to external services. This occurred when I am trying to connect to Yahoo Mail Server, via User Messaging Service but it keep throwing connection time out. One of the possible solution is to make the service to connect via the HTTP Proxy server in our network.
    There are no mention of how to setup HTTP Proxy connection for UMS, as well as SOA Server in any documents.
    Please advice or direct me to the relevant solutions.
    Appreciate any help rendered :)
    yee thian

    I have not worked in SoA server, but since it uses weblogic server underlying (I assume), you can try setting the -Dhttp.proxyHost , -Dhttp.proxyPort system properties ( https for secured URL's) to WLS to specify the proxy details. Also the product might not have the capability to pass user credentials for authentication at the proxy. The version of OSB we are using had this problem. To overcome this you might require to add the URL to the proxy free list in your proxy server. This prevents the proxy from prompting for the user name when you access that URL.

  • Http proxy setting for webservice client.

    Hi !
    I have set the following option for accessing the webservice through the proxy(webservice
    outside the firewall).
    I'm using weblogic v7.0 with sp1.
    -Dweblogic.webservice.transport.http.proxy.host=xxxx
    -Dweblogic.webservice.transport.http.proxy.port=8088
    It works fine and my soap client is able to access the webservice lying outside
    the firewall.
    But when I use the same setting, the soap client fails for accessing the webservice
    which are
    inside the firewall.
    I get "Connection refused".
    Is there any option to specify not to use proxy for specific hosts and ports ?
    For example http.nonProxyHost
    Any pointers will be of great help.
    Thanks
    Kumar Raj

    I have not worked in SoA server, but since it uses weblogic server underlying (I assume), you can try setting the -Dhttp.proxyHost , -Dhttp.proxyPort system properties ( https for secured URL's) to WLS to specify the proxy details. Also the product might not have the capability to pass user credentials for authentication at the proxy. The version of OSB we are using had this problem. To overcome this you might require to add the URL to the proxy free list in your proxy server. This prevents the proxy from prompting for the user name when you access that URL.

  • Contribute connection problems, http proxy?

    I've been trying to set up a contribute connection on a client machine for a while now without any luck, Adobe support haven't been much help at all.
    We're using CS4 on a vista machine, connecting to a website via normal FTP. The FTP connection itself seems fine.. and we've connected to the site from this machine with normal ftp and downloaded/uploaded without problems. Don't have any problems setting up contribute on other machines for this site either. One symptom is that contribute always has trouble determining the remote path (on this machine only).
    We can connect to the website ok via Internet Explorer on the same machine. However, I noticed that IE is setup to use a proxy server for web connections.
    I'm wondering whether this is the problem - can Contribute use a proxy server for the HTTP part of its operation?
    Pat.

    If you have specified HTTP proxy in IE, Contribute uses it for HTTP part of the operation. If on that machine FTP is also configured to use a proxy server, in Contribute you can specify the same in the Preferences dialog of Contribute. There is FTP proxy setting in the Preferences dialog, where you can specify the address of the FTP proxy server.
    Hope this helps.

  • Http proxy setting

    Hi everyone, 
    I'm new to the forum but not new to Blackberry family. Currently am an proud owner of a bb z10 and runnng latest 10.2.1 this update rocks that is all i have to say but ofcourse there are some improvements need to be done.
    Anyway, what i wanted to do is to setup a http proxy settings on my z10 (when using my data service LTE on FIDO) like how it is done on BB playbook (WIFI then add my proxy information). Is there somewhere on the phone setting i can do this or a thirdparty software to achive this. Oh, by the way my phone is unlocked if you wondered.
    Thanks for reading.
    "BlackBerry: For Getting Things Done (TM)"

    I have not worked in SoA server, but since it uses weblogic server underlying (I assume), you can try setting the -Dhttp.proxyHost , -Dhttp.proxyPort system properties ( https for secured URL's) to WLS to specify the proxy details. Also the product might not have the capability to pass user credentials for authentication at the proxy. The version of OSB we are using had this problem. To overcome this you might require to add the URL to the proxy free list in your proxy server. This prevents the proxy from prompting for the user name when you access that URL.

  • IPhone 6 problem with Wifi/Http Proxy settings being lost

    In Settings/Wifi, you can set up a Manual Http Proxy
    I have noticed a bug only seen on iPhone 6, where it doesn't store the Manual Http Proxy setting you enter.
    e.g. You enter a Server and a Port number. If you then press Wi-Fi in top left to exit this screen, it doesn't store your settings and the Manual settting is not there when you come back into the screen.
    This does not happen on the following devices
    iPhone 5 with iOS 8.1
    iPad Mini with iOS 7.1.2
    iPad Air with iOS 8.1
    It seems to be an iPhone 6 issue, not an iOS 8 issue, as it works in iOS 8 on other devices.
    Anyone else noticed this?
    Note: This "Manual Http Proxy" setting is used by Web Testers (such as me) when trying to use the program called Fiddler to setup access to development servers (on PC and Mac you edit the hosts file to achieve same thing)

    I 've met a similar issue.  It's about Auto proxy instead of Manual proxy in your case.
    I solved it by chose 'Forget this network'  then search that wifi, input password connect again.
    I guess the reason might be the new iPhone's network connection is restored from back-up of old iPhone?
    Anyway, reconnection solved my problem. Hope it works for you too!

  • OSB call to remote Web Service via https proxy and https CONNECT problem

    Hi
    I have a service that calls a web service on another server as a web service. This call is via https and the certificate validation raises no errors.
    I now want this call to go via a squid httpd proxy on port 3128 on some machine. So I would like to use HTTP CONNECT (RFC 2817) proxying,. But when I set up this as a proxy, I am getting "Certificate chain" error messages. The certifcate chains is no different now from when I called without the http proxy, so what am I doing wrong? Does OSB support HTTP CONNECT?
    -Johan

    The exeption we are getting is BEA-380000
    General runtime error: [Security:090477]Certificate chain received from XXX - 123.123.123.123 --> test.salesforce.com was not trusted causing SSL handshake failure.
    This is of course not relevant if the callout were using CONNECT. In the CONNECT scenario, OSB would not care about XXX's certificate.

  • WebLogic 7.0 Installation : HTTP Proxy Problem

    Hi there,
    I have downloaded the Installer but I am having problem downloading. I have specified
    the HTTP Proxy configuration but it cannot get through since our HTTP Proxy requires
    username and password. Is there any way I can specify the username and password for
    the HTTP Proxy?
    Thanks.
    Hafiz

    On Tue, 10 Dec 2002 03:09:26 +0000, Kumar wrote:
    >
    Hi Guys,
    We are facing a strange problems as regards to installing Weblogic 7.0 SP1 evaluation
    software. We have a 6.1 server installed in the same box. If the instance of 6.1
    weblogic is running , if we try to install the 7.0 SP1 server in the same box
    but different drive , installtion is not giving the option for giving System username
    & password.
    Kindly let me know in case anybody has come with the similar issues.
    OS : Windows NT 4.0
    Weblogic Version 7.0 SP1
    Thanks in advance,
    KumarI only tried shutdown WLS 6.x before installing WLS 7.
    Thank you,
    Neo Gigs
    "Follow the white rabbit..."

  • OSB - Setting http Authorization header with Proxy Service

    Hi,
    I have the following scenario:
    PS1 -> PS2 -> BS (with a SA configured to pass through)
    I need to set the Authorization http header based on some information in payload, so:
    PS1 receives the payload and route to PS2, where username/password are extracted and using a java call out the base64 hash is generated.
    In the PS2 route i'm trying to set the Authorization header using the set Transport Headers option.
    When i do a request to test this operation, osb show me a beautiful CredentialNotFound exception.
    I have tryied to set the Authorization header in the route on the PS1, without success.
    Someone can help me ?

    I can't set the Proxy Service to do the authentication. I will try to explain better:
    I have a Business Service which have a Service Account associated to pass through the Authorization header to the service provider do the validation.
    I front of this business service i have a Proxy Service which route the requests to the BS.
    All partners send this Authorization header, but now, i have one that will not send no matter what.
    The username and passwrod will come into the payload (and will be variable).
    In some point before the proccess i need to extract the information from payload and set the Authorization header.
    Ty for you time.
    Edited by: GSanches on 09/07/2010 09:59

  • What is the correct setting for 'HTTP Proxy'?

    On my iPhone 5, while on my home network should HTTP Proxy be set to off, manual, or auto? thanks.

    Thanks, i saw so much talk about it in other threads but nothing about what it should be. My iPhone connects everywhere fine.

  • IPod touch not retaining Manual HTTP proxy setting

    I have this recurring issue with iPod touch using iOS6
    When I set the proxy settings, the ipod touch doesn't stay on 'manual' proxy, but reverts to 'off' as soon as leave the settings page, it does however keep the proxy settings, it just doesn't stay on 'Manual'
    I am an administrator of several hundred iPod touch in a school, and this seems to happen  from time to time, on the odd device. It's not all devices, and most are functioning perfectly.
    I've tried all the ususal solutions on the web, and resetting the network settings to no avail.
    It only happens on the odd device, so it's really frustrating. I am loathed to restore a device but is this the only solution left?
    Thank you

    Have you tried reading through the User Guide at http://support.apple.com/manuals/#ipodtouch
    Pick the one that matches your touch operating system

  • Just bought ATV. hope http proxy setting will be in UI instead of via apple configurator

    i just bought apple TV and loaded latest firmware 5.2.
    from the knowledge base, understand that http proxy can be setup via apple configurator after ver 5.1.
    it can only be installed in MAC.
    i am really hope your developer team could bring the said function out to user interface instead of going through all the hassle.
    looking forward for your early reply

    Thanks for the idea. I had already thought about using aliases but that wouldn't stop the Application folder showing a looooooooooong list o applications. As I said, having things clear is just a crazy habit of mine. Now that I know the trick I will just "survive" having FCS applications in their default location. I know I'm the only one here doing things differently. It's just that I have never had that problem with any other application and it was turning me crazy.
    By the way, if anyone would like to use aliases, using an underscore as the first characters help having things on top of the list. For instance, the alias "_Multimedia" would appear before "Adobe".

Maybe you are looking for