• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Set Timeout for WebLogic Web Service Client (JAX-WS and JAX-RPC)

by admin

The below options are for timeout only for JAX-WS Web Service clients generated from clientgen:

import javax.xml.ws.BindingProvider;
import javax.xml.ws.handler.MessageContext;
import com.sun.xml.ws.developer.JAXWSProperties;
import com.sun.xml.ws.client.BindingProviderProperties;
/*
The following classes are inside

import com.sun.xml.ws.developer.JAXWSProperties;
import com.sun.xml.ws.client.BindingProviderProperties;

%WLSINSTALLATION%\modules\glassfish.jaxws.rt_1.1.0.0_2-1-4.jar
*/
Map requestContext = ((BindingProvider)port).getRequestContext();
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://<hostname.domain>/HelloWorldImpl/HelloWorldService");
requestContext.put(JAXWSProperties.CONNECT_TIMEOUT, 300);
requestContext.put(BindingProviderProperties.REQUEST_TIMEOUT, 300);

The below options are for timeout only for JAX-RPC Web Service clients generated from clientgen:

import javax.xml.rpc.Stub;

((Stub)port)._setProperty(weblogic.wsee.transport.connection.timeout,2);
((Stub)port)._setProperty(weblogic.wsee.transport.read.timeout,2);

The below options are for timeout not only for Web Service clients but for all clients:

-Dweblogic.https.client.defaultConnectTimeout=xxxx <milisecs>
-Dweblogic.http.client.defaultConnectTimeout=xxxx <milisecs>

-Dweblogic.http.client.defaultReadTimeout=xxxx <miliseconds>

OR

-Dweblogic.webservice.UseWebLogicURLStreamHandler=false
-DUseSunHttpHandler=true
-Dsun.net.client.defaultConnectTimeout=xxxx <milisecs>
-Dsun.net.client.defaultReadTimeout=xxxx <milisecs>

Filed Under: oracle, WebLogic

Some more articles you might also be interested in …

  1. Difference between SQL and SQL*Plus Statements
  2. How to Enable or Disable Veritas ODM for Oracle database 11g
  3. ORA-12547: TNS:lost Contact (Oracle 12c2)
  4. Upgrading to Oracle 12c using RMAN DUPLICATE with “NOOPEN” clause and “BACKUP LOCATION”
  5. How to use Flashback Database in Oracle Data Guard Configuration
  6. How Realms Work in Oracle Database Vault
  7. How to Trace Dynamic Registration from PMON or LREG (Oracle 12c)
  8. Oracle 19c New Feature – Real-Time Statistics
  9. Find Oracle RAC OCR & voting disk location
  10. How to Recover DROPPED PDB After Flashback of CDB

You May Also Like

Primary Sidebar

Recent Posts

  • Chezmoi: A multi-machine dotfile manager, written in Go
  • cheat: Create and view interactive cheat sheets on the command-line
  • chars: Display names and codes for various ASCII and Unicode characters and code points
  • chafa: Image printing in the terminal

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright