Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-4131

Java http proxy settings override programmatic settings

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Incomplete
    • 1.3
    • None
    • None
    • None

    Description

      My code:

      Options options = stub._getServiceClient().getOptions();

      HttpTransportProperties.ProxyProperties pp =
      new HttpTransportProperties.ProxyProperties();

      pp.setProxyName(proxyHost);
      pp.setProxyPort(proxyPort);

      options.setProperty(HTTPConstants.PROXY, pp);

      And in other code, not under my control:

      Properties p = System.getProperties( );

      if ( ( null != proxyHost ) && ( null != proxyPort ) )
      {
      p.setProperty( "http.proxySet", "true" );

      if ( null != proxyHost )
      p.setProperty( "http.proxyHost", proxyHost );

      if ( null != proxyPort )
      p.setProperty( "http.proxyPort", proxyPort );
      }

      This leads to an inexplicable failure to connect through the proxy, because the second bit of code is using different proxy settings that won't work in the Axis2 WS call. For now, I can work around this bug by clearing and re-setting the proxy values just before I call methods in my Stub class, but this is a bit silly.

      Attachments

        Issue Links

          Activity

            People

              veithen Andreas Veithen
              drosenbauer Devin Rosenbauer
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: