Is it possible to change the http handler in jax-ws? For example: from weblogic.net.http.HttpURLConnection to sun.net.www.protocol.http.HttpURLConnection.
Asked
Active
Viewed 2,798 times
3
-
1Take a look at http://jersey.java.net/nonav/documentation/latest/client-api.html, which supports HttpURLConnection and Apache HTTPClient. You may be able to use http://jersey.java.net/nonav/documentation/latest/client-api.html with it. Also you shouldn't use classes from package sun.* since they can be removed any time. – Andy Jul 18 '12 at 21:28
2 Answers
7
you can try to using -DUseSunHttpHandler=true
in the weblogic.
manage weblogic by using WLST (non-clustered)
add jvm arguments in the managered server env script under $WLS_DOMAIN_HOME/bin/setDomainEnv.sh
JAVA_OPTIONS=-DUseSunHttpHandler=true
export JAVA_OPTIONS
manage weblogic by using Weblogic console (Clustered)
Add -DUseSunHttpHandler=true
to Arguments in a or b.
In Admin Console navigate to
Home
>Summary of Servers
><managed server name>
>Configuration
>Server Start
Tab.In the config file
$WLS_DOMAIN_HOME/config/config.xml
with xml-pathserver
>server-start
>arguments

Ajax Zhang
- 356
- 3
- 12
1
Implement your own URLConnectionFactory
, which resturns the desired HttpURLConnection
and set it when constructing the Jersey Client.
URLConnectionClientHandler urlConnectionClientHandler = new URLConnectionClientHandler(
new MyURLConnectionFactory());
Client client = new Client(urlConnectionClientHandler);