I agree with Axton...you are likely looking for parseQualification, not
decode
 
http://arswiki.org/dist/ars/docs/ARS/7.1/com/bmc/arsys/api/ARServerUser.html
#parseQualification(java.lang.String,%20java.lang.String)

  _____  

From: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org] On Behalf Of Lyle Taylor
Sent: Tuesday, January 27, 2009 11:30 AM
To: arslist@ARSLIST.ORG
Subject: Java API Question


** 

Hi All,

 

I'm trying to get started using the Java API and am running into something I
don't understand.

 

I have the following code that simply queries CMT:People for everybody that
has Unrestricted Access:

 

            ARServerUser srv = new ARServerUser(<user>, <password>, null,
<server>, <port>);

            try {

                  srv.login();

                  

                  int fields[] = {1, 4};

                  OutputInteger nMatches = new OutputInteger();

                  List<Entry> entries =
srv.getListEntryObjects("CTM:People", srv.decodeQualification("'Unrestricted
Access' != $NULL$"), 0, 0, null, fields, false, nMatches);

                  

                  if ( nMatches.intValue() > 0 ) {

                        for (Entry entry : entries) {

                              String id = entry.getEntryId();

                              String str = entry.toString();

                        }

                  }

            } catch (ARException e) {

                  e.printStackTrace();

            }

 

The code compiles fine and runs but throws an exception when it tries to
decode the qualification string.  I get the following error:

 

ERROR (402): Incorrect format in the definition file; (missing cond op --
'Unrestricted Access' != $NULL$)

 

If I understand correctly, the qualification shouldn't need a conditional
operator, a relational operator should be just fine.  If I remove the
qualification and simply pass null, it works without any errors.  Has anyone
seen this error before and have an idea of what I might be doing wrong or
missing?

 

Let me know if I need to provide more information.

 

Thanks,

Lyle Taylor



NOTICE: This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not the
intended recipient, please contact the sender by reply email and destroy all
copies of the original message.

__Platinum Sponsor: RMI Solutions ARSlist: "Where the Answers Are" html___ 

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: RMI Solutions ARSlist: "Where the Answers Are"

Reply via email to