tag:blogger.com,1999:blog-5215551487816981140.post6826345055999631656..comments2024-01-23T06:10:31.184-08:00Comments on ORA-00001: Unique constraint violated: NTLM for PL/SQLMorten Bratenhttp://www.blogger.com/profile/12300886042835631690noreply@blogger.comBlogger32125tag:blogger.com,1999:blog-5215551487816981140.post-31610257120186937082017-08-08T12:21:24.091-07:002017-08-08T12:21:24.091-07:00Hi Morten,
Thanks for explanation. Is there any o...Hi Morten,<br /><br />Thanks for explanation. Is there any other work around which you can suggest for this kind of problem which can be implemented to fix the issue. Thank you.<br /><br />JaswanthAnonymoushttps://www.blogger.com/profile/15172847833805849138noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-62990261800811292222017-08-08T00:20:12.873-07:002017-08-08T00:20:12.873-07:00@Nikolas: As mentioned in the blog post, the PL/SQ...@Nikolas: As mentioned in the blog post, the PL/SQL implementation was a port of a Python library, and the Python library does not support NTLMv2 either. Theoretically it is just a matter of reading up on the new protocol version and implementing it, but it would be a lot of work, and there are no current plans to do so.<br /><br />- MortenMorten Bratenhttps://www.blogger.com/profile/12300886042835631690noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-20973859514689679282017-07-31T10:39:36.791-07:002017-07-31T10:39:36.791-07:00Hi Morten,
thank you for this implementation of N...Hi Morten,<br /><br />thank you for this implementation of NTLM. Unfortunately, this package supports only NTLM not NTLMv2, so we cannot connect to our Sharepoint server. Is there a chance, that you also implement NTLMv2?<br /><br />I think that this is also the reason why so many users get the 401 when they update their servers with the latest servicepacks. Microsoft products now require NTLMv2.<br /><br />Nevertheless this is a very impressive library.Nikolasnoreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-31878196961708130742017-07-25T10:33:45.298-07:002017-07-25T10:33:45.298-07:00HI Morten,
First of all thank you so much for the...HI Morten,<br /><br />First of all thank you so much for the NTLM explanation, I was able to successfully use this to call the web service.<br /><br />But now, I have one issue, which is a very confusing to debug it. At present when the web service call was working , we were using WWXXX Domain, later all our Domains got migrated to ADXXX. Now, when we trying to send the credentials with AD Domain the call is failing at the after establishing the connection to the website. <br /><br />Saying: 401: Unauthorized error/invalid credentials. I am sure this is related to the Active Directory Domain (AD), but we are not able to figure it out, where the issue is. <br /><br />Your help is very much essential and very much appreciated in this scenario. Thank you so much.Anonymoushttps://www.blogger.com/profile/15172847833805849138noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-4726684977617231352015-09-16T22:14:54.508-07:002015-09-16T22:14:54.508-07:00Hi Morten,
Thank you so much for sharing this lib...Hi Morten,<br /><br />Thank you so much for sharing this library. <br />I'v used the example 1 without proxy server so I could get result but with the proxy server in third step of Response got Unauthorized result.<br /><br />----<br />http://test.com/<br />Response Status Code: 401<br />#1 Server : nginx/1.8.0<br />#2 Date : Thu, 17 Sep 2015 04:53:09 GMT<br />#3 Content-Type : text/html<br />#4 Content-Length : 1293<br />#5 Connection : close<br />#6 WWW-Authenticate : Negotiate<br />#7 WWW-Authenticate : NTLM<br />#8 X-Powered-By : ASP.NET<br />Body length = 1293<br />Persistent connection count: 0<br />Persistent connection count (should be zero): 0<br /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" <br />....<br />401 - Unauthorized: Access is denied due to invalid credentials<br />...<br /><br /><br />Regards,<br /> Saeed.Saeed Hassanpourhttps://www.blogger.com/profile/03389187262843026043noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-20575690636141418972015-04-16T11:51:29.835-07:002015-04-16T11:51:29.835-07:00@Antony: Please see example 1 and 2, respectively....@Antony: Please see example 1 and 2, respectively. The get_response_clob function in example 1 is a convenience function that does both authentication and returns whatever response is received from the remote server.<br /><br />If you need to authenticate and do multiple requests, see example 2, where it is stated "Note the returnvalue from the BEGIN_REQUEST function, which is the authorization string which must be passed along in the "Authorization" HTTP header on any subsequent requests." You could use apex_web_service, flex_ws_api, or even raw utl_http for subsequent requests, as long as you can pass the specified headers along with the request.<br /><br />- MortenMorten Bratenhttps://www.blogger.com/profile/12300886042835631690noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-46931397387339034192015-04-10T03:43:15.636-07:002015-04-10T03:43:15.636-07:00Hi Morten,
Is this package just for authenticatio...Hi Morten,<br /><br />Is this package just for authentication, and for request/reponse I should use some other package like Apex web service or FLEX_WS_API:<br /><br />//first authenticate<br />l_clob := ntlm_http_pkg.get_response_clob('http://servername/page', 'domain\username', 'password');<br /><br />//now send request and get reponse using apex or flex ws<br />...<br /><br />Thanks,<br />AntonyAntonyhttp://www.mail.runoreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-25424849964218428812015-02-12T13:39:53.991-08:002015-02-12T13:39:53.991-08:00This is really great and exactly the sort of packa...This is really great and exactly the sort of package I need, except there is only a CLOB version of get_response. I'm retrieving a binary (Excel) file. Is there any easy way to get the response as a BLOB?Eric Olsonnoreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-18526984258926254162015-01-26T11:42:44.420-08:002015-01-26T11:42:44.420-08:00@Prashant: The examples provided show both a GET a...@Prashant: The examples provided show both a GET and a POST, because apex_web_service.make_request in fact does a POST when it invokes a SOAP web service.<br /><br />Also check out the docs for apex_web_service.make_request_request which allows you to specify the HTTP method yourself:<br /><br />http://docs.oracle.com/cd/E37097_01/doc.42/e35127/apex_web_service.htm#AEAPI1955<br /><br />Of course, you can also use pure utl_http calls to do a POST.<br /><br />- MortenMorten Bratenhttps://www.blogger.com/profile/12300886042835631690noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-54094211293051231672015-01-23T04:53:48.619-08:002015-01-23T04:53:48.619-08:00Here ,I can see in code that you have used 'GE...Here ,I can see in code that you have used 'GET' for sending the request.<br />Can we use 'POST' for hitting web services??<br />Someone please respond!!PRASHANT MISHRAhttps://www.blogger.com/profile/11033268871118291974noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-47356254574549921702015-01-22T01:24:19.752-08:002015-01-22T01:24:19.752-08:00Do we have the same implementation for POST method...Do we have the same implementation for POST method? As one can see this implememtation is for GET REQUEST.PRASHANT MISHRAhttps://www.blogger.com/profile/11033268871118291974noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-5591902164107501782014-11-17T07:28:43.623-08:002014-11-17T07:28:43.623-08:00Hi Morten,
i'm hitting an ORA-6502 on the par...Hi Morten,<br /><br />i'm hitting an ORA-6502 on the parse_challenge_message, i'm using US7ASCII charset. could this be related with that?<br /><br />thxMiguelnoreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-84352839398860957392013-06-25T06:54:49.105-07:002013-06-25T06:54:49.105-07:00hi tony
could you pls mail me your package on rfq...hi tony<br /><br />could you pls mail me your package on rfquotes@gmail.com wherein you are preparing your soap envelope and using the NTLM package set out by Morten? I am building one and am having difficulties in getting it right. much appreciated. <br /><br />thanks<br />regards<br />sacAnonymoushttps://www.blogger.com/profile/05641224817465948305noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-35512482399093550022013-04-18T23:09:43.460-07:002013-04-18T23:09:43.460-07:00@Satheesh: The link to the Alexandria Library is h...@Satheesh: The link to the Alexandria Library is http://code.google.com/p/plsql-utils/ <br /><br />Download the latest zip file from there, unzip and you'll find the NTLM packages.<br /><br />- MortenMorten Bratenhttps://www.blogger.com/profile/12300886042835631690noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-42152805380425201582013-04-16T06:21:08.664-07:002013-04-16T06:21:08.664-07:00I am not able to see that package. Please somebody...I am not able to see that package. Please somebody give me the link to download that package.Satheeshhttps://www.blogger.com/profile/15100596214425290505noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-37869356896455281452013-01-20T20:09:27.288-08:002013-01-20T20:09:27.288-08:00Hi Morten,
I was able to apply your solution usin...Hi Morten,<br /><br />I was able to apply your solution using PL/SQL and UTL_HTTP (without using Apex).<br /><br />Thank you so much for your help!<br /><br />Cheers!<br />jedhttps://www.blogger.com/profile/01481981923710676357noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-26468526273571527152013-01-06T19:36:08.207-08:002013-01-06T19:36:08.207-08:00Hi Morten, just wondering if we can use this in ut...Hi Morten, just wondering if we can use this in utl_dbws? Have you tried it?<br /><br />Thanks!jednoreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-21829171884652812732012-11-28T15:50:24.640-08:002012-11-28T15:50:24.640-08:00Thank you so much for this!
I had a case where I ...Thank you so much for this!<br /><br />I had a case where I desperately needed just this feature. (I had to connect to a password-protected web service on a Microsoft server from within PL/SQL.)<br /><br />We didn't have Apex, but I managed to get it to work with SOAP_API with only a few minor tweaks. Basically, I added the NTLM authentication string explicitly as a SOAP header, using UTL_HTTP.set_header.<br /><br />Oh, and I also had to change the prefix 'NTLM' to 'Negotiate' in NTLM_HTTP_PKG, because that was what this server wanted. Easy enough to do, but NOT very easy to figure out, at least not for me! :)<br /><br />Thank you again!Magnus Börjessonhttp://www.novacura.senoreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-68733593396631047732012-08-10T00:09:25.285-07:002012-08-10T00:09:25.285-07:00@Neil: Here is another link with detailed informat...@Neil: Here is another link with detailed information about the SOAP request:<br /><br />http://www.sharepointsdev.com/sharepoint--development-programming-presharepoint-2010/using-copyintoitems-from-copyasmx-from-a-remote-soap-client-75982.shtml<br /><br />- MortenMorten Bratenhttps://www.blogger.com/profile/12300886042835631690noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-64000389918866034632012-08-10T00:01:38.103-07:002012-08-10T00:01:38.103-07:00@Neil: If Sharepoint has a web service that allows...@Neil: If Sharepoint has a web service that allows you to upload files, then yes, you should be able to use that to upload your Excel files.<br /><br />You would need to look at the Sharepoint API documentation and find out what the SOAP request needs to look like to call the specific web service operation.<br /><br />From a quick Google search, it looks like there is a CopyIntoItems method that you can use, and there are some details on what the SOAP message should look like here:<br /><br />http://stackoverflow.com/questions/7976329/sharepoint-copyintoitems-soap-message-in-objective-c<br /><br />So basically:<br />1. Authenticate with the NTLM package against the Sharepoint server.<br />2. Construct a valid SOAP request containing your file.<br />3. Use the APEX_WEB_SERVICE package to POST your SOAP envelope to the Sharepoint server.<br /><br /><br />- MortenMorten Bratenhttps://www.blogger.com/profile/12300886042835631690noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-30728687843864025722012-08-09T07:17:15.641-07:002012-08-09T07:17:15.641-07:00Hi, Morten-
On a related note, is there a way I ca...Hi, Morten-<br />On a related note, is there a way I can write an Excel file from Apex TO Sharepoint? Automatically?<br /><br />Thanks.<br /><br />-NeilAnonymoushttps://www.blogger.com/profile/12764731208762451028noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-4310882569386387262012-01-31T06:57:03.192-08:002012-01-31T06:57:03.192-08:00Hi,
very nice job by the way !
I used 1.50, but ...Hi,<br /> very nice job by the way !<br /><br />I used 1.50, but needed to disable the debug package, because some apex_application package was missing.<br /><br />But now, easy !!<br /><br />Thanks, <br /><br />From SwitzerlandStefannoreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-78028632600266732572012-01-10T00:06:02.558-08:002012-01-10T00:06:02.558-08:00Hello Morton,
I am not sure if my question applica...Hello Morton,<br />I am not sure if my question applicable to this post, but your prompt is highly appreciated. How could this help in <br />"Using Windows Login Credentials for Single Sign On (NTLM authentication)" for Apex applications.<br /><br />thanxOmar Sawalhahhttps://www.blogger.com/profile/09487026667597285320noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-30456115485168197172011-08-12T04:02:31.753-07:002011-08-12T04:02:31.753-07:00@Anonymous: The APEX_WEB_SERVICE package is includ...@Anonymous: The APEX_WEB_SERVICE package is included with Apex 4:<br /><br />http://apex.oracle.com/i/doc/AEAPI/apex_web_service.htm<br /><br />However, due to a bug with persistent connections (see my comment in the example code), you need to use the FLEX_WS_API package (which is more or less the same package) until the Apex package has been fixed (possibly in Apex 4.1).<br /><br />https://flex-ws-api.samplecode.oracle.com/<br /><br /><br /><br />- MortenMorten Bratenhttps://www.blogger.com/profile/12300886042835631690noreply@blogger.comtag:blogger.com,1999:blog-5215551487816981140.post-8124934099261206782011-08-12T03:55:27.578-07:002011-08-12T03:55:27.578-07:00@Marco: Thanks for the tip, I'll have a look a...@Marco: Thanks for the tip, I'll have a look at it for sure.<br /><br />- MortenMorten Bratenhttps://www.blogger.com/profile/12300886042835631690noreply@blogger.com