Introduction to Grouper

advertisement

Grouper Training

Developers and Architects

Web Services - Part 3

Chris Hyzer

Internet2

University of Pennsylvania

This work licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.

Contents

• Introduction

• Authentication

• Samples

• Documentation of structs (Javabeans)

• Translating struct (Javabean) to:

• SOAP

• REST-like JSON

• REST-like XML

• REST-like XHTML

• REST-like HTTP params

2

Introduction to WS for developers

3

Authentication

• Grouper WS authentication is pluggable

• Depends on your institution’s config

• Generally people use HTTP basic auth

4

Samples

• Each WS operation has samples

• Samples for SOAP, REST-like, all formats

• Automated, regenerated for each release

• Stored in SVN, versioned, web accessible

• 300 samples in v2.1

5

Samples (continued)

• Input

• Output

• Java source code

• STDOUT/ERR

6

Samples Versioning

• Trunk is linked from documentation

• Edit the URL, change “trunk” to the branch or version

• E.g. for the 2.1 branch, use branches/GROUPER_2_1_BRANCH

• E.g. for the 2.1.1 version, use tags/GROUPER_2_1_1

• Example of 2.1 branch sample

7

WS RPC Structs (Javabeans)

• Javadoc describes the RPC structs

• Stored in SVN just like samples

• Versioned, web accessible, etc

8

SOAP sample editing

• Look at a SOAP sample

• Look at the Javadoc for input struct

• Check the WSDL or ordering

• Edit the sample

9

REST-like JSON sample editing

• Look at a JSON sample

• Look at the Javadoc for input struct

• Edit the JSON

10

REST-like XML sample editing

• Look at an XML sample

• Look at the Javadoc for input struct

• Edit the XML

11

REST-like XHTML sample editing

• Look at an XHTML sample

• Look at the Javadoc for input struct

• Edit the XHTML

12

REST-like HTTP param sample editing

• Look at an HTTP param sample

• Look at the Javadoc for input struct

• Edit the HTTP params

13

Quiz

• Click on the quiz link in the video description to reinforce your knowledge of this topic

14

Thanks!

Further information:

• Infosheets, mailing lists, wiki, downloads, etc.: www.internet2.edu/grouper

• Grouper demo server: grouperdemo.internet2.edu/

• Grouper Online Training Home: spaces.internet2.edu/x/IIGfAQ

This work licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.

15

Download