Created by: Greg Dirst on 04-11-2010 07:25:34 PM I am getting a 12007 response when checking the status of the response from XMLHTTP. [url=https://bogusaddress.com/vmrest/users/https://bogusaddress.com/vmrest/users//credential/pin Here is a snippet of the code executing when this occurs. The 12007 code is discovered at line 500 and reported by line 510. This is happening in our dev environment, but not production yet. '-- reset password for user if we found '-- the user on a unity server above 460 objXML.Open "PUT", "https://" & sUMServerToResetAgainst & "/vmrest/users/" & sUserObjectId & "/credential/pin", False, "boguser", "boguspassword" 470 objXML.setRequestHeader "Authorization", "Basic " & Base64Encode("bogususer:boguspassword") 480 objXML.setRequestHeader "Content-Type", "application/xml" '-- this error handler is added since there is '-- an existing defect with XMLHTTP '-- where return code 204 is changed to a '-- 1223 exception. The XMLHTTP is '-- incorrectly considering a 204 response '-- as an error when it really isn't. On Error Resume Next 490 objXML.send "<Credential>" & _ "<UserObjectId>" & sUserObjectId & "</UserObjectId>" & _ "<CredentialType>4</CredentialType>" & _ "<Credentials>" & sPassword & "</Credentials>" & _ "<Locked>0</Locked>" & _ "</Credential>" On Error GoTo End_of_Method '-- if a 1223 is found consider this a successful '-- call for the password was reset 500 If objXML.Status <> "200" And objXML.Status <> "204" And objXML.Status <> "1223" Then 510 Err.Raise vbObjectError + 12, cMethodName, "There was a problem with the reset password request" & vbCrLf & vbCrLf & "[" & objXML.Status & "] " & objXML.responseText 520 End If
Subject: RE: 12007 when calling VMREST/USERS/[Object Id]/CREDENTIAL/PIN/ Replied by: Greg Dirst on 05-11-2010 03:42:10 PM RESOLVED - this was PEBCAK 12007 error is related to not being able resolve the full qualified domain name (FQDN). The error was in the code where the variable sUMServerToResetAgainst did not have a valid address.
Subject: RE: 12007 when calling VMREST/USERS/[Object Id]/CREDENTIAL/PIN/ Replied by: Andy Melick on 09-11-2011 10:14:24 AM Greg,
You posted this last year and I was wondering if you would be willing to share the rest of your code. I have tried similar XMLHTTP PUT requests and I am getting a 415 Unsupported Media Type.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: