API functionality not working 7.5.0 build 7506

API functionality not working 7.5.0 build 7506

Hello all.
 
I am hoping someone can shed some light on why the API interface is not working for us.  We are attempting to have a secondary app open requests in ServiceDesk.  We have tried to use an NT Domain Account along with a local account.  Here is the code we are using that uses a dummy local authentication account:
 

#!/usr/bin/perl

 

use strict;

use LWP::UserAgent;

use HTTP::Request::Common;

 

my $URLtoPostTo = "http://SDServer:8080/servlets/RequestServlet";

my $browser = LWP::UserAgent->new;

my $response = $browser->post(

      $URLtoPostTo,

      [

      'operation'             =>    'AddRequest',

      'reqTemplate'           =>    '',

      'subject'               =>    'TEST FROM PERL',

      'description'           =>    'All your base are belong to us.',

      'requester'             =>    'Auto',

      'category'              =>    'general',

      'subcategory'           =>    'other',

      'username'              =>    'Auto',

      'password'              =>    'Auto'

      ],

);

die "Error: ", $response->status_line

      unless $response->is_success;

print "\nand the answer is\n\n";

 

 

#     'logonDomainName' =>    'Local Authentication'

     

exit;

 

Every time we run the code it gives this error in the log:
 

[07:53:23:581]|[05-29-2009]|[com.adventnet.servicedesk.authentication.internal.SDRelationalLoginModule]|[INFO]|[39]|: Inside sdrelational login module and logonDomainName is Local Authentication, domain name is null|

[07:53:23:581]|[05-29-2009]|[SYSOUT]|[INFO]|[39]|: javax.security.auth.login.FailedLoginException: Invalid Password|

[07:53:23:581]|[05-29-2009]|[SYSOUT]|[INFO]|[39]|:    at com.adventnet.servicedesk.authentication.internal.SDRelationalLoginModule.login(SDRelationalLoginModule.java:500)|

[07:53:23:581]|[05-29-2009]|[SYSOUT]|[INFO]|[39]|:    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)|


We have also attempted to use the logondomainname attribute with the same results. Further down in the log it appears to be using this query to find the login:
 

SELECT

AaaLogin . LOGIN_ID , AaaLogin . USER_ID , AaaLogin . NAME , AaaLogin . DOMAINNAME

FROM

AaaLogin

LEFT JOIN SDUser ON AaaLogin . USER_ID = SDUser . USERID

LEFT JOIN DomainInfo ON SDUser . DOMAIN_ID = DomainInfo . DOMAINID

WHERE

((( AaaLogin . NAME LIKE N 'Auto' ) AND ( AaaLogin . DOMAINNAME LIKE DomainInfo . DOMAINNAME )) AND ( DomainInfo . ISPUBLIC LIKE N '1' ))

ORDER

BY 4

i did some looking at the query and based upon the AaaLogin to SDUser join it will always return no records since the join should be on the Login_id column for the AaaLogin table and not the User_id column. 

This seems like a defect but since i have seen other posts saying that the API works i was wondering if anyone can help us out by giving us a working example to add a request.  for the record our SD version is 7.5.0 build 7506. Any help or insight would be greatly appreciated.

thanks,

G Tupper

                  New to ADSelfService Plus?