4.5.2.2 Adding Memberships to P1 – Martin Weber

Now that the protocol client has two arrays of memberships, it can iterate through the second (P2 – Cassie Hicks) to find memberships that do not exist in P1 – Martin Weber. Once it finds a membership that does not exist, it calls the AddMembership WSDL operation. In this example, the protocol client will only find one such membership and thus call AddMembership only once: only MG2 – Shipping does not exist in P1's memberships. The AddMembership WSDL operation takes four parameters:

  • accountName: Set to the name of P1 – Martin Weber, for this scenario.

  • membershipInfo: Set to the MembershipData object acquired in section 4.5.2.1.2 by obtaining memberships.

  • group: Set to the group defined on the MembershipData object that will be added.

  • privacy: Set to the privacy level defined on the MembershipData object that will be added.

Note that the group and privacy parameters could be set to other values depending on the scenario.