Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Subject external attributes retrieval

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Subject external attributes retrieval


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Martin van Es <>
  • Cc: Grouper Users Mailing List <>
  • Subject: RE: [grouper-users] Subject external attributes retrieval
  • Date: Mon, 16 Feb 2009 12:10:11 -0500
  • Accept-language: en-US
  • Acceptlanguage: en-US

First of all, it kind of worked for me, the attribute was returned, but the attribute name wasn’t…
 
Request:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
  <soapenv:Body>
    <ns1:getGroupsLite
      <ns1:clientVersion>v1_4_001</ns1:clientVersion>
      <ns1:subjectId>GrouperSystem</ns1:subjectId>
      <ns1:subjectSourceId></ns1:subjectSourceId>
      <ns1:subjectIdentifier></ns1:subjectIdentifier>
      <ns1:memberFilter>All</ns1:memberFilter>
      <ns1:actAsSubjectId></ns1:actAsSubjectId>
      <ns1:actAsSubjectSourceId></ns1:actAsSubjectSourceId>
      <ns1:actAsSubjectIdentifier></ns1:actAsSubjectIdentifier>
      <ns1:includeGroupDetail>F</ns1:includeGroupDetail>
      <ns1:includeSubjectDetail>F</ns1:includeSubjectDetail>
      <ns1:subjectAttributeNames>description</ns1:subjectAttributeNames>
    </ns1:getGroupsLite>
  </soapenv:Body>
</soapenv:Envelope>
 
Response:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
  <soapenv:Body>
    <ns:getGroupsLiteResponse
      <ns:return
        type="edu.internet2.middleware.grouper.ws.soap.WsGetGroupsLiteResult">
        <ns:responseMetadata
          type="edu.internet2.middleware.grouper.ws.soap.WsResponseMeta">
          <ns:millis>70</ns:millis>
          <ns:resultWarnings
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:nil="true" />
          <ns:serverVersion>v1_4_001</ns:serverVersion>
        </ns:responseMetadata>
        <ns:resultMetadata
          type="edu.internet2.middleware.grouper.ws.soap.WsResultMeta">
          <ns:params
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:nil="true" />
          <ns:resultCode>SUCCESS</ns:resultCode>
          <ns:resultCode2
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:nil="true" />
          <ns:resultMessage>
            Success for: clientVersion: v1_4_001, subjectLookups: Array
            size: 1: [0]:
            WsSubjectLookup[subjectId=GrouperSystem,subjectIdentifier=,subjectSourceId=]
 
            memberFilter: All, includeGroupDetail: false, actAsSubject:
            WsSubjectLookup[subjectId=,subjectIdentifier=,subjectSourceId=]
            , params: null
          </ns:resultMessage>
          <ns:success>T</ns:success>
        </ns:resultMetadata>
        <ns:subjectAttributeNames
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:nil="true" />
        <ns:wsGroups
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:nil="true" />
        <ns:wsSubject
          type="edu.internet2.middleware.grouper.ws.soap.WsSubject">
          <ns:attributeValues>GrouperSysAdmin</ns:attributeValues>
          <ns:id>GrouperSystem</ns:id>
          <ns:identifierLookup
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:nil="true" />
          <ns:name xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:nil="true" />
          <ns:resultCode>SUCCESS</ns:resultCode>
          <ns:sourceId>g:isa</ns:sourceId>
          <ns:success>T</ns:success>
        </ns:wsSubject>
      </ns:return>
    </ns:getGroupsLiteResponse>
  </soapenv:Body>
</soapenv:Envelope>
 
OK, I think some operations did this better than others, but you are right, getGroups was not doing a great job with subject attributes (in this case it was at least not listing which attribute names it was returning).  I fixed this in the latest 1.4 branch, can you get the latest 1.4 branch and try again?
 
 
cvs -d:pserver::/home/cvs/i2mi login
cvs -d:pserver::/home/cvs/i2mi export -r GROUPER_1_4_BRANCH grouper-ws
 
 
Here is a fixed request for getGroupsLite SOAP:
 
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
  <soapenv:Body>
    <ns1:getGroupsLite
      <ns1:clientVersion>v1_4_001</ns1:clientVersion>
      <ns1:subjectId>GrouperSystem</ns1:subjectId>
      <ns1:subjectSourceId></ns1:subjectSourceId>
      <ns1:subjectIdentifier></ns1:subjectIdentifier>
      <ns1:memberFilter>All</ns1:memberFilter>
      <ns1:actAsSubjectId></ns1:actAsSubjectId>
      <ns1:actAsSubjectSourceId></ns1:actAsSubjectSourceId>
      <ns1:actAsSubjectIdentifier></ns1:actAsSubjectIdentifier>
      <ns1:includeGroupDetail>F</ns1:includeGroupDetail>
      <ns1:includeSubjectDetail>F</ns1:includeSubjectDetail>
      <ns1:subjectAttributeNames>description</ns1:subjectAttributeNames>
    </ns1:getGroupsLite>
  </soapenv:Body>
</soapenv:Envelope>
 
