#!/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;
[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)|
SELECT
AaaLogin . LOGIN_ID , AaaLogin . USER_ID , AaaLogin . NAME , AaaLogin . DOMAINNAMEFROM
AaaLogin LEFT JOIN SDUser ON AaaLogin . USER_ID = SDUser . USERID LEFT JOIN DomainInfo ON SDUser . DOMAIN_ID = DomainInfo . DOMAINIDWHERE
((( AaaLogin . NAME LIKE N 'Auto' ) AND ( AaaLogin . DOMAINNAME LIKE DomainInfo . DOMAINNAME )) AND ( DomainInfo . ISPUBLIC LIKE N '1' ))ORDER
BY 4i 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