createMembership

Method description

createMembership is the method to add a single person as a member to a single group.

Preconditions for use

You will need to know the syncID of the group and the syncID of the person who should be member of the group

Message Schema

Input parameters / request message elements

Name

Description

Data type

Allowed values

M/O

<sourcedId><identifier>

A unique identifier for this person to group mapping

Text

Max 255 characters

M

<membership>

Wrapper element for one <groupSourcedId ><identifier> element and one <member> elements

M

<membership><groupSourcedId ><identifier>

The syncID for the group that will have a member.

Text

M

<membership><member><memberSourcedId ><identifier>

The syncID for the person to add as a member

Text

M

Please refer to the WSDL for the full element structure, only key elements are described here

Response message elements

Name

Description

Data type

createMembershipResponse

Empty response element

Empty

Example

Description

I have a group A with syncID G1 in itslearning

I have a persons B with syncID 99998888 itslearning.

I want the person B to become member of group A in itslearning

Example request message

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ims="http://www.imsglobal.org/services/common/imsMessBindSchema_v1p0" xmlns:ims1="http://www.imsglobal.org/services/mms/xsd/imsMemberManMessSchema_v1p0" xmlns:ims2="http://www.imsglobal.org/services/common/imsCommonSchema_v1p0" xmlns:ims3="http://www.imsglobal.org/services/mms/xsd/imsMemberManDataSchema_v1p0">
<soapenv:Header>
<ims:syncRequestHeaderInfo>
<ims:messageIdentifier>1</ims:messageIdentifier>
</ims:syncRequestHeaderInfo>
</soapenv:Header>
<soapenv:Body>
<ims1:createMembershipRequest>
<ims1:sourcedId>
<ims2:identifier>M1</ims2:identifier>
</ims1:sourcedId>
<ims1:membership>
<ims3:groupSourcedId>
<ims2:identifier>G1</ims2:identifier>
</ims3:groupSourcedId>
<ims3:member>
<ims3:memberSourcedId>
<ims2:identifier>99998888</ims2:identifier>
</ims3:memberSourcedId>
<ims3:role>
<ims3:roleType>01</ims3:roleType>
</ims3:role>
</ims3:member>
</ims1:membership>
</ims1:createMembershipRequest>
</soapenv:Body>
</soapenv:Envelope>

Example response message

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" >
<s:Header>
<h:syncResponseHeaderInfo >
<messageIdentifier>1</messageIdentifier>
<statusInfo>
<codeMajor>success</codeMajor>
<severity>warning</severity>
<codeMinor>
<codeMinorField>
<codeMinorName>membershipmanagement</codeMinorName>
<codeMinorValue>idalreadyinuseupdateinstead</codeMinorValue>
</codeMinorField>
</codeMinor>
<messageIdRef>1</messageIdRef>
<description>
<language >en-US</language>
<text >Object exists, has been updated instead</text>
</description>
</statusInfo>
</h:syncResponseHeaderInfo>
<o:Security s:mustUnderstand="1" >
<u:Timestamp u:Id="_0">
<u:Created>2011-02-03T14:28:28.477Z</u:Created>
<u:Expires>2011-02-03T14:33:28.477Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<createMembershipResponse />
</s:Body>
</s:Envelope>