Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.6)

Part Number E13941-06

weblogic.wsee.jaxws.proxy
Class ClientProxyFeature

java.lang.Object
  extended by javax.xml.ws.WebServiceFeature
      extended by weblogic.wsee.jaxws.proxy.ClientProxyFeature
All Implemented Interfaces:
Serializable

public class ClientProxyFeature
extends WebServiceFeature
implements Serializable

The WebServiceFeature is used to set proxy infomration for per-connection proxy feature. It is designed for sevice client.
It can be used when getting Port or reseting proxy for an existing Port.

Here are two typical usages on the Feature:
Case 1: Getting port with the ClientProxyFeature

    Service myService = ... //get the Service
    
    //set proxy info to the ClientProxyFeature
    ClientProxyFeature cpf = new ClientProxyFeature();
    cpf.setProxyHost("localhost");
    cpf.setProxyPort(8888);
    cpf.setProxyUserName("proxyu");
    cpf.setProxyPassword("proxyp");
    
    //get the port with the Feature
    MyPort port = myService.getPort(cpf);
    
    //invoke operations with the port, it will using the proxy setting
    ...
 
Case 2: Reseting port with the ClientProxyFeature
     MyPort port = ... // the port is get with or without ClientProxyFeature
     
     ClientProxyFeature cpf = ... // set proxy info
     cpf.setProxyPort(8888);
     
     //attach the feature to port
     cpf.attachsPort(port);
     
     //invoke operations
     ...
     
     
     //upate the feature with new proxy port
     cpf.setProxyPort(9999);
     
     //reset the port with new proxy info
     cpf.attachsPort(port);
     
     //invoke operations with new proxy
     ...
     
 

Note: If you want to set Proxy.NO_PROXY to a port, you can set port with a negative value to the ClientPorxyFeature, as following:
     ClientProxyFeature cpf = ... // set proxy info
     cpf.setProxyPort(-1);
     
     cpf.attachsPort(port);
 
Note: This feature could be used in Service Creation, but it need wait JAX-WS 2.2 fully supported.

Since:
WebLogic 11g PS1
See Also:
Serialized Form

Field Summary
static String ID
           
 
Fields inherited from class javax.xml.ws.WebServiceFeature
enabled
 
Constructor Summary
ClientProxyFeature()
           
 
Method Summary
 void attachsPort(Object port)
          Attachs current ClientProxyFeature to an existing port (override the old proxy info)
 String getID()
           
 String getProxyHost()
           
 String getProxyPassword()
           
 int getProxyPort()
           
 String getProxyUserName()
           
 Proxy.Type getType()
           
 boolean isIgnoreSystemNonProxyHosts()
           
 boolean isUsedInPort()
           
 void setIgnoreSystemNonProxyHosts(boolean ignoreSystemNonProxyHosts)
          To allow the current proxy defined in the feature to ignore the system property -Dhttp.nonProxyHosts
 void setProxyHost(String proxyHost)
           
 void setProxyPassword(String proxyPassword)
           
 void setProxyPort(int proxyPort)
           
 void setProxyUserName(String proxyUserName)
           
 void setType(Proxy.Type type)
          Set Proxy Type.
 
Methods inherited from class javax.xml.ws.WebServiceFeature
isEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values
Constructor Detail

ClientProxyFeature

public ClientProxyFeature()
Method Detail

getProxyHost

public String getProxyHost()

setProxyHost

public void setProxyHost(String proxyHost)

getProxyPassword

public String getProxyPassword()

setProxyPassword

public void setProxyPassword(String proxyPassword)

getProxyPort

public int getProxyPort()

setProxyPort

public void setProxyPort(int proxyPort)

getProxyUserName

public String getProxyUserName()

setProxyUserName

public void setProxyUserName(String proxyUserName)

getType

public Proxy.Type getType()

setType

public void setType(Proxy.Type type)
Set Proxy Type. Default is java.net.Proxy.Type.HTTP

Parameters:
type -

getID

public String getID()
Specified by:
getID in class WebServiceFeature

isUsedInPort

public boolean isUsedInPort()

attachsPort

public void attachsPort(Object port)
Attachs current ClientProxyFeature to an existing port (override the old proxy info)

Parameters:
port -

setIgnoreSystemNonProxyHosts

public void setIgnoreSystemNonProxyHosts(boolean ignoreSystemNonProxyHosts)
To allow the current proxy defined in the feature to ignore the system property -Dhttp.nonProxyHosts


isIgnoreSystemNonProxyHosts

public boolean isIgnoreSystemNonProxyHosts()
Returns:
the ignoreSystemNonProxyHosts

Copyright 1996, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.6)

Part Number E13941-06