Refer to the definition:
<xs:element name="UserId">
<xs:complexType>
<xs:sequence>
<xs:element ref="AgencyId" minOccurs="0"/>
<xs:element ref="UserIdentifierType" minOccurs="0"/>
<xs:element ref="UserIdentifierValue"/>
<xs:element ref="Ext" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
For LookupUserResponse it looks like we can only return one UserId and multiple UserId(s) in the UserOptionalFields. Given the definition above it looks like the UserId can have multiple agency ids, multiple types of “Id”, one and only one value, and multiple extensions.
Can someone give me a practical use for this?
Ex.
<UserId>
<AgencyId>SPL</AgencyId>
<AgencyId>ABC</AgencyId>
<AgencyId>DEF</AgencyId>
<UserIdentifierType>Barcode Id</UserIdentifierType>
<UserIdentifierType>Drivers License</UserIdentifierType>
<UserIdentifierType>Social Security</UserIdentifierType>
<UserIdentifierType>Student Id</UserIdentifierType>
<UserIdentifierValue>1234567890</UserIdentifierValue>
</UserId>
I think in this case – wait for it – the Scheme definition may be wrong… and I think that the definition in the document may be correct.

A suggested change is as follows:
<xs:element name="UserId">
<xs:complexType>
<xs:sequence>
<xs:element ref="AgencyId" minOccurs="0"maxOccurs="1"/>
<xs:element ref="UserIdentifierType" minOccurs="0" maxOccurs="1"/>
<xs:element ref="UserIdentifierValue"/>
<xs:element ref="Ext" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>