Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: Simple WS client

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: Simple WS client


Chronological Thread 
  • From: Chris Hyzer <>
  • To: "Imholz, John J." <>
  • Cc: "" <>
  • Subject: [grouper-users] RE: Simple WS client
  • Date: Thu, 17 Apr 2014 10:35:55 -0400
  • Importance: normal

Can you give me link of the grouper client you downloaded?  And confirm you are using the binary and not one that you built.  Thanks, Chris


-------- Original message --------
From: "Imholz, John J." <>
Date: 04/17/2014 9:48 AM (GMT-05:00)
To: 'Chris Hyzer' <>
Cc:
Subject: RE: Simple WS client


My simple test fails to compile:

package edu.internet2.middleware.grouperClient.poc;

import edu.internet2.middleware.grouperClient.api.GcHasMember;
import edu.internet2.middleware.grouperClient.ws.beans.WsHasMemberResults;
import edu.internet2.middleware.grouperClient.ws.beans.WsResultMeta;

public class IsMemberTest {
    public static void main(String[] args) {
        WsHasMemberResults r = new GcHasMember().addSubjectId("<id>").assignGroupName("<group>").execute();
    }
}

$ javac -cp grouperClient.jar IsMemberTest.java
grouperClient.jar(edu/internet2/middleware/grouperClientExt/org/apache/commons/jexl/util/introspection/Introspector.java):32: duplicate class: edu.internet2.middleware.grouperClientExt.org.apache.commons.jexl.util.Introspector
public class Introspector {
       ^
grouperClient.jar(edu/internet2/middleware/grouperClientExt/org/apache/commons/jexl/util/introspection/UberspectImpl.java):55: cannot access edu.internet2.middleware.grouperClientExt.org.apache.commons.jexl.util.introspection.Introspector
bad class file: ZipFileIndexFileObject[grouperClient.jar(edu/internet2/middleware/grouperClientExt/org/apache/commons/jexl/util/introspection/Introspector.java)]
file does not contain class edu.internet2.middleware.grouperClientExt.org.apache.commons.jexl.util.introspection.Introspector
Please remove or make sure it appears in the correct subdirectory of the classpath.
    private static Introspector introspector;
                   ^

GrouperClient version 1.6.0
Javac version 1.6.0_30

jji
-----Original Message-----
From: Chris Hyzer [mailto:]
Sent: Wednesday, April 16, 2014 4:51 PM
To: Imholz, John J.
Cc:
Subject: RE: Simple WS client

Its easy, just add the jar, and the config file to the classpath, and make an API call:

http://anonsvn.internet2.edu/viewvc/viewvc.py/i2mi/branches/GROUPER_2_1_BRANCH/grouper-misc/grouperClient/src/java/edu/internet2/middleware/grouperClient/api/

Something like:

new GcHasMember().addSubjectId("123").assignGroupName("a:b").execute();

Then the results object is there and in there is if it is a member

Thanks,
Chris


-----Original Message-----
From: Imholz, John J. [mailto:]
Sent: Wednesday, April 16, 2014 3:46 PM
To: Chris Hyzer
Cc:
Subject: RE: Simple WS client

Thanks, that was helpful.

I'm successfully checking membership with the command line.

I now want to make it easy to check for group membership from these .jsp pages.  I assume I have to put grouperClient.jar (or a different jar in the lib directory) and call directly with java.  That's why I was trying to compile earlier.

jji

-----Original Message-----
From: Chris Hyzer [mailto:]
Sent: Wednesday, April 16, 2014 2:31 PM
To: Imholz, John J.
Cc:
Subject: RE: Simple WS client

You can use the grouper client which is one jar and supports the entire REST API.

Download the version for the grouper WS you have, and you need a grouper.client.properties file, and it should work fine.  No compiling necessary.

https://spaces.internet2.edu/display/Grouper/Grouper+Downloads

the SOAP client uses Axis which is overkill, its really only for testing.

Thanks,
Chris

-----Original Message-----
From: [mailto:] On Behalf Of Imholz, John J.
Sent: Wednesday, April 16, 2014 1:34 PM
To: ''
Subject: [grouper-users] Simple WS client

Is there a resource that shows how to compile and execute the example java code in the samples documentation?

I've using our web service with perl, but now I have a need for a Java client (not a lot of Java expertise here, but there are a couple of JSP pages that need Grouper data.)

I've struggled to get even a simple Java example to compile (I've probably confused myself in trying too many different things like: wsdl2java and wsimport.) So I'm looking for what it takes to compile and run the sample code provided in the doc (e.g.  /trunk/grouper-ws/grouper-ws/doc/samples/getMembers/WsSampleGetMembersLite_soap.txt)

Any help will be appreciated.

jji



Archive powered by MHonArc 2.6.16.

Top of Page