TNS-12519: TNS:no appropriate service handler found

A qué se debe este error?..No pasa siempre, pensamos que era por la cantidad de conexiones activas que había en un determinado momento y las aumentamos de 150 a 300, y cuando se acercó a esa cifra empezó a caerse el servicio de nuevo, tenemos Oracle versión 10.1.0.3
Muchas gracias, espero alguna sugerencia de ustedes colegas.
Saludos

Sounds all spanish to mee. Please try to post in english and your chances for a good response will increase.
cu
Andreas

Similar Messages

  • ORA-12519 TNS:No appropriate service handler found!

    Dear All,
    I am facing a strange problem since yesterday and it happened for 4 times now.
    My database is 10gR2 and Linux is the operating system.
    There is not much load on DB but some users while connecting to DB get this error:
    ORA-12519 TNS : No appropriate service handler found.
    Howe ever there existing sessions remain open and they are fine. Problem is only faced when the new connection if in process.
    I think that maybe some procedure is opening up connection in loop and not closing it at the end, but how to find this procedure.
    This is the output of my processes parameter:
    SQL> show parameter PROCESSES;
    NAME TYPE VALUE
    aq_tm_processes integer 0
    db_writer_processes integer 1
    gcs_server_processes integer 0
    job_queue_processes integer 10
    log_archive_max_processes integer 2
    processes integer 150
    Kindly help.
    Regards, Imran Baig

    Well, I have manually added the entry in bold and restarted the listener. This is my listener.ora file now.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
    (PROGRAM = extproc)
    *(SID_DESC =*
    *(SID_NAME = ORCL)*
    *(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)*
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = db.myserver.private)(PORT = 1521))
    Now This is the status of my listener:
    LSNRCTL> status
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
    Start Date 07-JUL-2011 10:34:14
    Uptime 0 days 0 hr. 6 min. 54 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP ON
    Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
    Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db.myserver.private)(PORT=1521)))
    Services Summary...
    Service "ORCL" has 2 instance(s).
    Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
    Instance "ORCL", status READY, has 1 handler(s) for this service...
    Service "ORCLXDB" has 1 instance(s).
    Instance "ORCL", status READY, has 1 handler(s) for this service...
    Service "ORCL_XPT" has 1 instance(s).
    Instance "ORCL", status READY, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    Now I will have to wait for the error to come again.
    Regards, Imran

  • ORA-12519, TNS:no appropriate service handler found on OdiSqlUnload

    Hi all,
    I'm using OdiSqlUnload in a target code of a procedure, where the output of the source code is the parameter.I'm using the source connection as parameters to the target connections:
    OdiSqlUnload "-FILE=#filename"   "-DRIVER=<%=odiRef.getInfo("SRC_JAVA_DRIVER")%>" "-URL=<%=odiRef.getInfo("SRC_JAVA_URL")%>" "-USER=<%=odiRef.getInfo("SRC_USER_NAME")%>" "-PASS=<%=odiRef.getInfo("SRC_ENCODED_PASS")%>" -FILE_FORMAT=variable "-FIELD_SEP=," "-ROW_SEP=;" "-DATE_FORMAT=yyyyMMddHHmmss"
    It loops ok for a few times but then I get ORA-12519, TNS:no appropriate service handler found error.
    Do you have an idea, or do you think the best way to export the data to csv using regular IKMs?
    Nimrod

    Source:
    SELECT mvno_id, mvno_name
      FROM (SELECT DISTINCT mvno_id, mvno_name
              FROM <?=snpRef.getObjectName("L", "COS_TO_MVNO", "ODI_USER", "", "D") ?>
             WHERE EXISTS
                      (SELECT 1
                         FROM <?=snpRef.getObjectName("L", "CDRS_TO_EXPORT", "ODI_USER", "", "D") ?>
                        WHERE CDRS_TO_EXPORT.mvno_id = COS_TO_MVNO.mvno_id))
    Target:
    OdiSqlUnload "-FILE=#V_BASE_DIR/#MVNO_NAME/gprs/GPRS_#WHOLESALE_SEQ_NEXTVAL.csv"   "-DRIVER=<%=odiRef.getInfo("SRC_JAVA_DRIVER")%>" "-URL=<%=odiRef.getInfo("SRC_JAVA_URL")%>" "-USER=<%=odiRef.getInfo("SRC_USER_NAME")%>" "-PASS=<%=odiRef.getInfo("SRC_ENCODED_PASS")%>" -FILE_FORMAT=variable "-FIELD_SEP=," "-ROW_SEP=;" "-DATE_FORMAT=yyyyMMddHHmmss"  "-DATE_FORMAT=yyyyMMddHHmmss"
    WITH Samso_NPA_NXX_VH
         AS (SELECT HOME_SID, npa, nxx
               FROM <?=snpRef.getObjectName("L", "SAMSON_NPA_NXX_VH", "REPORT", "", "D") ?>
              WHERE expiration_date IS NULL)
    SELECT Event_Parameter1,
           #MVNO_ID,
           wholesale_seq.NEXTVAL,
           event_parameter14,
           event_parameter17,
           Answer_Time,
           Event_Parameter18,
           Event_Parameter15,
           (SELECT HOME_SID
              FROM Samso_NPA_NXX_VH
             WHERE NPA || NXX = SUBSTR (Event_Parameter17, 0, 6)),
           NULL,
           Event_Parameter19,
           NULL,
           NULL,
           Event_Parameter5,
           Event_Parameter13,
           NULL,
           Event_Parameter4,
           PRICE_ITEM_ID1,
           Event_Parameter5 * Event_Parameter14,
           Event_Parameter4,
           Event_Parameter23,
           Event_Parameter20,
           Event_Parameter21,
           BILLING_NUMBER,
           transaction_time,
           Event_Parameter24,
           Event_Parameter22
      FROM <?=snpRef.getObjectName("L", "CDR_PARTITIONED", "USAGE", "", "D") ?>, <?=snpRef.getObjectName("L", "CDRS_TO_EXPORT", "ODI_USER", "", "D") ?>
    WHERE     UPPER (Event_Parameter1) = 'DATA'
           AND <?=snpRef.getObjectName("L", "CDR_PARTITIONED", "USAGE", "", "D") ?>.transaction_time =
                  <?=snpRef.getObjectName("L", "CDRS_TO_EXPORT", "ODI_USER", "", "D") ?>.day
           AND <?=snpRef.getObjectName("L", "CDR_PARTITIONED", "USAGE", "", "D") ?>.SERVER_ID =
                  <?=snpRef.getObjectName("L", "CDRS_TO_EXPORT", "ODI_USER", "", "D") ?>.SERVER_ID
           AND <?=snpRef.getObjectName("L", "CDR_PARTITIONED", "USAGE", "", "D") ?>.SYS_DR_NUMBER =
                  <?=snpRef.getObjectName("L", "CDRS_TO_EXPORT", "ODI_USER", "", "D") ?>.sys_dr_number
           AND <?=snpRef.getObjectName("L", "CDR_PARTITIONED", "USAGE", "", "D") ?>.parent =
                  <?=snpRef.getObjectName("L", "CDRS_TO_EXPORT", "ODI_USER", "", "D") ?>.parent
           AND <?=snpRef.getObjectName("L", "CDR_PARTITIONED", "USAGE", "", "D") ?>.child_index =
                  <?=snpRef.getObjectName("L", "CDRS_TO_EXPORT", "ODI_USER", "", "D") ?>.child_index
           AND <?=snpRef.getObjectName("L", "CDR_PARTITIONED", "USAGE", "", "D") ?>.BILL_CYCLE_ID =
                  <?=snpRef.getObjectName("L", "CDRS_TO_EXPORT", "ODI_USER", "", "D") ?>.bill_cycle_id
           AND <?=snpRef.getObjectName("L", "CDR_PARTITIONED", "USAGE", "", "D") ?>.LRE_ID =
                  <?=snpRef.getObjectName("L", "CDRS_TO_EXPORT", "ODI_USER", "", "D") ?>.lre_id
           AND <?=snpRef.getObjectName("L", "CDRS_TO_EXPORT", "ODI_USER", "", "D") ?>.mvno_id = #MVNO_ID

  • ORA-12519: TNS:no appropriate service handler found tips

    i have faced this error when i am insert data by using for loop for 200 rows .
    ORA-12519: TNS:no appropriate service handler found tips
    i select the this query but how can i solve this problem.
    select * from v$resource_limit where resource_name = 'processes';
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION LIMIT_VALUE
    processes           148           150               150   i mean which value should i update.
    regards
    Ayham
    Edited by: Ayham on Nov 28, 2012 9:57 PM

    Ayham wrote:
    i have faced this error when i am insert data by using for loop for 200 rows .What are you trying to do, can you plz post the process which u were trying to run..?
    Also why do u want to update oracle parameters instead of solving the base issue.
    Oracle docs note this about ORA-12519:
    ORA-12519: TNS:no appropriate service handler found
    Cause: The listener could not find any available service handlers that are appropriate for the client connection.
    Action: Run "lsnrctl services" to ensure that the instance(s) have registered with the listener, and are accepting connections.
    This is something about the error. Try the action point there.
    Cheers,
    Manik.

  • ORA-12519, TNS:no appropriate service handler found Please solve

    Dear Experts,
    Please solve this Error
    ORA-12519, TNS:no appropriate service handler found

    Hi,
    Please check weather the remote server is runing
    Rg
    Sak

  • ORA-12519: TNS:no appropriate service handler found (DBD ERROR: OCIServerAt

    Hello All,
    I get this error message via GRID on one of my 11g (11.1.0.6) database. LSNRCTL shows all is normal. It clears itself and intermittently appears at its leisure. Any clue?
    Thanks,
    JY

    The "DBD ERROR: OCIServerAttach" says its a perl trying to connect.
    This note https://metalink.oracle.com/metalink/plsql/f?p=130:14:3959056658989306518::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,456700.1,1,1,1,helvetica suggests that the processes parameter in the database is not set correctly.
    Are you running out of processes on your DB?
    If you think they are OK then take a look at note https://metalink.oracle.com/metalink/plsql/f?p=130:14:3959056658989306518::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,240710.1,1,0,1,helvetica and try debugging "Intermittent TNS-12516 or TNS-12519 Errors Connecting Via Net".

  • BO Data Services 3.2-Job fails with 'TNS:No appropriate service handler err

    Hello all -
    One of our DS jobs has started failing intermittently showing the following error in its log:
    Data flow DataFlow_1 - OCI call <OCIServerAttach> for connection <abc> failed: <ORA-12519: TNS:no appropriate service handler found>.
    This  has started happening recently after we've upgraded the repository database form Oracle 10g to Oracle 11g (11.1.0.6).  The source   and target are also 11g.    
    If anyone has encountered this error before, please can you provide some pointers on how to troubleshoot/resolve this.
    TIA.
    Regards,
    Tarun.

    I have found this thread which talks nearly same about your issue.
    TNS:listener could not find available handler witht matching protocol stack
    The session count has to be decreased, that is the crux that comes out from this thread.
    Listener some how have a count of the incoming connection request. If that number tries to go beyond process parameter value,this error is reported.Now I amnot sure that why this is happening in your case as the parameter value is already higher than the incoming connections.
    And voilla!You are using XE I believe so its a bug in it. Read this thread,
    Re: Intermittent ORA-12519 error on 10g XE
    HTH
    Aman....

  • ORA-12519 TNS NO APPROPRIATE SERVICE HANDLER - ERROR

    Hi,
    We are using JDeveloper 11g for developing our web applications in our company and connecting oracle database through DB Connectivity option. We give the informations like username, password, hostname, sid, port number for getting the DB connectivity and developing web applications through ADF Faces in JDeveloper 11g, and around 25 people are getting connected to Database and developing their respective pages.
    For first 30 minutes there is no DB problem, working quitely. After 30 minutes we are getting the error ORA-12519 TNS No appropriate service handler error, we tried to solve this problem by raising process number to 200 in init.ora file and killed the inactive sessions by getting session id from V$session table and restarted the DB Server. But still we are having this problem ORA-12519, after 30 minutes of starting the DB Server.
    Can anyone suggest or help to overcome this problem ORA-12519.
    Thanks
    Saravanan N
    Edited by: user11100608 on May 21, 2009 11:25 PM

    See if metalink note 552765.1 helps you in this case.

  • No service handler found

    Hi
    What does "ORA-12519: TNS: no appropiate service handler found" mean? I get this message while tring to connect to a database in the Oracle 9i r2 console.
    Steve

    I just installed the 9i OEM on linux and I'm trying to connect to Oracle 8 running on a solaris box. I setup the database, but when I try to connect I get the error "ORA-12519: TNS:no appropriate service handler found". No clue is too small... Trust me. bash-2.03$ oerr ora 12519
    12519, 00000, "TNS:no appropriate service handler found"
    // *Cause: The listener could not find any available service handlers that
    // are appropriate for the client connection.
    // *Action: Run "lsnrctl services" to ensure that the instance(s) have
    // registered with the listener, and are accepting connections.
    The problem is in your listener (listener.ora) configuration. The easiest way to fix it
    is to use the net 8 assistant to configure the listener on the server side and verify it
    is listening by running lsnrctl services.
    William

  • Can't login to Apex (3.0.1.00.12.) - TNS-12519: TNS:no appropriate service

    Hello Everyone,
    I have installed Oracle Applications Release 12.1.1 (RDBMS: 11.1.0.7.0) on Oracle Enterprise Linux
    (2.6.18-128.el5PAE).
    I have configured Apex (3.0.1.00.12.) & EPG successful by this guide (+ metalink note).
    http://www.oracle.com/technology/obe/11gr1_db/install/apexinst/apexinst.htm
    https://metalink2.oracle.com/metalink/plsql/showdoc?db=NOT&id=457621.1&blackframe=1
    (How to Configure Oracle Application Express (APEX) & the Embedded PL/SQL Gateway (EPG) in an 11G DB / Doc ID:
    457621.1)
    Unfortunately I can't access to login and admin pages.
    Appreciate your help.
    Best, Laszlo
    Edited by: user2463324 on 2009.06.24. 5:20

    Hi All,
    I was on holiday last week.
    Unfortunately the problem still exists.
    I have checked the alert log, there is no error.
    Listener seems to me ok:
    "[oracle@misr12 admin]$ lsnrctl status
    LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 24-JUN-2009 13:12:20
    Copyright (c) 1991, 2008, Oracle. All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    STATUS of the LISTENER
    Alias VIS
    Version TNSLSNR for Linux: Version 11.1.0.7.0 - Production
    Start Date 24-JUN-2009 12:35:46
    Uptime 0 days 0 hr. 36 min. 34 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /opt/oracle/VIS/db/tech_st/11.1.0/network/admin/VIS_misr12/listener.ora
    Listener Log File /opt/oracle/VIS/db/tech_st/11.1.0/log/diag/tnslsnr/misr12/vis/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=misr12.mis.zrt)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=misr12.mis.zrt)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    Services Summary...
    Service "VIS" has 2 instance(s).
    Instance "VIS", status UNKNOWN, has 1 handler(s) for this service...
    Instance "VIS", status READY, has 1 handler(s) for this service...
    Service "VIS_XPT" has 1 instance(s).
    Instance "VIS", status READY, has 1 handler(s) for this service...
    The command completed successfully"
    At the moment, I'm not planning to use EBS R12 to handle the authentication for APEX, maybe later, but thank you for your info.
    Do you have any idea?

  • TNS Listener: Entry Point Not Found

    First I installed 8.1.6 Personal edition
    on my laptop (NT4 SP5):
    Folder: d:\orant.
    Oracle Home: DEFAULT_HOME
    That went fine. I could connect to the database with SQLPLUS, DBA etc.
    Then I tried to install Portal using:
    Folder: d:\9iAS
    Oracle Home: iSuites
    Spent three days trying to get Portal to install ok. Have finally got through the installation of 9iAS (HTTP Server Only), which the Universal Installer claims to be successfull.
    Started the Apache Server and tried to connect to the portal. I get the following error message:
    Proxy log On failed.
    Please verify that you have specified correct connectivity information i.e.username, password & connect-string in the Database Access Descriptor
    Error-Code:12154
    Error TimeStamp:Tue, 23 Jan 2001 23:20:00 GMT
    Database Log In Failed
    TNS could not resolve service name
    Verify that the TNS name in the connectstring entry of the DAD for this URL is valid.
    I can access the admin page:
    http://<machine>:80/pls/admin_/
    To debug this I tried to connect to the database with SQLPLUS and I got this error message:
    I:\>sqlplus
    SQL*Plus: Release 8.1.7.0.0 - Production on Tue Jan 23 16:08:58 2001
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    Enter user-name: system
    Enter password:
    ERROR:
    ORA-12560: TNS:protocol adapter error
    Enter user-name:
    Checked my Services and found that the TNS listener was not started. When I try to start the OracleDEFAULT_HOMETNSListener in my Services I get the following error message:
    TNSLSNR.exe - Entry Point Not Found
    The procedure entry point snlpcgtsrvbynm could not be located in the dynamic link library oranl8.dll.
    I have tried swicthing my primary Oracle Home using the Home Selector. Did not help.
    Shouldn't the TNS listener be started, or?
    Any ideas what to check?

    I have found the solution of my problem from Oracle9i Portal's Configuration Guide , the troubleshooting part. The document can be found in the Oralce9i Documentation web site.
    The problem is that I set the incorrect information in my tnsnames.ora file when installing Oracle9i Portal.
    The solution is set the host name, port number and SID in the tnsnames.ora file. This file is located at
    \Oracle_Home\network\admin\
    Here is the example of the content in that file:
    PORTALDB_MyHost =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = MyHost)(PORT = 1521))
    (CONNECT_DATA = (SID = PortalDB)(SERVER = DEDICATED))
    INST1_HTTP =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = MyHost)(PORT = 1521))
    (CONNECT_DATA = (SERVER = SHARED)(SERVICE_NAME = PortalDB)(PRESENTATION = http://admin))
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA = (SID = PLSExtProc)(PRESENTATION = RO))
    ---------------------------------------------

  • ORA-12154 - TNS couldnt resolve service name

    I have created the following db link :
    CREATE DATABASE LINK RAN.WORLD
    CONNECT TO <>
    IDENTIFIED BY <>
    USING 'DCCCSN1'
    select * from [email protected]
    This gives ORA-12154 - TNS couldnt resolve service name
    Can someoen advice regarding this please ? I can use the user id and password used to create the db link to connect to the database .Also from command prompt TNSPING DCCCSN1 -also works .So there should be nothing wrong with the TNS entries .Thanks .

    Just want to emphasize on the same point Legatti mentioned.
    The tns entry you mentioned must exist in the tnsnames.ora of the server where the your database (where the dblink has been created) resides.
    Lot of times people think that the tns entry is required on the machine you running the command from, which is wrong.
    Thanks,
    Ankit.

  • TNS-12560: Message 12560 not found; No message file for product=NETWORK

    I have downloaded and installed the SQL *Plus client software from the URL http://www.oracle.com/technology/tech/sql_plus/index.html
    This should help me connect to the Oracle database
    Following is the error I have in the sqlnet.log file (located at C:\oracle\product\10.2.0\client_1\BIN)
    Fatal NI connect error 12560, connecting to:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oracleORCL)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=ORCL)(CID=(PROGRAM=C:\oracle\product\10.2.0\client_1\BIN\sqlplus.exe)(HOST=PEM270639IC)(USER=mattut))))
    VERSION INFORMATION:
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 10.2.0.1.0 - Production
    Time: 10-SEP-2007 10:45:13
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12560
    TNS-12560: Message 12560 not found; No message file for product=NETWORK, facility=TNS
    ns secondary err code: 0
    nt main err code: 530
    TNS-00530: Message 530 not found; No message file for product=NETWORK, facility=TNS
    nt secondary err code: 126
    nt OS err code: 0

    Where are you trying to connect to?
    If you want a local database you must down and install for example the Oracle 10 Express

  • Web service handler could not called in client web service

    Hi All,
    I have two web service ServiceA & ServiceB and both implemented in weblogic.
    The ServiceA is SSL enable and protocol is https which is not published by me.
    The ServieB is my web service(wls8.1) and act as client for ServiceA.
    My problem is when i hit my service, its not able set the handler when it call ServiceA but it is invoking the service and giving application exception like authentication error.
    My service file:
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.rpc.handler.HandlerRegistry;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    import weblogic.webservice.client.SSLAdapterFactory;
    import weblogic.webservice.client.WLSSLAdapter;
    public class HelloService {
    String wsdl = "https://188.122.123.23/RemoetService?WSDL";
    static {
    SSLAdapterFactory factory = SSLAdapterFactory.getDefaultFactory();
    WLSSLAdapter adapter = (WLSSLAdapter) factory.getSSLAdapter();
    adapter.setTrustedCertificatesFile("D:\\lib\\certs
    cacerts");
    factory.setDefaultAdapter(adapter);
    System.setProperty("weblogic.xml.encryption.verbose","true");
    System.setProperty("weblogic.xml.signature.verbose","true");
    System.setProperty("weblogic.webservice.verbose","true");
    public String sayHello(String user) {
    RemoteService_Impl service = new RemoteService_Impl(wsdl);
    RemotePortType port = service.getRemoteServicePort1();
    String namespace = service.getServiceName()
    .getNamespaceURI();
    QName portName = new QName(namespace,
    "RemoteServicePortType");
    HandlerRegistry reg = service.getHandlerRegistry();
    List handlerList = new ArrayList();
    Map map = new HashMap();
    map.put("Username", "user1");
    map.put("Password", "pwd1");
    HandlerInfo info = new HandlerInfo();
    info.setHandlerClass(WSClientHandler .class);
    info.setHandlerConfig(map);
    handlerList.add(info);
    reg.setHandlerChain(portName,(List)handlerList);
    RemoteServiceResponse = port.callMe(name);
    My Handler file:
    package com.test;
    import java.util.Map;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.Handler;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.rpc.handler.MessageContext;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    import javax.xml.soap.Name;
    import javax.xml.soap.SOAPElement;
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPException;
    import javax.xml.soap.SOAPHeader;
    import javax.xml.soap.SOAPHeaderElement;
    public class WSClientHandler implements Handler {
    private HandlerInfo handlerInfo;
    public WSClientAuthenticateHandler(){}
    public void init(HandlerInfo hi) {
    System.out.println("Handler init");
    handlerInfo = hi;
    public void destroy() {
    System.out.println("Handler destroy method called");
    handlerInfo = null;
    public QName[] getHeaders() {
    System.out.println("Handler Header method called");
    try {
    Map map = handlerInfo.getHandlerConfig();
    QName[] headers = handlerInfo.getHeaders();
    System.out.println(" Config :"+map);
    for(int i=0;i<headers.length;i++) {
    System.out.println(headers.getLocalPart()+" "+
    headers.toString()+" "+headers.getNamespaceURI());
    }catch(Exception e) {
    e.printStackTrace();
    return handlerInfo.getHeaders();
    public boolean handleRequest(MessageContext mc) {
    SOAPMessageContext smc = (SOAPMessageContext) mc;
    System.out.println("Calling handler class.....................");
    try {
    SOAPEnvelope se = smc.getMessage().getSOAPPart().getEnvelope();
    System.out.println("Calling handler class.....................");
    SOAPHeader soapHeader = se.getHeader();
    Name headerName = se.createName("Security","wsse","http://schemas.xmlsoap.org/ws/2002/07/secext");
    SOAPHeaderElement headerElement = soapHeader.addHeaderElement(headerName);
    SOAPElement element = headerElement.addChildElement(se.createName("UsernameToken", "wsse", "http://schemas.xmlsoap.org/ws/2002/07/secext"));
    element.addChildElement(se.createName("Username", "wsse","http://schemas.xmlsoap.org/ws/2002/07/secext")).addTextNode("testuser");
    element.addChildElement(se.createName("Password", "wsse","http://schemas.xmlsoap.org/ws/2002/07/secext")).addTextNode("testpwd");
    System.out.println("Calling handler class.....................");
    System.out.println("** Request: \n "se.toString()"\n");
    }catch(SOAPException e) {
    e.printStackTrace();
    return true;
    /** * Specifies that the SOAP response message be logged to a
    * log file before the
    * * message is sent back to the client application
    * that invoked the Web service.
    public boolean handleResponse(MessageContext mc) {
    System.out.println("Handler Response method called");
    SOAPMessageContext messageContext = (SOAPMessageContext) mc;
    System.out.println("** Response: \n"messageContext.getMessage().toString()"\n");
    return true;
    /** * Specifies that a message be logged to the log file if a SOAP fault is
    * * thrown by the Handler instance.
    public boolean handleFault(MessageContext mc) {
    SOAPMessageContext messageContext = (SOAPMessageContext) mc;
    System.out.println("** Fault: \n"messageContext.getMessage().toString()"\n");
    return true;
    Please need help here.
    Thanks in Advance,
    pps

    I have tested static client calling using handler simple above service and found the issues.
    QName portName = new QName(namespace,
    "*RemoteServicePortType*");
    The above line code has created the issues,becuase in wsdl file ( given similar wsdl file).
    <?xml version="1.0"; encoding="UTF-8"?>
    <definitions name="HelloService"
    targetNamespace="http://www.ecerami.com/wsdl/HelloService.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://www.ecerami.com/wsdl/HelloService.wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <message name="SayHelloRequest">
    <part name="firstName" type="xsd:string"/>
    </message>
    <message name="SayHelloResponse">
    <part name="greeting" type="xsd:string"/>
    </message>
    *<portType name="RemoteServicePortType">*
    <operation name="sayHello">
    <input message="tns:SayHelloRequest"/>
    <output message="tns:SayHelloResponse"/>
    </operation>
    </portType>
    <binding name="Hello_Binding" type="tns:*RemoteServicePortType*">
    <soap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="sayHello">
    <soap:operation soapAction="sayHello"/>
    <input>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="urn:examples:helloservice"
    use="encoded"/>
    </input>
    <output>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="urn:examples:helloservice"
    use="encoded"/>
    </output>
    </operation>
    </binding>
    <service name="Hello_Service">
    <port binding="tns:Hello_Binding" name="*RemoteServicePortType1*">
    <soap:address
    location="http://host1:8080/soap/servlet/rpcrouter"/>
    </port>
    <port binding="tns:Hello_Binding" name="*RemoteServicePortType2*">
    <soap:address
    location="http://host2:8080/soap/servlet/rpcrouter"/>
    </port>
    <port binding="tns:Hello_Binding" name="*RemoteServicePortType3*">
    <soap:address
    location="http://host3:8080/soap/servlet/rpcrouter"/>
    </port>
    <port binding="tns:Hello_Binding" name="*RemoteServicePortType4*">
    <soap:address
    location="http://host4:8080/soap/servlet/rpcrouter"/>
    </port>
    </service>
    </definitions>
    From the above WSDL, I have four port name (port binding="tns:Hello_Binding" name="*RemoteServicePortType1*) which is not matching with PortType (portType name="*RemoteServicePortType*")
    even i have iterated from getPorts() method and used to invoke the service.But handler was not calling when i invoke.
    Please guide me here how i specify correct portname which can call Handler class also.
    Thanks in advance,
    pps

  • Web service handler could not registered/called in client web service

    Hi Expert,
    I have two web service ServiceA & ServiceB and both implemented in weblogic.
    The ServiceA is SSL enable and protocol is https which is not published by me.
    The ServieB is my web service(wls8.1) and act as client for ServiceA.
    My problem is when i hit my service, its not able set the handler when it call ServiceA but it is invoking the service and giving application exception like authentication error.
    My service file:
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.rpc.handler.HandlerRegistry;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    import weblogic.webservice.client.SSLAdapterFactory;
    import weblogic.webservice.client.WLSSLAdapter;
    public class HelloService {
    String wsdl = "https://188.122.123.23/RemoetService?WSDL";
    static     {
              SSLAdapterFactory factory =                SSLAdapterFactory.getDefaultFactory();
              WLSSLAdapter adapter = (WLSSLAdapter)     factory.getSSLAdapter();
              adapter.setTrustedCertificatesFile("D:\\lib\\certs\\cacerts");
              factory.setDefaultAdapter(adapter);
              System.setProperty("weblogic.xml.encryption.verbose","true");
              System.setProperty("weblogic.xml.signature.verbose","true");
              System.setProperty("weblogic.webservice.verbose","true");
         public String sayHello(String user) {
              RemoteService_Impl service = new RemoteService_Impl(wsdl);
              RemotePortType port = service.getRemoteServicePort1();
              String namespace = service.getServiceName()
                        .getNamespaceURI();
              QName portName = new QName(namespace,
                        "RemoteServicePortType");
              HandlerRegistry reg = service.getHandlerRegistry();
              List handlerList = new ArrayList();
              Map map = new HashMap();
              map.put("Username", "user1");
              map.put("Password", "pwd1");
              HandlerInfo info = new HandlerInfo();
              info.setHandlerClass(WSClientHandler .class);
              info.setHandlerConfig(map);
              handlerList.add(info);
              reg.setHandlerChain(portName,(List)handlerList);
              RemoteServiceResponse = port.callMe(name);
    My Handler Class:
    package com.test;
    import java.util.Map;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.Handler;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.rpc.handler.MessageContext;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    import javax.xml.soap.Name;
    import javax.xml.soap.SOAPElement;
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPException;
    import javax.xml.soap.SOAPHeader;
    import javax.xml.soap.SOAPHeaderElement;
    public class WSClientHandler implements Handler {
         private HandlerInfo handlerInfo;
         public WSClientAuthenticateHandler(){}
         public void init(HandlerInfo hi) {   
              System.out.println("Handler init");
              handlerInfo = hi;
         public void destroy() {
              System.out.println("Handler destroy method called");
              handlerInfo = null;
         public QName[] getHeaders() {
              System.out.println("Handler Header method called");
              try     {
                   Map map = handlerInfo.getHandlerConfig();
                   QName[] headers = handlerInfo.getHeaders();
                   System.out.println(" Config :"+map);
                   for(int i=0;i<headers.length;i++)     {
                        System.out.println(headers.getLocalPart()+" "+
                        headers[i].toString()+" "+headers[i].getNamespaceURI());
              }catch(Exception e)     {
                   e.printStackTrace();
              return handlerInfo.getHeaders();
         public boolean handleRequest(MessageContext mc) {   
              SOAPMessageContext smc = (SOAPMessageContext) mc;
              System.out.println("Calling handler class.....................");
              try     {
              SOAPEnvelope se =      smc.getMessage().getSOAPPart().getEnvelope();
              System.out.println("Calling handler class.....................");
         SOAPHeader soapHeader = se.getHeader();
         Name headerName = se.createName("Security","wsse","http://schemas.xmlsoap.org/ws/2002/07/secext");
         SOAPHeaderElement headerElement = soapHeader.addHeaderElement(headerName);
         SOAPElement element = headerElement.addChildElement(se.createName("UsernameToken", "wsse", "http://schemas.xmlsoap.org/ws/2002/07/secext"));
         element.addChildElement(se.createName("Username", "wsse","http://schemas.xmlsoap.org/ws/2002/07/secext")).addTextNode("testuser");
         element.addChildElement(se.createName("Password", "wsse","http://schemas.xmlsoap.org/ws/2002/07/secext")).addTextNode("testpwd");
         System.out.println("Calling handler class.....................");
                   System.out.println("** Request: \n "+se.toString()+"\n");
              }catch(SOAPException e)     {
                   e.printStackTrace();
              return true;
         /** * Specifies that the SOAP response message be logged to a
         * log file before the
         * * message is sent back to the client application
         * that invoked the Web service.
         public boolean handleResponse(MessageContext mc) {  
              System.out.println("Handler Response method called");
              SOAPMessageContext messageContext = (SOAPMessageContext) mc;
              System.out.println("** Response: \n"+messageContext.getMessage().toString()+"\n");
              return true;
         /** * Specifies that a message be logged to the log file if a SOAP fault is
         * * thrown by the Handler instance.
         public boolean handleFault(MessageContext mc) {   
              SOAPMessageContext messageContext = (SOAPMessageContext) mc;
              System.out.println("** Fault: \n"+messageContext.getMessage().toString()+"\n");
              return true;
    Please need help here.
    Thanks in Advance,
    pps

    I have tested static client calling using handler simple above service and found the issues.
    QName portName = new QName(namespace,
    *"RemoteServicePortType");*
    The above line code has created the issues,becuase in wsdl file ( given similar wsdl file).
    <?xml version="1.0"; encoding="UTF-8"?>
    <definitions name="HelloService"
    targetNamespace="http://www.ecerami.com/wsdl/HelloService.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://www.ecerami.com/wsdl/HelloService.wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <message name="SayHelloRequest">
    <part name="firstName" type="xsd:string"/>
    </message>
    <message name="SayHelloResponse">
    <part name="greeting" type="xsd:string"/>
    </message>
    <portType name="*RemoteServicePortType*">
    <operation name="sayHello">
    <input message="tns:SayHelloRequest"/>
    <output message="tns:SayHelloResponse"/>
    </operation>
    </portType>
    <binding name="Hello_Binding" type="tns:*RemoteServicePortType*">
    <soap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="sayHello">
    <soap:operation soapAction="sayHello"/>
    <input>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="urn:examples:helloservice"
    use="encoded"/>
    </input>
    <output>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="urn:examples:helloservice"
    use="encoded"/>
    </output>
    </operation>
    </binding>
    <service name="Hello_Service">
    +<port binding="tns:Hello_Binding" name="*RemoteServicePortType1*">+
    +<soap:address+
    location="http://host1:8080/soap/servlet/rpcrouter"/>
    +</port>+
    +<port binding="tns:Hello_Binding" name="*RemoteServicePortType2*">+
    +<soap:address+
    location="http://host2:8080/soap/servlet/rpcrouter"/>
    +</port>+
    +<port binding="tns:Hello_Binding" name="*RemoteServicePortType3*">+
    +<soap:address+
    location="http://host3:8080/soap/servlet/rpcrouter"/>
    +</port>+
    +<port binding="tns:Hello_Binding" name="*RemoteServicePortType4*">+
    +<soap:address+
    location="http://host4:8080/soap/servlet/rpcrouter"/>
    +</port>+
    </service>
    </definitions>
    From the above WSDL, I have four port name (port binding="tns:Hello_Binding" name="*RemoteServicePortType1*) which is not matching with PortType (portType name="*RemoteServicePortType*")
    even i have iterated from getPorts() method and used to invoke the service.But handler was not calling when i invoke.
    Please guide me here how i specify correct portname which can call Handler class also.
    Thanks in advance,
    pps

Maybe you are looking for