Here is the response which looks correct:
 
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
  <soapenv:Body>
    <ns:getGroupsLiteResponse
      <ns:return
        type="edu.internet2.middleware.grouper.ws.soap.WsGetGroupsLiteResult">
        <ns:responseMetadata
          type="edu.internet2.middleware.grouper.ws.soap.WsResponseMeta">
          <ns:millis>1475</ns:millis>
          <ns:resultWarnings
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:nil="true" />
          <ns:serverVersion>v1_4_001</ns:serverVersion>
        </ns:responseMetadata>
        <ns:resultMetadata
          type="edu.internet2.middleware.grouper.ws.soap.WsResultMeta">
          <ns:params
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:nil="true" />
          <ns:resultCode>SUCCESS</ns:resultCode>
          <ns:resultCode2
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:nil="true" />
          <ns:resultMessage>
            Success for: clientVersion: v1_4_001, subjectLookups: Array
            size: 1: [0]:
            WsSubjectLookup[subjectId=GrouperSystem,subjectIdentifier=,subjectSourceId=]
 
            memberFilter: All, includeGroupDetail: false, actAsSubject:
            WsSubjectLookup[subjectId=,subjectIdentifier=,subjectSourceId=]
            , params: null
          </ns:resultMessage>
          <ns:success>T</ns:success>
        </ns:resultMetadata>
        <ns:subjectAttributeNames>description</ns:subjectAttributeNames>
        <ns:wsGroups
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:nil="true" />
        <ns:wsSubject
          type="edu.internet2.middleware.grouper.ws.soap.WsSubject">
          <ns:attributeValues>GrouperSysAdmin</ns:attributeValues>
          <ns:id>GrouperSystem</ns:id>
          <ns:identifierLookup
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:nil="true" />
          <ns:name xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:nil="true" />
          <ns:resultCode>SUCCESS</ns:resultCode>
          <ns:sourceId>g:isa</ns:sourceId>
          <ns:success>T</ns:success>
        </ns:wsSubject>
      </ns:return>
    </ns:getGroupsLiteResponse>
  </soapenv:Body>
</soapenv:Envelope>
 
 
Regards,
Chris
 
 
 
> -----Original Message-----
> From: Martin van Es []
> Sent: Monday, February 16, 2009 8:46 AM
> To: Chris Hyzer
> Cc: Grouper Users Mailing List
> Subject: Re: [grouper-users] Subject external attributes retrieval
>
> Hi Chris,
>
> Either I don't get it, or the example source is broken?
> For testing I use the example mysql source that is part of the
> quickstart
> installation. As far as I understand the example source contains 3
> source-
> specific attributes: "loginid, name and description", specified bij the
> 'name'
> column in the subjectattribute table.
>
> sources.xml refers to these columns as lfname, loginid and
> descrtiption.
> According to the source.xml explanation
> 0.3.1-doc)
> "Each row corresponds to exactly one subject, and the column names of
> the
> returned table are used as the attribute names of the subject objects
> created
> for each row".
>
> If I specify 'description' as an attribute I want returned by e.g.
> getGroupsLite (as attributes supplied in the wsSubject section of the
> answer)
> either in grouper-ws.properties or in the request (by specifying the
> subjectAttributeNames) I just don't get that attribute returned:
>
> <ns:wsSubject
> type="edu.internet2.middleware.grouper.ws.soap.WsSubject">
> <ns:attributeValues xsi:nil="true"/>
> <ns:id>mrvanes</ns:id>
> <ns:identifierLookup xsi:nil="true"/>
> <ns:name xsi:nil="true"/>
> <ns:resultCode>SUCCESS</ns:resultCode>
> <ns:sourceId>example</ns:sourceId>
> <ns:success>T</ns:success>
> </ns:wsSubject>
>
> What am I missing?
>
> Also, in sources.xml three param-names are referenced that I can't find
> back
> in the documentation: SubjectID_AttributeType, Name_AttributeType and
> Description_AttributeType. What are they? Generic parameters, or
> specific
> methods that belong to the example connector (and thus explained by
> reading
> the subject api sources?)
>
> Regards,
> Martin
>
> On Thursday 12 February 2009 16:04:42 Chris Hyzer wrote:
> > OK, here is how it works:
> >
> > 1. The default attribute names (comma separated) sent back for each
> request
> > are specified in grouper-ws.properties under the key:
> >
> > ws.subject.result.attribute.names
> >
> > 2. If the caller sets T to retrieve subject detail, then the
> attributes
> > will be appended to that list in grouper-ws.properties key:
> > ws.subject.result.detail.attribute.names
> >
> > 3. If the caller specifies subjectAttributeNames (comma separated),
> then
> > those will be appended to the list (independent of the detail
> attributes).
> >
> > So there are central settings, and caller settings that you need to
> design
> > for and specify...
> >
> > Make sense?
> >
> > I updated this doc:
> >
> >
> vice
> >s
> >
> > Thanks,
> > Chris
> >
> > > -----Original Message-----
> > > From: Martin van Es []
> > > Sent: Thursday, February 12, 2009 4:20 AM
> > > To: Grouper Users Mailing List
> > > Subject: [grouper-users] Subject external attributes retrieval
> > >
> > > Hi,
> > >
> > > I was wondering if Grouper can assist in arbitrary subject
> attributes
> > > retrieval.
> > > Is it possible to return external subject attributes while
> retrieving
> > > subjects
> > > with includeSubjectDetail=true e.g? Or would this require 2 actions
> on
> > > the
> > > client side: one to retrieve a unique lookup key and source from
> > > grouper for
> > > the subject another to get the attributes in the external source?
> > >
> > > Regards,
> > > Martin
 



Archive powered by MHonArc 2.6.16.

Top of Page