To make it easier I've included the whole function:
sub soapGetList{
my $soap = shift;
my $user = shift;
my $pass = shift;
my $query = shift;
# Initialize the Header
my $header = SOAP::Header->name(
'AuthenticationInfo', { userName => $user, password => $pass , locale =>
"en_US", timezone => "EST"}
);
# Pass the Request_ID of the ticket
my $inputData = SOAP::Data->new(
name => 'Qualification',
value => $query,
type => 'xsd:string'
);
my $response = $soap->OpGetList($header,$inputData);
if (&soapErrorCheck($response) == 0) {
# add this to get a full array of the results
my @params = $response->paramsout;
# Process each of the records
foreach my $row(@params) {
print($row->{'txt_Service_Event'}." ");
print($row->{'txt_Description'}."\n");
}
}
return (0);
}
Actual Data:
Service Event+ Status Description Creation Date
SE01631976 Pending Desc1 9/5/2006 16:38
SE01634780 Pending Desc2 9/8/2006 11:35
SE01636647 Re-Opened Desc3 9/11/2006 9:32
SE01643964 Pending Desc4 9/18/2006 9:09
SE01644297 Re-Opened Desc5 9/18/2006 12:40
SE01650246 Pending Desc6 9/24/2006 12:05
SE01656135 Pending Desc7 10/1/2006 2:31
SE01658513 Accepted Desc8 10/3/2006 15:26
The record that is not being returned is SE01631976.
The timezone really wouldn't matter because the earliest date from the
results is 9/5/2006 4:38:03 PM
Sean
-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Carey Matthew Black
Sent: Tuesday, October 03, 2006 4:02 PM
To: [email protected]
Subject: Re: [Soap Question] Problem with the <= in a query resolved ...
sort of
Sean,
Ok... then my next guess would be it is a timezone issue. :)
Does your web Service client specify what timezone the client is in in
the header information?
Could it be that one less record is due to how "09/01/2006 00:00:00
AM" is interpreted in the User Tool vs Web Services client?
Can you list the values from each client for the tickets involved and
see if they values agree?
--
Carey Matthew Black
Remedy Skilled Professional (RSP)
ARS = Action Request System(Remedy)
Love, then teach
Solution = People + Process + Tools
Fast, Accurate, Cheap.... Pick two.
On 10/3/06, Sean Garrison <[EMAIL PROTECTED]> wrote:
> Thanks Carey for your help. Unfortunately this time it did not resolve
the
> issue. I'm beginning to think there is either a bug with the soap
interface
> (SOAP::Lite) or with web services.
>
> Here is the code change:
>
> if (&soapErrorCheck($response) == 0) {
> # add this to get a full array of the results
> my @params = $response->paramsout;
>
> # Process each of the records
> foreach my $row(@params) {
> print($row->{'txt_Service_Event'}." ");
> print($row->{'txt_Description'}."\n");
> }
> }
>
> It still yields 6 results.
>
> I am running this query in Soap:
>
> ('dt_Creation Date' >= "09/01/2006 00:00:00 AM") AND ('rad_Severity' =
"1.")
> AND ('rad_Status' <= "Pending")
>
> It yields 6 results.
> Txt_Service_Event rad_Status txt_Description
> 2 Pending
> 3 Re-Opened
> 4 Pending
> 5 Re-Opened
> 6 Pending
> 7 Pending
>
> If I run the same query in Remedy:
>
> ('dt_Creation Date' >= "09/01/2006 00:00:00 AM") AND ('rad_Severity' =
"1.")
> AND ('rad_Status' <= "Pending")
>
> I get seven results:
>
> Txt_Service_Event rad_Status txt_Description
> 1 Pending
> 2 Pending
> 3 Re-Opened
> 4 Pending
> 5 Re-Opened
> 6 Pending
> 7 Pending
>
> I was wondering if anyone else had run into a similar issue???? I am
> running ARS 6.3 patch 17 on solaris.
>
> Thanks,
>
> Sean
>
>
>
>
>
> -----Original Message-----
> From: Action Request System discussion list(ARSList)
> [mailto:[EMAIL PROTECTED] On Behalf Of Carey Matthew Black
> Sent: Tuesday, October 03, 2006 12:38 PM
> To: [email protected]
> Subject: Re: [Soap Question] Problem with the <= in a query resolved ...
> sort of
>
> Sean,
>
> That looks like Perl, SOAP::Lite to me... :) So forgive me if I have
> made a bad assumption...
>
> Reed up on the SOAP::Lite module...
> "
> IN/OUT, OUT PARAMETERS AND AUTOBINDING
>
> SOAP::Lite gives you access to all parameters (both in/out and out)
> and also does some additional work for you. Lets consider following
> example:
>
> <mehodResponse>
> <res1>name1</res1>
> <res2>name2</res2>
> <res3>name3</res3>
> </mehodResponse>
>
> In that case:
>
> $result = $r->result; # gives you 'name1'
> $paramout1 = $r->paramsout; # gives you 'name2', because of
> scalar context
> $paramout1 = ($r->paramsout)[0]; # gives you 'name2' also
> $paramout2 = ($r->paramsout)[1]; # gives you 'name3'
>
> or
>
> @paramsout = $r->paramsout; # gives you ARRAY of out parameters
> $paramout1 = $paramsout[0]; # gives you 'res2', same as
($r->paramsout)[0]
> $paramout2 = $paramsout[1]; # gives you 'res3', same as
($r->paramsout)[1]
> "
>
> So I think you should do this...
>
>
> > if (&soapErrorCheck($response) == 0) {
> # add this to get a full array of the results
> @paramsout = $response->paramsout;
>
> # Process each of the records
> # foreach my $row($response->paramsout()) { # incorrect use of
> -->paramsout ?
> foreach my $row(@paramsout) {
> print($row->{'txt_Service_Event'}." ");
> print($row->{'txt_Description'}."\n");
> }
> }
>
>
>
> Maybe there is a more compact syntax than the above, but the above
> might also be clearer for the next person too.
>
> HTH.
>
> --
> Carey Matthew Black
> Remedy Skilled Professional (RSP)
> ARS = Action Request System(Remedy)
>
> Love, then teach
> Solution = People + Process + Tools
> Fast, Accurate, Cheap.... Pick two.
>
> On 10/3/06, Sean Garrison <[EMAIL PROTECTED]> wrote:
> > Ok ... the < worked. Thank you so much for your help. Now when I
> > actually get the search results the first row is missing ...
> >
> > For example:
> > I am running this query in Soap:
> >
> > ('dt_Creation Date' >= "09/01/2006 00:00:00 AM") AND ('rad_Severity' =
> "1.")
> > AND ('rad_Status' <= "Pending")
> >
> > It yields 6 results.
> >
> > If I run the same query in Remedy:
> >
> > ('dt_Creation Date' >= "09/01/2006 00:00:00 AM") AND ('rad_Severity' =
> "1.")
> > AND ('rad_Status' <= "Pending")
> >
> > I get 7 results. The first row seems to be missing every time. So I
have
> > assumed it was my code ...
> >
> > so here is my soap code that prints out the values:
> >
> > my $response = $soap->OpGetList($header,$inputData);
> >
> > #Check for Errors
> > if (&soapErrorCheck($response) == 0) {
> > # Process each of the records
> > foreach my $row($response->paramsout()) {
> > print($row->{'txt_Service_Event'}." ");
> > print($row->{'txt_Description'}."\n");
> > }
> > }
> >
> >
> >
> > Am I missing something?
> >
> > Any input would be greatly appreciated.
> >
> > Thanks,
> >
> > Sean
>
>
____________________________________________________________________________
> ___
> UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org
>
>
____________________________________________________________________________
___
> UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org
>
____________________________________________________________________________
___
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org