Extracting OBJECTGUID using DBMS_LDAP package

Hi,
My final goal of this exercise is to search a LDAP for an objectGUID and get the sAMAccountName of the user.
But to get the things started I'm trying the easier way and doing the reverse..
But when I extract objectGUID by searching for sAMAccountName in LDAP - I get the objectguid in the following two formats.
1. utl.cast_to_raw(substr(temp_vals(i),1,200)): 7E0C3F3F3F3F3F31333F783F
2. substr(temp_vals(i),1,200) : ~ ?????13?x?
But I would like to extract the GUID in the escaped format \7e\0c\3f\3f.................... format and which is 48 characters long. Can someone point me in the right direction as to how I can achieve my result both ways.??
Thanks in Advance
Any Pointers will be appreciated!!

Thanks Justin and Billy for your replies..
Here is the code I'm using. As mentioned earlier I would like to obtain my results in escaped format e.g. (\a6\53\6d\40\03\e6\83\45\ae\9a\32\a5\95\6b\e8\f1)
This is because a third party application stores user id's in the above format and I would like to join my retrieved results from LDAP with it. Once I achieve this I would also like to do the reverse i.e. pass the escaped values and retrieve the user information from LDAP.
Currently when I pass sAMAccountName, I do get the following formats based on what function I use.
1. (SUBSTR(temp_vals(i), 1, 200) -> Results in ~ ?????13?x?
2. utl_raw.cast_to_raw(SUBSTR(temp_vals(i), 1, 200)) -> Results in 7E0C3F3F3F3F3F31333F78EF
I simply cannot escape the values given in step two because I believe both are in different format as binary, raw string etc..
Please let me know if this is achievable ??
  CREATE OR REPLACE PROCEDURE "Schema"."LDAP_PROC" IS
    ldap_host       VARCHAR2(512);          -- The LDAP Directory Host
    ldap_port       VARCHAR2(512);          -- The LDAP Directory Port
    ldap_user       VARCHAR2(512);          -- The LDAP Directory User
  ldap_guid VARCHAR2(512); -- To store the GUID
    ldap_passwd     VARCHAR2(512);          -- The LDAP Directory Password
    ldap_baseDN     VARCHAR2(512);          -- The starting (base) DN
    retval          PLS_INTEGER;            -- Used for all API return values.
    my_session      DBMS_LDAP.SESSION;      -- Used to store our LDAP Session
    res_attrs       DBMS_LDAP.STRING_COLLECTION;    -- A String Collection used
                                                    --   to specify which
                                                    --   attributes to return
                                                    --   from the search.
                                                    --   attribute.
search_filter   VARCHAR2(512);          -- A simple character string used to
                                            --   store the filter (criteria) for
                                            --   the search.
    res_message     DBMS_LDAP.MESSAGE;      -- Used to store the message
                                            --   (results) of the search.
    temp_entry      DBMS_LDAP.MESSAGE;      -- Used to store entries retrieved
                                            --   from the LDAP search to print
                                            --   out at a later time.
    entry_index     PLS_INTEGER;            -- Used as a counter while looping
                                            --   through each entry. As we
                                            --   retrieve an entry from the LDAP
                                            --   directory, we increase the
                                            --   counter by one.
    temp_dn         VARCHAR2(512);          -- After each entry is retrieved
                                            --   from the LDAP directory (from
                                            --   the search), we want to use
                                            --   this variable to extract, store
                                            --   and print out the DN for each
                                            --   entry.
    temp_attr_name  VARCHAR2(512);          -- After retrieving an entry from
                                            --   LDAP directory, we will want to
                                            --   walk through all of the
                                            --   returned attributes. This
                                            --   variable will be used to store
                                            --   each attribute name as we loop
                                            --   through them.
    temp_ber_elmt   DBMS_LDAP.BER_ELEMENT;
    attr_index      PLS_INTEGER;            -- Used as a counter variable for
                                            --   each entry returned for each
                                            --   entry.
   temp_vals       DBMS_LDAP.STRING_COLLECTION;    -- Used to extract, store,
  --  temp_vals       DBMS_LDAP.BINVAL_COLLECTION;                                                --   and print each of the
                                                    --   values from each
                                                    --   attribute.
BEGIN
    DBMS_OUTPUT.ENABLE(1000000);
    retval := -1;
     ldap_host    := 'LDAP_Server_name';
    ldap_port    := '389';
    ldap_user    := 'Username';
    ldap_passwd  := 'Password';
    ldap_baseDN  := 'DC=XXX,DC=XX,DC=XX';
    -- Print out variables.
    DBMS_OUTPUT.PUT_LINE('DBMS_LDAP Search Example');
    DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------------------------');
    DBMS_OUTPUT.PUT_LINE(RPAD('LDAP Host ', 25, ' ') || ': ' || ldap_host);
    DBMS_OUTPUT.PUT_LINE(RPAD('LDAP Port ', 25, ' ') || ': ' || ldap_port);
    DBMS_OUTPUT.PUT_LINE(RPAD('LDAP User ', 25, ' ') || ': ' || ldap_user);
    DBMS_OUTPUT.PUT_LINE(RPAD('LDAP Base ', 25, ' ') || ': ' || ldap_baseDN);
     DBMS_LDAP.USE_EXCEPTION := TRUE;
    -- Obtain an LDAP session. The init() function initializes a session with an
    -- LDAP server. This actually establishes a connection with the LDAP server
    -- and returns a handle to the session which can be used for further
    -- calls into the API.
    my_session := DBMS_LDAP.INIT(ldap_host, ldap_port);
    DBMS_OUTPUT.PUT_LINE (
        RPAD('LDAP Session ', 25, ' ') || ': ' ||
        RAWTOHEX(SUBSTR(my_session, 1, 16)) ||
        ' - (returned from init)'
    -- Bind to the directory. The function simple_bind_s can be used to perform
    -- simple username/password based authentication to the directory server.
    -- The username is a directory distinguished name. This function can be
    -- called only after a valid LDAP session handle is obtained from a call to
    -- DBMS_LDAP.init(). If the connection was successful, it will return:
    -- DBMS_LDAP.SUCCESS. This function can raise the following exceptions:
    --      invalid_session : Raised if the session handle ld is invalid.
    --      general_error   : For all other errors. The error string associated
    --                        with this exception will explain the error in
    --                        detail.
    retval := DBMS_LDAP.SIMPLE_BIND_S(my_session, ldap_user, ldap_passwd);
    DBMS_OUTPUT.PUT_LINE(
        RPAD('simple_bind_s Returned ', 25, ' ') || ': '|| TO_CHAR(retval)
    -- Before actually performing the sort, I want to setup the attributes I
    -- would like returned. To do this, I declared a "String Collection" that
    -- will be used to store all of the attributes I would like returned.
    --      If I wanted to return all attributes, I would specify:
    --          res_attrs(1) := '*';
    --      If I wanted multiple (specified) attributes, I would specify:
    --          res_attrs(1) := 'cn';
    --          res_attrs(2) := 'loginShell';
    --res_attrs(1) := 'uid';
   -- res_attrs(2) := 'cn';
    res_attrs(1) := 'objectGUID';
   -- res_attrs(2) := 'sAMAccountName';
    -- Finally, before performing the actual search, I want to specify the
    -- criteria I want to search on. This will be passed as the "filter"
    -- parameter to the actual search.
    --      If you wanted all of the entries in the directory to be returned,
    --      you could simply specify:
    --          search_filter   := 'objectclass=*';
    --      You could also refine your search my specify a criteria like the
    --      following:
    --          search_filter   := 'cn=*Hunter*';
    search_filter  :=  'sAMAccountName=*282618726*';
    -- Finally, let's issue the search. The function search_s performs a
    -- synchronous search in the LDAP server. It returns control to the PL/SQL
    -- environment only after all of the search results have been sent by the
    -- server or if the search request is 'timed-out' by the server.
    -- Let's first explain some of the incoming parameters:
    --      ld       : A valid LDAP session handle.
    --      base     : The dn of the entry at which to start the search.
    --      scope    : One of SCOPE_BASE     (0x00)
    --                        SCOPE_ONELEVEL (0x01)
    --                        SCOPE_SUBTREE  (0x02)
    --                 indicating the scope of the search.
    --      filter   : A character string representing the search filter. The
    --                 value NULL can be passed to indicate that the filter
    --                 "(objectclass=*)" which matches all entries is to be
    --                 used.
    --      attrs    : A collection of strings indicating which attributes to
    --                 return for each matching entry. Passing NULL for this
    --                 parameter causes all available user attributes to be
    --                 retrieved. The special constant string NO_ATTRS ("1.1")
    --                 MAY be used as the only string in the array to indicate
    --                 that no attribute types are to be returned by the server.
    --                 The special constant string ALL_USER_ATTRS ("*") can be
    --                 used in the attrs array along with the names of some
    --                 operational attributes to indicate that all user
    --                 attributes plus the listed operational attributes are to
    --                 be returned.
    --      attronly : A boolean value that MUST be zero if both attribute types
    --                 and values are to be returned, and non-zero if only types
    --                 are wanted.
    --      res      : This is a result parameter which will contain the results
    --                 of the search upon completion of the call. If no results
    --                 are returned, res is set to NULL.
    -- Now let's look at the two output parameters:
    --      PLS_INTEGER
    --      (function return)   : DBMS_LDAP.SUCCESS if the search operation
    --                            succeeded. An exception is raised in all other
    --                            cases.
    --      res (OUT parameter) : If the search succeeded and there are entries,
    --                            this parameter is set to a NON-NULL value
    --                            which can be used to iterate through the
    --                            result set.
    retval := DBMS_LDAP.SEARCH_S(
          ld         =>  my_session
        , base       =>  ldap_baseDN
        , scope      =>  DBMS_LDAP.SCOPE_SUBTREE
        , filter     =>  search_filter
        , attrs      =>  res_attrs
        , attronly   =>  0
        , res        =>  res_message
    DBMS_OUTPUT.PUT_LINE(
        RPAD('search_s Returned ', 25, ' ') || ': ' || TO_CHAR(retval)
    DBMS_OUTPUT.PUT_LINE (
        RPAD('LDAP Message ', 25, ' ') || ': ' ||
        RAWTOHEX(SUBSTR(res_message, 1, 16)) ||
        ' - (returned from search_s)'
    -- After the search is performed, the API stores the count of the number of
    -- entries returned.
    retval := DBMS_LDAP.COUNT_ENTRIES(my_session, res_message);
    DBMS_OUTPUT.PUT_LINE(
        RPAD('Number of Entries ', 25, ' ') || ': ' || TO_CHAR(retval)
    DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------------------------');
    -- Retrieve the first entry.
    temp_entry := DBMS_LDAP.FIRST_ENTRY(my_session, res_message);
    entry_index := 1;
    -- Loop through each of the entries one by one.
    WHILE temp_entry IS NOT NULL LOOP
        -- Print out the current entry.
        temp_dn := DBMS_LDAP.GET_DN(my_session, temp_entry);
        DBMS_OUTPUT.PUT_LINE (' dn: ' || temp_dn);
        temp_attr_name := DBMS_LDAP.FIRST_ATTRIBUTE(
              my_session
            , temp_entry
            , temp_ber_elmt
        attr_index := 1;
        WHILE temp_attr_name IS NOT NULL LOOP
            temp_vals := DBMS_LDAP.GET_VALUES(my_session, temp_entry, temp_attr_name);
            IF temp_vals.COUNT > 0 THEN
                FOR i IN temp_vals.FIRST..temp_vals.LAST LOOP
                    DBMS_OUTPUT.PUT_LINE(
                        RPAD('   ' || temp_attr_name, 25, ' ') ||
                        ': ' ||(SUBSTR(temp_vals(i), 1, 200)
-- (SUBSTR(temp_vals(i), 1, 200) -> Results in ~ ?????13?x?
--utl_raw.cast_to_raw(SUBSTR(temp_vals(i), 1, 200)) -> Results in 7E0C3F3F3F3F3F31333F78EF
--BUT i WOULD LIKE TO GET MY RESULTS BACK IN THE FOLLOWING FORMAT
--\a6\53\6d\40\03\e6\83\45\ae\9a\32\a5\95\6b\e8\f1
--The format given above is an example only...
  END LOOP;
            END IF;
            temp_attr_name := DBMS_LDAP.NEXT_ATTRIBUTE(   my_session
                                                        , temp_entry
                                                        , temp_ber_elmt);
            attr_index := attr_index + 1;
        END LOOP;
        temp_entry := DBMS_LDAP.NEXT_ENTRY(my_session, temp_entry);
        DBMS_OUTPUT.PUT_LINE('=======================================================================');
        entry_index := entry_index + 1;
    END LOOP;
    -- Unbind from the directory
    retval := DBMS_LDAP.UNBIND_S(my_session);
    DBMS_OUTPUT.PUT_LINE(RPAD(
        'unbind_res Returned ', 25, ' ') || ': ' ||
        TO_CHAR(retval)
    -- Handle Exceptions
    EXCEPTION
        WHEN OTHERS THEN
            DBMS_OUTPUT.PUT_LINE('');
            DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------------------------');
            DBMS_OUTPUT.PUT_LINE('Exception Encountered');
            DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------------------------');
            DBMS_OUTPUT.PUT_LINE('  Error code    : ' || TO_CHAR(SQLCODE));
            DBMS_OUTPUT.PUT_LINE('  Error code    : ' || TO_CHAR(SQLCODE));
            DBMS_OUTPUT.PUT_LINE('  Error Message : ' || SQLERRM);
            DBMS_OUTPUT.PUT_LINE('  Exiting.');
END;
END LOOP;
            END IF;
            temp_attr_name := DBMS_LDAP.NEXT_ATTRIBUTE(   my_session
                                                        , temp_entry
                                                        , temp_ber_elmt);
            attr_index := attr_index + 1;
        END LOOP;
        temp_entry := DBMS_LDAP.NEXT_ENTRY(my_session, temp_entry);
        DBMS_OUTPUT.PUT_LINE('=======================================================================');
        entry_index := entry_index + 1;
    END LOOP;
    -- Unbind from the directory
    retval := DBMS_LDAP.UNBIND_S(my_session);
    DBMS_OUTPUT.PUT_LINE(RPAD(
        'unbind_res Returned ', 25, ' ') || ': ' ||
        TO_CHAR(retval)
    -- Handle Exceptions
    EXCEPTION
        WHEN OTHERS THEN
            DBMS_OUTPUT.PUT_LINE('');
            DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------------------------');
            DBMS_OUTPUT.PUT_LINE('Exception Encountered');
            DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------------------------');
            DBMS_OUTPUT.PUT_LINE('  Error code    : ' || TO_CHAR(SQLCODE));
            DBMS_OUTPUT.PUT_LINE('  Error code    : ' || TO_CHAR(SQLCODE));
            DBMS_OUTPUT.PUT_LINE('  Error Message : ' || SQLERRM);
            DBMS_OUTPUT.PUT_LINE('  Exiting.');
END;

Similar Messages

  • Query objectGUID using dbms_ldap package

    Hi
    I've managed to retrieve the objectGUID from Active Directory using the DBMS_LDAP package.
    It is returned in this format: 8FDD7ACDA0749648B136E0AD6847BD64
    How can I use this value in a filter for dbms_ldap.search_s?
    objectGUID=8FDD7ACDA0749648B136E0AD6847BD64 does not work,
    I've also tried escaping the value \8F\DD\... and \\8F\\DD\\...
    Any one know what I need to do?
    Thanks

    I already have the HEX value of the GUID - the problem is the function dbms_ldap.search_s appears to be trying to match the objectGUID which has been converted to ascii.
    I can do partial matches like objectGUID=cf*
    But that is matching an ascii representation of the GUID: eg. cf¿t¿H¿6¿@¿D
    And nothing can match the upside down question marks.
    There must be another way - or another unique identifier to compare/filter by.

  • Please help with assigning user to a group in AD using dbms_ldap

    Dear gurus of Apex and LDAP!
    Please help me a bit.
    I managed to create any user in AD from Apex using dbms_ldap package and set many of his attributes. But I cannot set that my user belongs to specific group, let's say MY_GROUP. I guess the name of attribute for group is 'member' or 'memberOf', so I tried them both in the same way as I've done for other attributes:
    v_vals(1) := 'MY_GROUP';
    DBMS_LDAP.populate_mod_array(v_array, DBMS_LDAP.MOD_ADD, 'member', v_vals);
    I've got LDAP client/server error: CONSTRAINT violation. 000020B5: AtrErr: DSID-031516FC, #1: 0: 000020B5:
    DSID-031516FC, problem 1005 (CONSTRAINT_ATT_TYPE), DATA 0, Att 1f (MEMBER)
    v_vals(1) := 'MY_GROUP';
    DBMS_LDAP.populate_mod_array(v_array, DBMS_LDAP.MOD_ADD, 'memberOf', v_vals);
    I've got LDAP client/server error: DSA IS unwilling TO perform. 0000209A: SvcErr: DSID-031A0929, problem 5003 (WILL_NOT_PERFORM), DATA 0
    After that I've tried to extend group name to string, which is shown in LDAP browser for attribute 'memberOf' (when I've added it manualy):
    v_vals(1) := 'CN=MY_GROUP,OU=GROUPS,OU=Allianz,DC=allianz,DC=com';
    DBMS_LDAP.populate_mod_array(v_array, DBMS_LDAP.MOD_ADD, 'member', v_vals);
    I've got LDAP client/server error: OBJECT CLASS violation. 0000207D: UpdErr: DSID-03150913, problem 6002 (OBJ_CLASS_VIOLATION), DATA 0
    v_vals(1) := 'CN=MY_GROUP,OU=GROUPS,OU=Allianz,DC=allianz,DC=com';
    DBMS_LDAP.populate_mod_array(v_array, DBMS_LDAP.MOD_ADD, 'memberOf', v_vals);
    LDAP client/server error: DSA IS unwilling TO perform. 0000209A: SvcErr: DSID-031A0929, problem 5003 (WILL_NOT_PERFORM), DATA 0
    I've also tried some other variants (without 'CN=' and without 'OU=GROUPS,OU=Allianz'), but still no success.
    Search of this forum and even google didn't help either :(
    Please, help me to find the correct syntax for it or tell me if it's not possible.
    Thanx in advance,
    Vladimir

    Vladimir ,
    firstly the attributes member and memberOf are special attributes in AD having a set of predefined values. Hence an error will be thrown if you try to assign them values like 'MY_GROUP'. There are two basic solutions to this problem : Either you define an OU in your AD which will act as your 'MY_GROUP'. This is a quick fix solution and is not robust at all. The other solution is to add your own property in the tree , something like 'roleCode', you can then assign it any value you want.
    But the problem now is, AD does not allow addition of new attributes in the structure. You have to use ADAM in for this and you can specify a common linking mechanism between AD and ADAM now such as email address can act as the link between both the directories.
    Hope this helps
    Shantanu

  • Using DBMS_LDAP in Apex

    Hi there
    I have the following problem. I have a simple function which uses DBMS_LDAP package. For testing purposes, when I call the function from sql*plus or sqldeveloper, it works fine and I can authenticate the user in AD. However, when using the same function call in Apex, the screen 'freezes' for about a minute and returns 'IE cannot display page' message. It looks like getting time out. Is this a network/firewall issue? Is Apex using some kind of proxy and cannot establiss LDAP session? Your help is really appresiated much.
    thanks, Ed

    Joel
    thank you for clarification. Really appreciate your help. I was able to get the list. Here is the procedure. The line that fails is highlighed. Basically it can't initialize the session on AD server...
    declare
         p_username          varchar2(25):='test';
         p_password          varchar2(25):='test';
         l_user               varchar2(256);
         l_ldap_server     varchar2(256)     := 'AD host';
         l_domain          varchar2(256)     := 'domain';
         l_ldap_port          number               := 389;
         l_retval          pls_integer;
         l_session          dbms_ldap.session;
         l_cnt               number;
    begin
    --     l_retval := dbms_ldap.unbind_s( l_session );
         l_user               := p_username||'@'||l_domain;
    *     l_session          := dbms_ldap.init( l_ldap_server, l_ldap_port ); -- start session*     
    l_retval          := dbms_ldap.simple_bind_s( l_session, l_user, p_password ); -- auth as user
         l_retval          := dbms_ldap.unbind_s( l_session ); -- unbind
         dbms_output.put_line( 'yes');
    exception when others then
    dbms_output.put_line( 'no');
    raise_application_error(-20101, 'invalid user');
         end;
    thanks, Ed

  • "An error occurred while extracting files from the package "BaseSystem.pkg".

    Hello!
    I have a
    MacBookPro5,5
    Prozessortyp:Intel Core 2 Duo
    Prozessorgeschwindigkeit:2.26 GHz
    Anzahl der Prozessoren:1
    Gesamtzahl der Kerne:2
    L2-Cache:3 MB
    Speicher:2 GB
    Busgeschwindigkeit:1.07 GHz
    Boot-ROM-Version:MBP55.00AC.B03
    SMC-Version (System):1.47f2
    Hardware-UUID:A2DD27C4-9829-5A4D-854B-485EF8A6B20F
    Problem:
    I upgraded Leopard to Snow Leopard. Everything worked fine for a month. To free up disk space I deleted some of the iPhoto flders (modfied and original images). Everything worked still fine. Shut down the computer. Next day it was incredibly slow. At the same time the indexing was running. I stopped indexing, but stll slow. Every operation took minutes. I tried all the tricks that I found in the internet (repaired file permissions, repaired disk, cleared PRAM , moved big filed from desktop, etc.). After 24 full hours of trying all this I decided to erase the hard drive and reinstall, directly from the Snow Leopard Install disk, but it fails after downloading the packages. Below is the part of the log. Then I tried to use the old Leopard install DVD to reinstall Leopard, it then sais estimated time 12 hours or so and eventually crashed, spitting out a lot of "reportcrash" in the log. What is going on? I'm running out of options. Any advice? Would zeroing the hard drive help? If nothing else I plan to buy a new hard drive, since the only explanation I have is that there is a problem with the hard driven although the disk utility says it is OK. I need a bigger one anyway. Any ideas? Thank you!
    Aug 16 05:17:31 localhost OSInstaller[139]: IFPKInstallElement (191 packages)
    Aug 16 05:17:35 localhost OSInstaller[139]: PackageKit: ----- Begin install -----
    Aug 16 05:17:35 localhost OSInstaller[139]: PackageKit: request=PKInstallRequest <191 packages, destination=/Volumes/Macintosh HD>
    Aug 16 05:17:36 localhost OSInstaller[139]: PackageKit: Extracting /Volumes/Macintosh HD/Mac OS X Install Data/BaseSystem.pkg (destination=/Volumes/Macintosh HD/.OSInstallSandbox-tmp/Root, uid=0)
    Aug 16 05:31:59 localhost Unknown[80]: /SourceCache/AppleFSCompression/AppleFSCompression-24.0.1/Common/DataPool.c:116 : Error: finished pool without filling it
    Aug 16 05:31:59 localhost Unknown[80]: /SourceCache/AppleFSCompression/AppleFSCompression-24.0.1/Common/commonUtils.c: 315: Error: fh_pread -1
    Aug 16 05:31:59 localhost Unknown[80]: /SourceCache/AppleFSCompression/AppleFSCompression-24.0.1/Common/StreamCompress or.c:236: Error: write failed for /Volumes/Macintosh HD/.OSInstallSandbox-tmp/Root//System/Library/Frameworks/OpenCL.framework/Versi ons/A/Resources/runtime.amdil.bc: Invalid argument
    Aug 16 05:31:59 localhost Unknown[80]: /SourceCache/AppleFSCompression/AppleFSCompression-24.0.1/Common/StreamCompress or.c:260: Error: futimes failed for /Volumes/Macintosh HD/.OSInstallSandbox-tmp/Root//System/Library/Frameworks/OpenCL.framework/Versi ons/A/Resources/runtime.amdil.bc: Invalid argument
    Aug 16 05:31:59 localhost Unknown[80]: /SourceCache/AppleFSCompression/AppleFSCompression-24.0.1/Common/StreamCompress or.c:829: Error: returning errno 22 from FinishStreamCompressorQueue
    Aug 16 05:32:10 localhost OSInstaller[139]: PackageKit: Install Failed: PKG: extracting "com.apple.pkg.BaseSystem"\nError Domain=PKInstallErrorDomain Code=110 UserInfo=0x12c8366a0 "An error occurred while extracting files from the package “BaseSystem.pkg”." Underlying Error=(Error Domain=BOMCopierFatalError Code=22 UserInfo=0x12e703300 "The operation couldn’t be completed. FinishStreamCompressorQueue error") {\n    NSFilePath = "/Volumes/Macintosh HD/.OSInstallSandbox-tmp/Root";\n    NSLocalizedDescription = "An error occurred while extracting files from the package \U201cBaseSystem.pkg\U201d.";\n    NSURL = "BaseSystem.pkg -- file://localhost/Volumes/Macintosh%20HD/Mac%20OS%20X%20Install%20Data/index.pro duct";\n    NSUnderlyingError = "Error Domain=BOMCopierFatalError Code=22 UserInfo=0x12e703300 \"The operation couldn\U2019t be completed. FinishStreamCompressorQueue error\"";\n    PKInstallPackageIdentifier = "com.apple.pkg.BaseSystem";\n}
    Aug 16 05:32:10 localhost OSInstaller[139]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=110 UserInfo=0x12c8366a0 "An error occurred while extracting files from the package “BaseSystem.pkg”." Underlying Error=(Error Domain=BOMCopierFatalError Code=22 UserInfo=0x12e703300 "The operation couldn’t be completed. FinishStreamCompressorQueue error")
    Aug 16 05:32:11 localhost OSInstaller[139]: Install failed: Die Installation ist aufgrund eines Fehlers fehlgeschlagen. Wenden Sie sich an den Hersteller der Software.
    Aug 16 05:32:13 localhost OSInstaller[139]: Allowing machine sleep.
    Aug 16 05:32:15 localhost OSInstaller[139]: Memory statistics for 'Installation ist fehlgeschlagen' pane:
    Aug 16 05:32:15 localhost OSInstaller[139]: Physical Memory Allocation:   139 MB wired,   259 MB trapped,   397 MB active,     7 MB inactive,  1246 MB free,  1650 MB usable,  2048 MB total

    It sounds to me like your Internal Hard Drive is failing.
    I recommend you buy a new one, that is a good candidate for replacing the old one, but install it in an External enclosure and Install a fresh Mac OS X on it from the DVD. You can boot your Mac from any attached drive.
    The new System can be used to get some work done, check your emails, and takes the pressure off resolving this immediately. You can also attempt to salvage files off the old drive if needed.
    Once things seem to be working, then move the new drive inside the computer. Failures at this point may be due to bad cable, which has been a problem in some of these MacBooks.
    Use security erase, write Zeroes, one pass, to re-write every block on the old drive. Any block discovered to be bad will be replaced with spares the drive holds in reserve for this purpose. If more than 10 blocks are pared on one pass, "Initialization Failed!" will be the result. Although you can try the erase again, there is some question whether you want to trust this drive with your precious data.

  • Error while using UTL_DBWS package

    Hello
    I want to call a web service using UTL_DBWS package as explained in this link.
    http://www.oracle-base.com/articles/10g/utl_dbws10g.php
    I implemented the example successfully, and I need to my own web service.
    my web service is just a java class that return a hello world and a parameter. deployed on Integrated weblogic server shipped with Jdeveloper11g.
    here is my java class
    package ws;
    import javax.jws.Oneway;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    @WebService
    public class HelloWorld {
        public HelloWorld() {
        @WebMethod(action = "http://ws//sayHelloWorld")
        public String sayHelloWorld(){
            return "Hello World";
        @WebMethod(action = "http://ws//sayHelloWorld")
        public String sayHelloName(@WebParam(name = "arg0")
            String n){
            return "Hello " + n;
    }my WSDL is
      <?xml version="1.0" encoding="UTF-8" ?>
    - <!--  Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.5.
      -->
    - <!--  Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.5.
      -->
    - <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws/" name="HelloWorldService">
    - <types>
    - <xsd:schema>
      <xsd:import namespace="http://ws/" schemaLocation="http://127.0.0.1:7101/Application15-Model-context-root/HelloWorldPort?xsd=1" />
      </xsd:schema>
      </types>
    - <message name="sayHelloWorld">
      <part name="parameters" element="tns:sayHelloWorld" />
      </message>
    - <message name="sayHelloWorldResponse">
      <part name="parameters" element="tns:sayHelloWorldResponse" />
      </message>
    - <message name="sayHelloName">
      <part name="parameters" element="tns:sayHelloName" />
      </message>
    - <message name="sayHelloNameResponse">
      <part name="parameters" element="tns:sayHelloNameResponse" />
      </message>
    - <portType name="HelloWorld">
    - <operation name="sayHelloWorld">
      <input message="tns:sayHelloWorld" />
      <output message="tns:sayHelloWorldResponse" />
      </operation>
    - <operation name="sayHelloName">
      <input message="tns:sayHelloName" />
      <output message="tns:sayHelloNameResponse" />
      </operation>
      </portType>
    - <binding name="HelloWorldPortBinding" type="tns:HelloWorld">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    - <operation name="sayHelloWorld">
      <soap:operation soapAction="http://ws//sayHelloWorld" />
    - <input>
      <soap:body use="literal" />
      </input>
    - <output>
      <soap:body use="literal" />
      </output>
      </operation>
    - <operation name="sayHelloName">
      <soap:operation soapAction="http://ws//sayHelloWorld" />
    - <input>
      <soap:body use="literal" />
      </input>
    - <output>
      <soap:body use="literal" />
      </output>
      </operation>
      </binding>
    - <service name="HelloWorldService">
    - <port name="HelloWorldPort" binding="tns:HelloWorldPortBinding">
      <soap:address location="http://127.0.0.1:7101/Application15-Model-context-root/HelloWorldPort" />
      </port>
      </service>
      </definitions>and my function is to call the web service
    CREATE OR REPLACE FUNCTION SAYHelloMYNAME (p_int_1 IN Varchar2)
      RETURN NUMBER
    AS
      l_service          UTL_DBWS.service;
      l_call                 UTL_DBWS.call;
      l_wsdl_url         VARCHAR2(32767);
      l_namespace        VARCHAR2(32767);
      l_service_qname    UTL_DBWS.qname;
      l_port_qname       UTL_DBWS.qname;
      l_operation_qname  UTL_DBWS.qname;
      l_xmltype_in        XMLTYPE;
      l_xmltype_out       XMLTYPE;
      l_return          VARCHAR2(100);
    BEGIN
      l_wsdl_url        := 'http://127.0.0.1:7101/Application15-Model-context-root/HelloWorldPort?wsdl';
      l_namespace       := 'http://ws/';
      l_service_qname   := UTL_DBWS.to_qname(l_namespace, 'HelloWorldService');
      l_port_qname      := UTL_DBWS.to_qname(l_namespace, 'HelloWorldPort');
      l_operation_qname := UTL_DBWS.to_qname(l_namespace, 'sayHelloName');
       l_service := UTL_DBWS.create_service (
        wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
        service_name           => l_service_qname);
      l_call := UTL_DBWS.create_call (
        service_handle => l_service,
        port_name      => l_port_qname,
        operation_name => l_operation_qname);
      l_xmltype_in :=  XMLTYPE('<?xml version="1.0" encoding="utf-8"?>
        <sayHelloWorld xmlns="' || l_namespace || '">
          <parameters>' || p_int_1 || '</parameters>
          </sayHelloWorld>');
      l_xmltype_out := UTL_DBWS.invoke(call_Handle => l_call,
                                       request     => l_xmltype_in);
      UTL_DBWS.release_call (call_handle => l_call);
      UTL_DBWS.release_service (service_handle => l_service);
      l_return := l_xmltype_out.extract('//return/text()').getstringVal();
      RETURN l_return;
    END;
    /but when I test the function I get this error
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.IllegalAccessException: error.build.wsdl.model: oracle.j2ee.ws.common.tools.api.WsdlValidationException: Failed to read wsdl file at: "http://127.0.0.1:7101/Application15-Model-context-root/HelloWorldPort?wsdl", caused by: java.net.ConnectException.    : Connection refused
    ORA-06512: at "WSUSER.UTL_DBWS", line 193
    ORA-06512: at "WSUSER.UTL_DBWS", line 190
    ORA-06512: at "WSUSER.SAYHELLOMYNAME", line 24any suggestions?

    M.Jabr wrote:
    can you elaborate more on this?
    I can open http://127.0.0.1:7101/Application15-Model-context-root/HelloWorldPort?wsdl
    on my browser.Is your browser on that Oracle server? You are instructing Oracle server code (the UTL_DBWS package) to access that URL.
    The IP in that URL is a localhost IP address - and that means using the local IP stack only. So it expects a web server on the Oracle server platform on tcp port 7101. It cannot use that IP to access your client/development machine.
    How can I test it using UTL_HTTP?You can write a basic web browser, minus the rendering engine, using UTL_HTTP. You can also use it for web service calls - which is my preference as I deem the UTL_DBWS package to clunky and complex.
    See:
    {message:id=1925297} (sample PL/SQL web browser)
    {message:id=4205205} (sample PL/SQL web browser SOAP call)

  • Please show how to use UTL_DBWS package?

    I've been digging around google but unable to find any or working example using this package. Oracle document is not much help in this. I've install all the necessary file to get this running. I just need a little kick start and if some one have use this before, please help. Here is what I am trying to consume.
    ----sample wdsl---
    <?xml version="1.0" encoding="utf-8" ?>
    - <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="sangle" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="sangle" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Web Service to Authenticate and Manage slb_webservice</wsdl:documentation>
    - <wsdl:types>
    - <s:schema elementFormDefault="qualified" targetNamespace="sangle">
    - <s:element name="Authenticate">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="AuthenticateResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="AuthenticateResult" type="s:boolean" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="GetRecord">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="name" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="email" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="GetRecordResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="GetRecordResult" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="AddUser">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="name" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="email" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="AddUserResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="AddUserResult" type="s:boolean" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="DeleteUser">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="DeleteUserResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="DeleteUserResult" type="s:boolean" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="EditUser">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="name" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="email" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="EditUserResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="EditUserResult" type="s:boolean" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="ReturnName">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="ReturnNameResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="ReturnNameResult" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="ReturnEmail">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="ReturnEmailResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="ReturnEmailResult" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:schema>
    </wsdl:types>
    - <wsdl:message name="AuthenticateSoapIn">
    <wsdl:part name="parameters" element="tns:Authenticate" />
    </wsdl:message>
    - <wsdl:message name="AuthenticateSoapOut">
    <wsdl:part name="parameters" element="tns:AuthenticateResponse" />
    </wsdl:message>
    - <wsdl:message name="GetRecordSoapIn">
    <wsdl:part name="parameters" element="tns:GetRecord" />
    </wsdl:message>
    - <wsdl:message name="GetRecordSoapOut">
    <wsdl:part name="parameters" element="tns:GetRecordResponse" />
    </wsdl:message>
    - <wsdl:message name="AddUserSoapIn">
    <wsdl:part name="parameters" element="tns:AddUser" />
    </wsdl:message>
    - <wsdl:message name="AddUserSoapOut">
    <wsdl:part name="parameters" element="tns:AddUserResponse" />
    </wsdl:message>
    - <wsdl:message name="DeleteUserSoapIn">
    <wsdl:part name="parameters" element="tns:DeleteUser" />
    </wsdl:message>
    - <wsdl:message name="DeleteUserSoapOut">
    <wsdl:part name="parameters" element="tns:DeleteUserResponse" />
    </wsdl:message>
    - <wsdl:message name="EditUserSoapIn">
    <wsdl:part name="parameters" element="tns:EditUser" />
    </wsdl:message>
    - <wsdl:message name="EditUserSoapOut">
    <wsdl:part name="parameters" element="tns:EditUserResponse" />
    </wsdl:message>
    - <wsdl:message name="ReturnNameSoapIn">
    <wsdl:part name="parameters" element="tns:ReturnName" />
    </wsdl:message>
    - <wsdl:message name="ReturnNameSoapOut">
    <wsdl:part name="parameters" element="tns:ReturnNameResponse" />
    </wsdl:message>
    - <wsdl:message name="ReturnEmailSoapIn">
    <wsdl:part name="parameters" element="tns:ReturnEmail" />
    </wsdl:message>
    - <wsdl:message name="ReturnEmailSoapOut">
    <wsdl:part name="parameters" element="tns:ReturnEmailResponse" />
    </wsdl:message>
    - <wsdl:portType name="Mini_x0020_PassportSoap">
    - <wsdl:operation name="Authenticate">
    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Method to Authenticate slb_webservice</wsdl:documentation>
    <wsdl:input message="tns:AuthenticateSoapIn" />
    <wsdl:output message="tns:AuthenticateSoapOut" />
    </wsdl:operation>
    - <wsdl:operation name="GetRecord">
    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Method to response with sqlStr</wsdl:documentation>
    <wsdl:input message="tns:GetRecordSoapIn" />
    <wsdl:output message="tns:GetRecordSoapOut" />
    </wsdl:operation>
    - <wsdl:operation name="AddUser">
    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Method to Add User</wsdl:documentation>
    <wsdl:input message="tns:AddUserSoapIn" />
    <wsdl:output message="tns:AddUserSoapOut" />
    </wsdl:operation>
    - <wsdl:operation name="DeleteUser">
    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Method to Delete User</wsdl:documentation>
    <wsdl:input message="tns:DeleteUserSoapIn" />
    <wsdl:output message="tns:DeleteUserSoapOut" />
    </wsdl:operation>
    - <wsdl:operation name="EditUser">
    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Method to Edit User Information</wsdl:documentation>
    <wsdl:input message="tns:EditUserSoapIn" />
    <wsdl:output message="tns:EditUserSoapOut" />
    </wsdl:operation>
    - <wsdl:operation name="ReturnName">
    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Method to Obtain User Name</wsdl:documentation>
    <wsdl:input message="tns:ReturnNameSoapIn" />
    <wsdl:output message="tns:ReturnNameSoapOut" />
    </wsdl:operation>
    - <wsdl:operation name="ReturnEmail">
    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Method to obtain User Email Address</wsdl:documentation>
    <wsdl:input message="tns:ReturnEmailSoapIn" />
    <wsdl:output message="tns:ReturnEmailSoapOut" />
    </wsdl:operation>
    </wsdl:portType>
    - <wsdl:binding name="Mini_x0020_PassportSoap" type="tns:Mini_x0020_PassportSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="Authenticate">
    <soap:operation soapAction="sangle/Authenticate" style="document" />
    - <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    - <wsdl:operation name="GetRecord">
    <soap:operation soapAction="sangle/GetRecord" style="document" />
    - <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    - <wsdl:operation name="AddUser">
    <soap:operation soapAction="sangle/AddUser" style="document" />
    - <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    - <wsdl:operation name="DeleteUser">
    <soap:operation soapAction="sangle/DeleteUser" style="document" />
    - <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    - <wsdl:operation name="EditUser">
    <soap:operation soapAction="sangle/EditUser" style="document" />
    - <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    - <wsdl:operation name="ReturnName">
    <soap:operation soapAction="sangle/ReturnName" style="document" />
    - <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    - <wsdl:operation name="ReturnEmail">
    <soap:operation soapAction="sangle/ReturnEmail" style="document" />
    - <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    - <wsdl:binding name="Mini_x0020_PassportSoap12" type="tns:Mini_x0020_PassportSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="Authenticate">
    <soap12:operation soapAction="sangle/Authenticate" style="document" />
    - <wsdl:input>
    <soap12:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    - <wsdl:operation name="GetRecord">
    <soap12:operation soapAction="sangle/GetRecord" style="document" />
    - <wsdl:input>
    <soap12:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    - <wsdl:operation name="AddUser">
    <soap12:operation soapAction="sangle/AddUser" style="document" />
    - <wsdl:input>
    <soap12:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    - <wsdl:operation name="DeleteUser">
    <soap12:operation soapAction="sangle/DeleteUser" style="document" />
    - <wsdl:input>
    <soap12:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    - <wsdl:operation name="EditUser">
    <soap12:operation soapAction="sangle/EditUser" style="document" />
    - <wsdl:input>
    <soap12:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    - <wsdl:operation name="ReturnName">
    <soap12:operation soapAction="sangle/ReturnName" style="document" />
    - <wsdl:input>
    <soap12:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    - <wsdl:operation name="ReturnEmail">
    <soap12:operation soapAction="sangle/ReturnEmail" style="document" />
    - <wsdl:input>
    <soap12:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    - <wsdl:service name="Mini_x0020_Passport">
    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Web Service to Authenticate and Manage slb_webservice</wsdl:documentation>
    - <wsdl:port name="Mini_x0020_PassportSoap" binding="tns:Mini_x0020_PassportSoap">
    <soap:address location="http://sangle-l-ofs.nam.slb.com/webserv/miniPassport.asmx" />
    </wsdl:port>
    - <wsdl:port name="Mini_x0020_PassportSoap12" binding="tns:Mini_x0020_PassportSoap12">
    <soap12:address location="http://sangle-l-ofs.nam.slb.com/webserv/miniPassport.asmx" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    ----end----
    Here is my function
    ----begin copy/paste---
    CREATE OR REPLACE FUNCTION CONCUR_ADMIN.slb_webserv_call (p_stock_code IN VARCHAR2)
    RETURN VARCHAR2
    AS
    l_service UTL_DBWS.service;
    l_call UTL_DBWS.call;
    l_result ANYDATA;
    l_wsdl_url VARCHAR2(1024);
    l_service_name VARCHAR2(200);
    l_operation_name VARCHAR2(200);
    l_input_params UTL_DBWS.anydata_list;
    BEGIN
    l_wsdl_url := 'http://sangle-l-ofs.nam.slb.com/webserv/miniPassport.asmx';
    l_service_name := 'Mini_x0020_Passport';
    l_operation_name := 'ReturnEmail';
    l_service := UTL_DBWS.create_service (
    wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
    service_name => l_service_name);
    l_call := UTL_DBWS.create_call (
    service_handle => l_service,
    port_name => NULL,
    operation_name => l_operation_name);
    l_input_params(1) := ANYDATA.ConvertVarchar2(p_stock_code);
    l_result := UTL_DBWS.invoke (
    call_handle => l_call,
    input_params => l_input_params);
    UTL_DBWS.release_call (call_handle => l_call);
    UTL_DBWS.release_service (service_handle => l_service);
    RETURN ANYDATA.AccessNumber(l_result);
    EXCEPTION
    WHEN OTHERS THEN
    RETURN NULL;
    END;
    ---end----
    This is my first experience with SOAP so please be gentle. Thanks.

    I am implying that there is documentation in Metalink about the UTL_DBWS package and that it is in Metalink Note given above.
    Since you asked, I now assume that you do not have access to Oracle's Support site called Metalink. If not, perhaps you could ask your colleagues to extract that note for you.

  • DBMS_LDAP package documentation and samples

    Where can I find the DBMS_LDAP package documentation and samples to use it to connect to OID from pl/sql blocks.
    TIA,
    Nishant

    I have been successful using the PL/SQL DBMS_LDAP utilities and enhancing the included examples to bulk create portal users as well as adding them to a default portal group as outlined in the DBMS_LDAP demo examples (search.sql, trigger.sql, empdata.sql).
    Using this PL/SQL trigger on the EMP table, I can add, delete or modify various user entries. However, while I can add a user to a default portal group, I have been unsuccessful in deleting a user from a group as well as modifying a users default group by deleting their "uniquemember" entry from one group and adding it to another using the DBMS_LDAP procedures.
    Has anyone deleted a user from an existing group and how is this done programatically using the DBMS_LDAP utilities? Also, but less important, is there a way to programmatically modify a user from one portal group to another?
    I don't necessarily want the code - just the method of doing this. Do I have to read in all of the 'uniquemember' attributes from the group (via DBMS_LDAP.populate_mod_array, for example), then manipulate the list and write it back. Or, is there a function that will allow me to delete or modify an entry in the 'uniquemember' attribute.
    Regards,
    Edward Girard

  • DBMS_LDAP package

    Hi,
    Please, where can I find the DBMS_LDAP package. I've Oracle 8.1.7 with Win2000?
    Am I oblige to install Oracle Internet Directory to use it?
    Thanks.

    Dear V Garcia
    I would like to ask you, how we could load DBMS_LDAP package into our from application, we developed an application using Oracle Forms (6i) deployed into Oracle9i AS (1.0.2.2.2.A) connected to Oracle8i Database server (Release 8.1.7). The problem is how I can use Oracle forms to authenticate users login using LDAP instead of traditional user authentication using forms trigger and database tables. I tried to find any document(s) that help in using LDAP through Oracle Forms6i without any success. I appreciate any Help

  • Hi this message appears after 2 hours downloading Mavericks : an error occurred while extracting files from the package "mzps4135638417199433253.pkg"

    Hi this message appears after 2 hours downloading Mavericks in App Store :
    an error occurred while extracting files from the package "mzps4135638417199433253.pkg"
    Same with "CMD + R"
    Help...

    It sounds to me like your Internal Hard Drive is failing.
    I recommend you buy a new one, that is a good candidate for replacing the old one, but install it in an External enclosure and Install a fresh Mac OS X on it from the DVD. You can boot your Mac from any attached drive.
    The new System can be used to get some work done, check your emails, and takes the pressure off resolving this immediately. You can also attempt to salvage files off the old drive if needed.
    Once things seem to be working, then move the new drive inside the computer. Failures at this point may be due to bad cable, which has been a problem in some of these MacBooks.
    Use security erase, write Zeroes, one pass, to re-write every block on the old drive. Any block discovered to be bad will be replaced with spares the drive holds in reserve for this purpose. If more than 10 blocks are pared on one pass, "Initialization Failed!" will be the result. Although you can try the erase again, there is some question whether you want to trust this drive with your precious data.

  • Retrieve LDAP data in Chunks using DBMS_LDAP

    Need help in getting the LDAP data in Chunks using the DBMS_LDAP. The reason being i have over 8000 records in the AD and it is configured that i cannot retrieve more than 1000 at a stretch.
    The AD administrator had given me an option of fetching it based on the pagesize which they use on AD.
    Dim DirSearcher As New DirectorySearcher()
    DirSearcher.SearchRoot = New DirectoryEntry("LDAP://" & System.Environment.UserDomainName)
    DirSearcher.Filter = "(&(objectclass=user)(objectcategory=person))"
    DirSearcher.PageSize = 1000
    Can we have something like this done in the DBMS_LDAP package to fetch the records in AD in chunks of 1000 records?
    version details
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production

    if there are more than 1000 entries which starts with a character, how will this solution work?You would have to incorporate one more loop (and so on, in case it still errors out):
      for c in ascii ('a') .. ascii ('z')
      loop
        for d in ascii ('a') .. ascii ('z')
        loop
          l_retval :=
            dbms_ldap.search_s (ld         => ld
                                base       => base,
                                scope      => dbms_ldap.scope_subtree,
                                filter     => '(&(objectCategory=person)(objectClass=user)(sAMAccountName=' || chr (c) || chr(d) || '*))',
                                attrs      => attrs,
                                attronly   => 0,
                                res        => res
        end loop; 
      end loop; 
    ...Not nice I know, but it seems to be the only way to avoid »ORA-31202: DBMS_LDAP: LDAP client/server error: Sizelimit exceeded«.

  • Invalid DBMS_LDAP package

    I'm trying to fix invalid objects before database upgrade. I ran dbupgdiag.sql tool which reports DBMS_LDAP package as invalid. According to Enterprise Manager, the package is wrapped and contains some errors (see below). How can I unwrap the package and fix the errors?
    Line # = 50 Column # = 14 Error Text = PLS-00201: identifier 'DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR' must be declared
    Line # = 50 Column # = 14 Error Text = PL/SQL: Statement ignored
    Line # = 73 Column # = 14 Error Text = PLS-00201: identifier 'DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR' must be declared
    Line # = 73 Column # = 14 Error Text = PL/SQL: Statement ignored
    Line # = 105 Column # = 14 Error Text = PLS-00201: identifier 'DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR' must be declared
    Line # = 105 Column # = 14 Error Text = PL/SQL: Statement ignored
    Line # = 135 Column # = 14 Error Text = PLS-00201: identifier 'DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR' must be declared
    Line # = 135 Column # = 14 Error Text = PL/SQL: Statement ignored
    Line # = 175 Column # = 14 Error Text = PLS-00201: identifier 'DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR' must be declared
    Line # = 175 Column # = 14 Error Text = PL/SQL: Statement ignored
    Line # = 211 Column # = 14 Error Text = PLS-00201: identifier 'DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR' must be declared
    Line # = 211 Column # = 14 Error Text = PL/SQL: Statement ignored
    Line # = 218 Column # = 14 Error Text = PLS-00201: identifier 'DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR' must be declared
    Line # = 218 Column # = 14 Error Text = PL/SQL: Statement ignored
    Line # = 276 Column # = 14 Error Text = PLS-00201: identifier 'DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR' must be declared
    Line # = 276 Column # = 14 Error Text = PL/SQL: Statement ignored
    Line # = 283 Column # = 14 Error Text = PLS-00201: identifier 'DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR' must be declared
    Line # = 283 Column # = 14 Error Text = PL/SQL: Statement ignored
    Line # = 289 Column # = 14 Error Text = PLS-00201: identifier 'DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR' must be declared
    Line # = 289 Column # = 14 Error Text = PL/SQL: Statement ignored

    I have been successful using the PL/SQL DBMS_LDAP utilities and enhancing the included examples to bulk create portal users as well as adding them to a default portal group as outlined in the DBMS_LDAP demo examples (search.sql, trigger.sql, empdata.sql).
    Using this PL/SQL trigger on the EMP table, I can add, delete or modify various user entries. However, while I can add a user to a default portal group, I have been unsuccessful in deleting a user from a group as well as modifying a users default group by deleting their "uniquemember" entry from one group and adding it to another using the DBMS_LDAP procedures.
    Has anyone deleted a user from an existing group and how is this done programatically using the DBMS_LDAP utilities? Also, but less important, is there a way to programmatically modify a user from one portal group to another?
    I don't necessarily want the code - just the method of doing this. Do I have to read in all of the 'uniquemember' attributes from the group (via DBMS_LDAP.populate_mod_array, for example), then manipulate the list and write it back. Or, is there a function that will allow me to delete or modify an entry in the 'uniquemember' attribute.
    Regards,
    Edward Girard

  • Error while sending a mail using UTP_MAIL package in Oracle 10g

    Hi,
    We are using UTP_MAIL package to send a mail from Oracle 10g.We have follwed the following steps ...
    SQL> connect sys/password as sysdba
    Connected.
    SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
    Package created.
    Synonym created.
    SQL> @$ORACLE_HOME /rdbms/admin/prvtmail.plb
    Package body created.
    SQL > alter system set smtp_out_server = '<mail_server_ip:25>' scope =spfile;
    System altered..
    Now we try the code
    begin
    utl_mail.send(
    sender => 'sender's mail',
    recipients => 'receiver mail',
    CC => 'optional',
    subject => 'Testing utl_mail',
    message => 'Test Mail'
    end;
    But we get the following error...
    ERROR at line 1:
    ORA-29278: SMTP transient error: 421 Service not available
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 97
    ORA-06512: at "SYS.UTL_SMTP", line 139
    ORA-06512: at "SYS.UTL_MAIL", line 405
    ORA-06512: at "SYS.UTL_MAIL", line 594
    ORA-06512: at line 2
    We also tried connecting to the mail server through telnet .But it is not getting connected..
    Please help us to solve the issue.

    From your own posting you may have the clue, if you try to access your mail server through telnet and it is not successful, it means the service is down or there are networking issues.
    On pre 10gR2 versions there was a bug 4083461.8. It could affect you if you are on 10gR1
    "Bug 4083461 - UTL_SMTP.OPEN_CONNECTION in shared server fails with ORA-29278 Doc ID:      Note:4083461.8"
    This was fixed on 10gR2 base and on 9.2.0.8.0
    ~ Madrid

  • How to delete data from a file using IO package

    Hi All,
    i am trying to remove some content of the file.
    this content is not at starting of file not even at end of file.
    can anybody tell me how can i delete number of lines from file using IO package.

    iam having some data in text file .ex:in flowrist.txt
    12/5/07,500,300,6000 like many set of datas are
    there.In these if i want to delete the data based on
    the date which i specified.How to do this specific
    deletion?You need to open a stream to read in the file and then use the indexOf method provided in the Sting class to check if the line contains the date or whatever String you are looking for, if so then skip that line and store or re-write the lines you wish to keep, as well as some extra lines you may wish to add.
    Take a look below at this example found on Google.
    http://www.java-tips.org/java-se-tips/java.io/how-to-read-file-in-java.html
    The above read a file line by line and prints it to console. You should be able to modify this, instead of using System.out to print the line you should use index of to check the lines for a date/String. Index of return -1 if the String you specify is not in the line you parse.

  • Help finding and using a package

    hi guyz,
    Iam new to this forum and i need this info urgently. so plz try to help me.
    I want to use the package below in an applet to convert my TemporaryRegistrationPermit to create a PNG file and then print it.
    how can i get the above package. I searched a lot on net and even on IBM website but never found it. How can i get it and include the class file in an applet and use the methods in it.Is there any other way to include this package in my applet, i mean a URL pointing to this class file.
    package com.ibm.gs.houston.saz.trp.utils.TemporaryRegistrationPermit
    I would really appreciate an early reply
    thank you
    tarun

    How do you know you need this package ? You know the path to it, so you must have seen it referenced somewhere.
    Some background please, but it sounds like it's an IBM internal class of some sort, so I wouldn't get your hopes up unless you have legitimate access to this or know it to be freely available.
    D.

Maybe you are looking for

  • Excise details are not updating in MIGO

    hai, i am working with CIN,,i raised a Purchase Order and all the taxes maintained are updating in Invoice tab of PO... whn i am tryimg to enter GR , the excise Invoice and excise item tabs are displaying but the excise values(BED,AED )are not updati

  • Import shared library, edit vi's, arrange menu

    I'm creating a labview interface to a large dll, so I use the Tools->Import->Shared library, and it works GREAT! I have a user library I can call from the palette. So I keep adding to the dll, and now have over 100 function calls. I would like to kee

  • Downpayment clearing

    Hi guys I am using doc types KR and KN for downpayment. if i use doc type KR, i can clear the downpayment with no problem - however if i use doc type KN, i cannot. Can anyone suggest what i need to do to fix this? I am using F-47 for downpayment and

  • HELP - Fireworks 8 is flattening PNG created w/ MX to BMP

    Help please Fireworks 8 is flattening my PNG created with Fireworks MX to a bmp that has no layers. It still SAYS PNG but the layers are gone. Is there some kind of problem with opening png's created with older versions of fireworks? I almost wish I

  • PCM 7.5 Installation

    Hello Team, Am installing SAP Business Objects Profit Cost Management 7.5  Sandbox Installation on a stand alone windows 2008 server with SQL 2008 DB. And I opted for a primary server installation and am done with 70 % of the installation but am stuc