DRAFT
Summary
This documents the implementation of one operation of the groups API. There is a reference implementation server which makes it easy to implement the FIFER protocol.
hasMember operation
Note: this is similar to what we already discussed, though as it was implemented, things were tweaked. Of course we should discuss the discrepancies :)
This is an outline of the object model. Each FIFER transport (REST, POX, POJ, SOAP) uses this object model.
...
- GroupHasMemberResponse
- hasMember
- responseMetadata: ResponseMetadata
- errorText: String
- protocolVersion: String
- requestId: String
- resultCode: Sring
- serverMillis: int
- serverType: String
- serverVersion: String
- success: boolean
- warnings: String
SOAP
This is the CXF WSDL from the service interface
...
Code Block |
---|
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:hasMemberResponse xmlns:ns2="http://ws_v0_1.fiferServer.fifer.jasig.org/"> <return> <hasMember>true</hasMember> </return> </ns2:hasMemberResponse> </soap:Body> </soap:Envelope> |
REST
This is like POJ/POX but has a simplified request interface
...
Code Block |
---|
{ "groupHasMemberResponse":{ "hasMember":true, "responseMetadata":{ "protocolVersion":"v0.1.0", "requestId":"abcd123412345678909", "resultCode":"SUCCESS", "serverMillis":123, "serverType":"FIFER reference server", "serverVersion":"v0.5.0", "success":true } } } |
POJ (plain old json)
This is similar to REST, except it doesnt use HTTP methods, and it doesnt use the URL to convey request information (though you could use request params)
...
Code Block |
---|
{ "groupHasMemberResponse":{ "hasMember":true, "responseMetadata":{ "protocolVersion":"v0.1.0", "requestId":"abcd123412345678909", "resultCode":"SUCCESS", "serverMillis":123, "serverType":"FIFER reference server", "serverVersion":"v0.5.0", "success":true } } } |
POX (plan old xml)
Request:
Code Block |
---|
<groupHasMemberRequest> <groupLookup> <handle>someHandle</handle> </groupLookup> <subjectLookup> <id>someId</id> </subjectLookup> </groupHasMemberRequest> |
...
Code Block |
---|
<groupHasMemberResponse> <responseMetadata> <serverType>FIFER reference server</serverType> <requestId>abcd123412345678909</requestId> <serverVersion>v0.5.0</serverVersion> <protocolVersion>v0.1.0</protocolVersion> <success>true</success> <resultCode>SUCCESS</resultCode> <serverMillis>123</serverMillis> </responseMetadata> <hasMember>true</hasMember> </groupHasMemberResponse> |
Reference server
This is a Java server that can easily be used to implement a back-end groups service for all of the above transports. All you need to do is implement the service interfaces. e.g.
...