Simple http proxy

What I'm trying to do is write an http proxy. It should resend client's requests unaltered to the designated http server (Host parameter in the request) , then stream the content back to the client. For certain responses (text/html) I'll need to alter the streams reaching the client. Can anyone help with some suggestions? I'm a bit stuck here, especially because the same code runs on linux (jdk 6) but with tons of broken pipe exceptions, and it won't send anything to the browser when the proxy runs on windows. Which is the best way to stream/process the response I get from the remote server?
Here's my code:
import java.io.*;
import java.net.*;
import java.util.logging.*;
public class Main {
public static void main(String[] args) throws IOException {
Daemon daemon = new Daemon(80);
Thread t = new Thread(daemon);
t.start();
//Main Listener thread
static class Daemon implements Runnable {
private ServerSocket server;
public Daemon(int port) throws IOException {
this.server = new ServerSocket(port);
public void run() {
System.out.println("LISTENING");
try {
for (;;) {
Socket s = server.accept();
System.out.println("Accepted connection from: " + s.getInetAddress());
Handler handler = new Handler(s);
Thread t = new Thread(handler);
t.start();
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
//Handles concurrent connections
static class Handler implements Runnable {
private Socket clientSocket;
public Handler(Socket clientSocket) {
this.clientSocket = clientSocket;
public void run() {
InputStream in = null;
try {
in = clientSocket.getInputStream();
int d;
//Read the HTTP request from client
StringBuilder requestBuilder = new StringBuilder();
while (((d = in.read()) != -1) && (in.available() > 0)) {
requestBuilder.append((char) d);
String request = requestBuilder.toString();
//Find to which host the rquest was directed to
InputStream temStream = new ByteArrayInputStream(request.getBytes());
BufferedReader reader = new BufferedReader(new InputStreamReader(temStream));
String line;
String host = "";
while ((line = reader.readLine()).length() > 0) {
if (line.split(": ")[0].toLowerCase().contains("host")) {
host = line.split(": ")[1];
break;
//Open a connection to the remote Http server
Socket remoteConnection = new Socket(host, 80);
//Write the request to the remote host
BufferedWriter serverWriter = new BufferedWriter(new OutputStreamWriter(remoteConnection.getOutputStream()));
serverWriter.write(request);
serverWriter.newLine();
serverWriter.flush();
//From here on problems start
BufferedInputStream serverStream = new BufferedInputStream(remoteConnection.getInputStream());
int i;
//Read data from remote server and stream it to the client
while ((i = serverStream.read()) != -1 && !(remoteConnection.isInputShutdown())) {
//This thing here throws a broken pipe exception on linux JKD 6
//On windows it won't even work
clientSocket.getOutputStream().write(i);
clientSocket.getOutputStream().flush();
clientSocket.close();
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
} finally {
try {
in.close();
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}

You're telnetting and HTTP'ing to the same port, right?
What do you mean no input? From the browser, from the server's point of view?
Or vice-versa?
All the details of how a proxy should work, is spelled out in the HTTP RFC doc. I can't recall the RFC number.
Do a Google on "HTTP RFC" and you'll probably find it.

Similar Messages

  • Http proxy, in 15 lines

    Someone in irc was asking about a simple http proxy the other day. I scratched around in some ruby, and came up with a *very* simple one..in 15 lines of code. Yeah, I know..I am prone to verbosity..
    Something to fiddle with, in any regard.
    super simple http-proxy

    Hi,
    basic post-support:
    #!/usr/bin/env ruby
    require 'socket'
    require 'open-uri'
    server = TCPServer.new('127.0.0.1', 9090)
    while (session = server.accept)
    request = ""
    response = ""
    while (r = session.gets) and r.strip.any?
    request += r
    end
    puts request
    r_type, url_request = (request.split(/ /))
    begin
    case r_type
    when /POST/
    uri = URI.parse(url_request)
    if uri.is_a?(URI::HTTPS)
    raise "sorry, no https possiblen"
    end
    content_length = request.scan(/Content-Length: ([0-9]+)rn/i).flatten[0].to_i
    content = session.read(content_length)
    Net::HTTP.start(uri.host, uri.port) do |http|
    response = http.post(uri.path,content).body
    end
    when /GET/
    open(url_request) do |file|
    response = file.read
    end
    else
    raise "unknown request-type: #{r_type}"
    end
    rescue => e
    response = "Error: "+e.to_s
    end
    session.print response
    session.close
    end

  • How can I convert a https proxy to socks5?

    Hi. I have a https proxy and want to convert it to socks v5.
    I found polipo but it have two problems:
    1- It's convert socks v5 to http proxy. I want to convert https proxy to socks5.
    2- It not support authentication. My https proxy is protected and needs username and password.
    Thanks.
    I wait for your answers.

    progandy wrote:You can create a socks proxy with dante, you can redirect your applications to a socks proxy with socksify (in the dante package).
    AFAIK, the danted proxy can forward traffic to another socks proxy or a http 1.0 proxy.
    Edit: Just found http://proxychains.sourceforge.net/
    https://aur.archlinux.org/packages.php?ID=41765
    Sorry, my English is very bad and I can't read dante configuration arcides.
    How can I configure it? Can you say it in simple English language? :-?

  • How do I create a Https Proxy server

    hi,
    I am writing a Proxy server in java. But my pogram do not support https protocol.Could you please tell me how can I implement a https proxy server.some sample code is more helpful.
    This is very URGENT for me.
    Thanks
    Sujith Varghese

    Hi Varghese,
    Reading the thread I am able to make out u r facing the same problem as I do.
    current scenario#1:
    Machine#1 client (using URLConnection("https://...") ----> Machine#2 (Server https port)
    what I want scenario#2
    Machine#3 client (using URLConnection("https://...") ---> Machine#1 (Proxy for https)----> Machine#2 (Server https port)
    In scenario#1
    - I have a Client machine at Location#1 which can connect to on Location#2
    - I only have SSH connection to machine at Location#1
    now this scenario#2 is what I would like to run so that
    - I am able to connect to mc#2 at loc#2 from a machine at loc#3 with mc#3
    - effectively starting a https proxy at location number mc#1 at loc#1.
    Hope that clears the problem domain.
    any help will be greatly appreciated.
    regards-
    _Jagsir                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Javax.xml.ws.soap.SOAPFaultException: InvalidSecurity : error in processing the WS-Security security header error while invoking FinancialUtilService using HTTP proxy client

    I am trying to invoke FinancialUtilService using HTTP proxy client. I am getting below error while i am trying to invoke this service. Using FusionServiceTester i am able to invoke service and upload file to UCM. Using oracle.ucm.fa_client_11.1.1.jar also i am able to upload file to UCM without any issue. But using HTTP proxy client i am facing below error. Can anyone please help me. PFA code i am using to invoke this service.
    javax.xml.ws.soap.SOAPFaultException: InvalidSecurity : error in processing the WS-Security security header
      at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:197)
      at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:122)
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:125)
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
      at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:135)
      at $Proxy43.uploadFileToUcm(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at weblogic.wsee.jaxws.spi.ClientInstance$ClientInstanceInvocationHandler.invoke(ClientInstance.java:363)
      at $Proxy44.uploadFileToUcm(Unknown Source)
      at com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.FinancialUtilServiceSoapHttpPortClient.invokeUpload(FinancialUtilServiceSoapHttpPortClient.java:299)
      at com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.FinancialUtilServiceSoapHttpPortClient.main(FinancialUtilServiceSoapHttpPortClient.java:273)
    Process exited with exit code 0.
    Message was edited by: Oliver Steinmeier
    Removed attachment

    Hi Jani,
    Thanks for your reply.
    I am new to webservices and we are trying to do a POC on invoking FinancialUtilService using HTTP proxy client. I am following steps mentioned in attached pdf section "Invoking FinancialUtil Service using Web Service Proxy Client". I have imported certificate using below command. 
         keytool -import -trustcacerts -file D:\Retek\Certificate.cer -alias client -keystore D:\Retek\default-keystore.jks -storepass welcome1
    Invoking
        SecurityPolicyFeature[] securityFeature =
        new SecurityPolicyFeature[] { new
        SecurityPolicyFeature("oracle/wss11_saml_token_with_message_protection_client_policy")};
        financialUtilService_Service = new FinancialUtilService_Service();
        FinancialUtilService financialUtilService= financialUtilService_Service.getFinancialUtilServiceSoapHttpPort(securityFeature);
        // Get the request context to set the outgoing addressing properties
        WSBindingProvider wsbp = (WSBindingProvider)financialUtilService;
        WSEndpointReference replyTo =
          new WSEndpointReference("https://efops-rel91-patchtest-external-fin.us.oracle.com/finFunShared/FinancialUtilService", WS_ADDR_VER);
        String uuid = "uuid:" + UUID.randomUUID();
        wsbp.setOutboundHeaders( new StringHeader(WS_ADDR_VER.messageIDTag, uuid), replyTo.createHeader(WS_ADDR_VER.replyToTag));
        wsbp.getRequestContext().put(WSBindingProvider.USERNAME_PROPERTY, "fin_user1");
        wsbp.getRequestContext().put(WSBindingProvider.PASSWORD_PROPERTY,  "Welcome1");
        wsbp.getRequestContext().put(ClientConstants.WSSEC_RECIPIENT_KEY_ALIAS,"service");
        wsbp.getRequestContext().put(ClientConstants.WSSEC_KEYSTORE_LOCATION, "D:/Retek/default-keystore.jks");
        wsbp.getRequestContext().put(ClientConstants.WSSEC_KEYSTORE_PASSWORD, "welcome1" );
        wsbp.getRequestContext().put(ClientConstants.WSSEC_KEYSTORE_TYPE, "JKS" );
        wsbp.getRequestContext().put(ClientConstants.WSSEC_SIG_KEY_ALIAS, "client" );
        wsbp.getRequestContext().put(ClientConstants.WSSEC_SIG_KEY_PASSWORD, "password" );
        wsbp.getRequestContext().put(ClientConstants.WSSEC_ENC_KEY_ALIAS, "client" );
        wsbp.getRequestContext().put(ClientConstants.WSSEC_ENC_KEY_PASSWORD, "password" );
    SEVERE: WSM-00057 The certificate, client, is not retrieved.
    SEVERE: WSM-00137 The encryption certificate, client, is not retrieved due to exception oracle.wsm.security.SecurityException: WSM-00057 : The certificate, client, is not retrieved..
    SEVERE: WSM-00161 Client encryption public certificate is not configured for Async web service client
    SEVERE: WSM-00005 Error in sending the request.
    SEVERE: WSM-07607 Failure in execution of assertion {http://schemas.oracle.com/ws/2006/01/securitypolicy}wss11-saml-with-certificates executor class oracle.wsm.security.policy.scenario.executor.Wss11SamlWithCertsScenarioExecutor.
    SEVERE: WSM-07602 Failure in WS-Policy Execution due to exception.
    SEVERE: WSM-07501 Failure in Oracle WSM Agent processRequest, category=security, function=agent.function.client, application=null, composite=null, modelObj=FinancialUtilService, policy=oracle/wss11_saml_token_with_message_protection_client_policy, policyVersion=null, assertionName={http://schemas.oracle.com/ws/2006/01/securitypolicy}wss11-saml-with-certificates.
    oracle.wsm.common.sdk.WSMException: WSM-00161 : Client encryption public certificate is not configured for Async web service client
      at oracle.wsm.security.policy.scenario.executor.Wss11SamlWithCertsScenarioExecutor.sendRequest(Wss11SamlWithCertsScenarioExecutor.java:173)
      at oracle.wsm.security.policy.scenario.executor.SecurityScenarioExecutor.execute(SecurityScenarioExecutor.java:545)
      at oracle.wsm.policyengine.impl.runtime.AssertionExecutor.execute(AssertionExecutor.java:41)
      at oracle.wsm.policyengine.impl.runtime.WSPolicyRuntimeExecutor.executeSimpleAssertion(WSPolicyRuntimeExecutor.java:608)
      at oracle.wsm.policyengine.impl.runtime.WSPolicyRuntimeExecutor.executeAndAssertion(WSPolicyRuntimeExecutor.java:335)
      at oracle.wsm.policyengine.impl.runtime.WSPolicyRuntimeExecutor.execute(WSPolicyRuntimeExecutor.java:282)
      at oracle.wsm.policyengine.impl.PolicyExecutionEngine.execute(PolicyExecutionEngine.java:102)
      at oracle.wsm.agent.WSMAgent.processCommon(WSMAgent.java:915)
      at oracle.wsm.agent.WSMAgent.processRequest(WSMAgent.java:436)
      at oracle.wsm.agent.handler.WSMEngineInvoker.handleRequest(WSMEngineInvoker.java:393)
      at oracle.wsm.agent.handler.wls.WSMAgentHook.handleRequest(WSMAgentHook.java:239)
      at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:220)
      at weblogic.wsee.jaxws.tubeline.FlowControlTube.processRequest(FlowControlTube.java:98)
      at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:604)
      at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:563)
      at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:548)
      at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:445)
      at com.sun.xml.ws.client.Stub.process(Stub.java:259)
      at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:152)
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:115)
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
      at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:135)
      at $Proxy43.uploadFileToUcm(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at weblogic.wsee.jaxws.spi.ClientInstance$ClientInstanceInvocationHandler.invoke(ClientInstance.java:363)
      at $Proxy44.uploadFileToUcm(Unknown Source)
      at com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.FinancialUtilServiceSoapHttpPortClient.invokeUpload(FinancialUtilServiceSoapHttpPortClient.java:111)
      at com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.FinancialUtilServiceSoapHttpPortClient.main(FinancialUtilServiceSoapHttpPortClient.java:86)
    Caused by: oracle.wsm.security.SecurityException: WSM-00161 : Client encryption public certificate is not configured for Async web service client
      at oracle.wsm.security.policy.scenario.processor.Wss11X509TokenProcessor.insertClientEncCertToWSAddressingHeader(Wss11X509TokenProcessor.java:979)
      at oracle.wsm.security.policy.scenario.processor.Wss11X509TokenProcessor.build(Wss11X509TokenProcessor.java:206)
      at oracle.wsm.security.policy.scenario.executor.Wss11SamlWithCertsScenarioExecutor.sendRequest(Wss11SamlWithCertsScenarioExecutor.java:164)
      ... 30 more
    Caused by: oracle.wsm.security.SecurityException: WSM-00057 : The certificate, client, is not retrieved.
      at oracle.wsm.security.jps.WsmKeyStore.getJavaCertificate(WsmKeyStore.java:534)
      at oracle.wsm.security.jps.WsmKeyStore.getCryptCert(WsmKeyStore.java:570)
      at oracle.wsm.security.policy.scenario.processor.Wss11X509TokenProcessor.insertClientEncCertToWSAddressingHeader(Wss11X509TokenProcessor.java:977)
      ... 32 more
    SEVERE: WSMAgentHook: An Exception is thrown: WSM-00161 : Client encryption public certificate is not configured for Async web service client
    File upload failed
    javax.xml.ws.WebServiceException: javax.xml.rpc.JAXRPCException: oracle.wsm.common.sdk.WSMException: WSM-00161 : Client encryption public certificate is not configured for Async web service client
      at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:231)
      at weblogic.wsee.jaxws.tubeline.FlowControlTube.processRequest(FlowControlTube.java:98)
      at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:604)
      at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:563)
      at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:548)
      at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:445)
      at com.sun.xml.ws.client.Stub.process(Stub.java:259)
      at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:152)
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:115)
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
      at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:135)
      at $Proxy43.uploadFileToUcm(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at weblogic.wsee.jaxws.spi.ClientInstance$ClientInstanceInvocationHandler.invoke(ClientInstance.java:363)
      at $Proxy44.uploadFileToUcm(Unknown Source)
      at com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.FinancialUtilServiceSoapHttpPortClient.invokeUpload(FinancialUtilServiceSoapHttpPortClient.java:111)
      at com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.FinancialUtilServiceSoapHttpPortClient.main(FinancialUtilServiceSoapHttpPortClient.java:86)
    Caused by: javax.xml.rpc.JAXRPCException: oracle.wsm.common.sdk.WSMException: WSM-00161 : Client encryption public certificate is not configured for Async web service client
      at oracle.wsm.agent.handler.wls.WSMAgentHook.handleException(WSMAgentHook.java:395)
      at oracle.wsm.agent.handler.wls.WSMAgentHook.handleRequest(WSMAgentHook.java:248)
      at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:220)
      ... 19 more

  • After updating to iOS 6, I can no longer connect to my schools wireless network. It uses manual http proxy. Now however a blank pop up comes up and it will not connect you. Thanks

    After updating to iOS 6, I can no longer connect to my schools wireless network. It uses manual http proxy. Now however a blank pop up comes up and it will not connect you. Thanks

    Turn off your firewall and antivirus software.

  • Sending files via File Adapter through FTP having a HTTP proxy as firewall

    Dear  experts,
    I am having a issue trying to send a file via FTP with the File Adapter. My client has a HTTP proxy with authentification required as firewall  in order to send files via FTP.
    I've tried several solutions but I cannot find a way to add the proxy name, user and password in the communication channel.
    Any ideas?
    Thanks in advance.
    Best Regards

    Hi,
    Unfortunately those changes didn't work. The adapter is not able to establish a connection within the FTP server. These are the parameters I added:
    -Dhttp.proxy.user=<usename>
    -Dhttp.proxy.password=<userpassword>
    -Dhttp.proxyHost=<proxy.domain...>
    -Dhttp.proxyPort=80
    -Dhttp.nonProxyHost="*domain1.com domain2com"
    -Dhttps.proxy.user=<usename>
    -Dhttps.proxy.password=<userpassword>
    -Dhttps.proxyHost=<proxy.domain...>
    -Dhttps.proxyPort=80
    -Dhttps.nonProxyHost="*domain1.com domain2com"
    And just in case, we tried with these other parameters at the same time.
    -Dftp.proxy.user=<usename>
    -Dftp.proxy.password=<userpassword>
    -Dftp.proxyHost=<proxy.domain...>
    -Ddftp.proxyPort=80
    -Dftp.nonProxyHost="*domain1.com domain2com"
    The errors in the adapter engine's log are:
    Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Socket connection timed out: <ftp ip address>
    Error Exception caught by adapter framework: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Socket connection timed out: <ftp ip address>
    Error Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Socket connection timed out: <ftp ip address>
    By the way, we are using  PI 7.0.
    Thanks in advance
    Edited by: SAPIMSA . on Apr 20, 2011 4:08 PM

  • 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 authentication for JDev 10.1.3

    Hi,
    I found the http proxy settings in the "tools->preferences->Web Browser and Proxy" but there are no settings for the username and password. Is there some other way that I can add these.
    The problem is that whenver JDeveloper wants to do some http stuff it (or something else is doing it) asks me for the proxy user name & password - this happens over and over again. If JDev is doing this then surely it should remember the username & password.
    I sometimes get a JDeveloper dialog "waiting for the connection" come up over the proxy auth dialog and I have to cancel the function so I can authenticate, then re-request the function.
    I wish I didn't have the proxy authentication but I have no choice in this dev environment. I do get to choose JDeveloper at least.
    Regards,
    Simon.

    Hi,
    I get it when I 'check for updates' and I get it again when I 'go to JavaDoc' - and this is the one where the "waiting for connection dialog" pops on top of the proxy log in and I have to cancel it to log in. Then all subsequent 'go to JavaDoc' requests go straight through.
    I would prefer it if I could just configure (in proxy preferences) the username and password so it never asks me. I dont care if it less secure storing the password since I think authenticating proxies are a dumb idea anyway. If the password is not supplied then JDev can ask for it like it does now to keep the security-paranoid people happy.
    Also, this morning I got this Exception which appeared at the same time I got a proxy auth window. When JDev finally started all my previously open windows were lost. No real problem but unexpected. Here is the stack dump:
    java.lang.NullPointerException
         at oracle.jdevimpl.webdav.api.DAVAuthenticator.getPasswordAuthentication(DAVAuthenticator.java:79)
         at java.net.Authenticator.requestPasswordAuthentication(Authenticator.java:300)
         at sun.net.www.protocol.http.HttpURLConnection$1.run(HttpURLConnection.java:267)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.net.www.protocol.http.HttpURLConnection.privilegedRequestPasswordAuthentication(HttpURLConnection.java:263)
         at sun.net.www.protocol.http.HttpURLConnection.getHttpProxyAuthentication(HttpURLConnection.java:1427)
         at sun.net.www.protocol.http.HttpURLConnection.resetProxyAuthentication(HttpURLConnection.java:1246)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:950)
         at oracle.ide.net.HttpURLFileSystemHelper.exists(HttpURLFileSystemHelper.java:191)
         at oracle.jdevimpl.webdav.net.WebDAVURLFileSystemHelper.exists(WebDAVURLFileSystemHelper.java:423)
         at oracle.ide.net.URLFileSystem.exists(URLFileSystem.java:498)
         at oracle.ideimpl.editor.EditorUtil.getNode(EditorUtil.java:126)
         at oracle.ideimpl.editor.EditorUtil.loadContext(EditorUtil.java:91)
         at oracle.ideimpl.editor.TabGroupState.loadStateInfo(TabGroupState.java:950)
         at oracle.ideimpl.editor.TabGroup.loadLayout(TabGroup.java:1758)
         at oracle.ideimpl.editor.TabGroupXMLLayoutPersistence.loadComponent(TabGroupXMLLayoutPersistence.java:31)
         at oracle.ideimpl.controls.dockLayout.DockLayoutInfoLeaf.loadLayout(DockLayoutInfoLeaf.java:123)
         at oracle.ideimpl.controls.dockLayout.AbstractDockLayoutInfoNode.loadLayout(AbstractDockLayoutInfoNode.java:631)
         at oracle.ideimpl.controls.dockLayout.AbstractDockLayoutInfoNode.loadLayout(AbstractDockLayoutInfoNode.java:628)
         at oracle.ideimpl.controls.dockLayout.AbstractDockLayoutInfoNode.loadLayout(AbstractDockLayoutInfoNode.java:614)
         at oracle.ideimpl.controls.dockLayout.DockLayout.loadLayout(DockLayout.java:302)
         at oracle.ideimpl.controls.dockLayout.DockLayoutPanel.loadLayout(DockLayoutPanel.java:128)
         at oracle.ideimpl.editor.Desktop.loadLayout(Desktop.java:353)
         at oracle.ideimpl.editor.EditorManagerImpl.init(EditorManagerImpl.java:1824)
         at oracle.ide.layout.Layouts.activate(Layouts.java:758)
         at oracle.ide.layout.Layouts.activateLayout(Layouts.java:179)
         at oracle.ideimpl.MainWindowImpl$2.runImpl(MainWindowImpl.java:734)
         at oracle.javatools.util.SwingClosure$1Closure.run(SwingClosure.java:50)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

  • IronPort C670 AsyncOS Upgrade over http proxy

    Good day.
    I try to upgrade my IronPort C670 AsyncOS over http proxy.
    Proxy is working fine when i try to get featured keys for example. But whe when i try to ugprade AsyncOS i get "Error — Error fetching manifest: Failed to connect to manifest server" message.
    Proxy server is work and ironport have network acess to it. Even for telnet to 80 port.
    Squid proxy log:
    1373973019.051     57 {{IP_ADDRESS}} TCP_IMS_HIT/304 368 GET http://downloads.ironport.com/vtl/vof_history_year.tgz - NONE/- application/x-gzip
    1373973079.194    117 {{IP_ADDRESS}} TCP_IMS_HIT/304 368 GET http://downloads.ironport.com/vtl/vof_history_year.tgz - NONE/- application/x-gzip
    1373973119.168    497 {{IP_ADDRESS}} TCP_MISS/200 715 GET http://downloads.ironport.com/asyncos/fkey? - DIRECT/217.212.252.179 text/plain
    What can be the problem?

    Hi,
    Please take a look to this:
    http://tools.cisco.com/squish/c93bE
    HTH
    Luis Silva
    "If you need PDI (Planning, Design, Implement) assistance feel free to reach"
    http://www.cisco.com/web/partners/tools/pdihd.html

  • Web service client ignores http proxy settings

    I have a web service client using Weblogic's web service client library. I'm trying to instruct it to use a http proxy. I've set all the following system properties:
    -Dhttp.proxyHost=127.0.0.1
    -Dhttp.proxyPort=8080 -Dweblogic.webservice.transport.http.proxy.host=127.0.0.1 -Dweblogic.webservice.transport.http.proxy.port=8080
    No traffic is passing through the proxy.
    When the proxy is down, the application works fine too. I suspect that the proxy settings are completely ignored for some reason.
    I'm using Weblogic 8.1 SP4 on a Windows XP box and JDK 1.4.2 (Sun's bundled JDK with Weblogic).

    Sorry about the delay,
    You just need to use the standard java http proxy properties, take a look at:
    http://download-west.oracle.com/docs/cd/A97329_03/web.902/a95453/useservices.htm
    Does this help?
    Gerard

  • Java Nio and http proxy

    Hello,
    I would send a http request through a http proxy with a Nio Client. So I wrote by hand the
    http request :
    buffer.append("HTTP/1.1\n");
    buffer.append("Content-type: text/xml\n");
    Then I send this request with a Nio Client but the request doesn't pass.
    Can you help me ?

    I use tcp to send my request with a nio Client. The header of my http request :
    StringBuffer buffer = new StringBuffer();
    buffer.append("POST ");
    String path = "/";
    buffer.append(path + " ");
    buffer.append("HTTP/1.1\r\n");
    buffer.append("Content-type: text/xml\r\n");
    buffer.append("Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\r\n");
    buffer.append("Host: 10.194.55.23:80\r\n");
    buffer.append("Connection: keep-alive\r\n");
    buffer.append("Content-Length: 0\r\n");
    buffer.append("\r\n");

  • Simple HTTP Receiver - HTTP server code 405 reason Not Allowed explanation

    Hi, I am using simple HTTP Receiver to receive the XML file from the below url http://www.bank-ua.com/export/currrate.xml
    But receiving the below error in SXMB_MONI
    <SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_SERVER</SAP:Code>  
    <SAP:P1>405</SAP:P1>  
    <SAP:P2>Not Allowed</SAP:P2>  
    <SAP:P3><html> <head><title>405 Not Allowed</title></head> <body bgcolor="white"> <center><h1>405 Not Allowed</h1></center> <hr><center>nginx/1.4.1</center> </body> </html></SAP:P3>  
    <SAP:P4 />  
    <SAP:AdditionalText />  
    <SAP:Stack>HTTP server code 405 reason Not Allowed explanation <html> <head><title>405 Not Allowed</title></head> <body bgcolor="white"> <center><h1>405 Not Allowed</h1></center> <hr><center>nginx/1.4.1</center> </body> </html></SAP:Stack>  
    <SAP:Retry>M</SAP:Retry>  
    </SAP:Error>
    Initially the same URL was working could you advice what to change to make this working?
    Thanks,
    Dhill

    Hi Senthil,
    There is a way, you can expose the function module HTTP_GET as an rfc-enabled FM and use it to call the webservice. Here is a POC I made before:
    Proof of Concept: An Alternative HTTP GET using a Remote-Enabled Version of the Function Module HTTP_GET
    Another is to create a UDF that uses an HTTP Client class to call the webservice.
    Regards,
    Mark

  • What HTTP Proxy settings to use and when?

    On the Wi-Fi Networks menu there are three options for HTTP Proxy - Off, Manual, Auto
    Which one should I use and when/why would I use the others?
    thx, gordo

    99% of the time, you should have the proxy settings turned off. Unless you are trying to connect to a corporate network, or some other network that requires a proxy server. In that case you would need to talk to the network administrators to obtain the settings you would need. If your just connecting to your wireless network at home, your almost for sure not going to need to enter anything for the proxy server settings.

  • SQL Developer fails to access update center via http proxy

    Hi,
    I've configured HTTP Proxy exactly like MS-IE. Anyway, sql developer fails to access web. This is the error message:
    java.io.IOException: Server returned HTTP response code: 407 for URL: http://htmldb.oracle.com/pls/otn/f?p=38606:2
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1149)
         at oracle.ideimpl.webupdate.CheckMasterListRunnable.run(CheckMasterListRunnable.java:131)
         at java.lang.Thread.run(Thread.java:595)
    Using the same URL in IE gives the following result:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <centers xmlns="http://xmlns.oracle.com/jdeveloper/update/master">
    - <center id="oracle.sqldeveloper.webupdate.internal">
    <url>http://htmldb.oracle.com/pls/otn/f?p=raptor:internal</url>
    <name>Internal Update Cetner</name>
    <domain>.*\.us.oracle.com</domain>
    </center>
    - <center id="oracle.sqldeveloper.webupdate.otncenter">
    <url>http://htmldb.oracle.com/pls/otn/f?p=raptor:center</url>
    <name>Official Oracle Extensions</name>
    </center>
    </centers>
    What's wrong?
    I'm using sql developer 1.0.0.14.22.
    Martin

    Given that the update centre worked for me with proxy authentication in v1422 (and Production v1467 - I would recommend that you upgrade to this with a full download if you can't sort out your proxy issues), I would assume that it is not a SQL Developer bug.
    Are you still getting HTTP 407 errors when you have entered your username and password?
    Unfortunately, I don't know what username/password expectations a RADIUS based proxy authentication would expect. The only thing I can suggest to try is to explicitly put your username/password in your MS-IE proxy setup and see if you can still access the http://htmldb.oracle.com/pls/otn/f?p=38606:2 URL through IE. If this fails through IE, the username/password that you are supplying are not what the proxy is expecting.

Maybe you are looking for