Glossary Item Box

Government Gateway 2.2.0 (MR-01) ISV Developer Help (Doc Version 06/03/08) | Send comments on this topic.

# GatewaySoapPublic.GsoGetAssignedClientAllocationsForAgentCredential Method

This method returns all client allocations that have been assigned to the specified agent credential.

public void GsoGetAssignedClientAllocationsForAgentCredential(
string inputXml,
out string outputXml
);

#### Parameters

inputXml
  Input Xml for this method must have the namespace urn:GSO-System-Services:external:1.65:GsoGetAssignedClientAllocationsForAgentCredentialXmlInput
outputXml
  Output Xml for this method must have the namespace urn:GSO-System-Services:external:1.65:GsoGetAssignedClientAllocationsForAgentCredentialXmlOutput

#### Remarks

The input parameter is an XML document that contains the following elements:

- TargetCredentialIdentifier: The agent credential you want the information for

The schema for the input document is as follows (this xsd references GsoCore.xsd):

    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema targetNamespace="urn:GSO-System-Services:external:1.65:GsoGetAssignedClientAllocationsForAgentCredentialXmlInput" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:core="urn:GSO-System-Services:external:1.65:GsoCore" xmlns="urn:GSO-System-Services:external:1.65:GsoGetAssignedClientAllocationsForAgentCredentialXmlInput" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0">
      <xs:import namespace="urn:GSO-System-Services:external:1.65:GsoCore" />
      <xs:element name="GsoGetAssignedClientAllocationsForAgentCredentialXmlInput">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="TargetCredentialIdentifier" type="core:CredentialIdentifierTYPE" minOccurs="1" maxOccurs="1" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>

The schema for the output document is as follows (this xsd references GsoCore.xsd):

    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema targetNamespace="urn:GSO-System-Services:external:1.65:GsoGetAssignedClientAllocationsForAgentCredentialXmlOutput" xmlns="urn:GSO-System-Services:external:1.65:GsoGetAssignedClientAllocationsForAgentCredentialXmlOutput" xmlns:core="urn:GSO-System-Services:external:1.65:GsoCore" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0">
      <xs:import namespace="urn:GSO-System-Services:external:1.65:GsoCore" />
      <xs:element name="GsoGetAssignedClientAllocationsForAgentCredentialXmlOutput">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="AssignedClientAllocations">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="ClientAllocation" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="ServiceName" type="core:ServiceNameTYPE" />
                        <xs:element name="FriendlyName" type="core:EnrolmentFriendlyNameTYPE" />
                        <xs:element name="IdentifiersForDisplay">
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="IdentifierForDisplay" type="core:IdentifierForDisplayTYPE" maxOccurs="unbounded" />
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="RequestID" type="core:HashTokenTYPE" use="required" />
        </xs:complexType>
      </xs:element>
    </xs:schema>

#### Method Details

The agent credential (target credential) that the assignment information is required for can be any user or assistant within the same agent group as the caller. For each client allocation assigned to the target credential the method returns the service name, the enrolment friendly name and its corresponding identifiers. See Listing Client Allocations.

#### Method Steps

This method performs the following steps:

- Checks the agent credential exists
- Checks to see if the caller is in the same group as the specified agent credential
- Returns all of the client allocations that have been assigned to the specified agent credential

#### Calling Credential

The credential calling the function must meet the following rules

Rule | Error
--- | ---
The Credential must present a 'Standard' GatewayToken | wsse:FailedAuthentication Presenting the incorrect token will produce the standard wsse:FailedAuthentication exception
The Credential must be the member of a Group | 8029: The Credential is not a member of an Organisation If the credential's registration category allows either peers or assistants then they are deemed to belong to an Organisation. This exception is raised when a Credential who does not belong to an Organisation attempts to call a method that controls Organisation specific functionality.
The Credential must be in the following roles: User | 8026: The credential has the wrong type of role The credential has the wrong type of role to be used with this function. e.g. The credential is an assistant where a peer is required.
The Credential must of the following type: Agent | 8006: The Credential type specified is invalid Specific methods can only be performed for certain types of Credential (e.g. Principal, Agent, Admin etc.), if the supplied Credential is of the wrong type for the method then this exception will be raised.
The Credential's state must be: Active | 8005: The Credential has an invalid state for this action Each Credential has a number of states (e.g. Registered, Suspended), and specific methods require the Credential to be in a certain state. If the Credential is in the wrong state then this exception will be raised

#### Business Rules

All errors will return a SOAP fault. The GatewayDetails node will include ErrorNumber. It also contains a Message node with a detailed description of the cause of the error. The following is a list of the Error Numbers that may be returned from this method, each one represents a business rule that has been broken:

SOAP Fault Error Number | Description
--- | ---
8002 | The specified Credential does not exist If a method is given the details of a Credential that does not exist then this exception will be raised
8023 | The credential must be within the same group The credential must be within the same group as the compared credential.

#### Audit Events

Audit Events are stored in the Audit Database. These events are not available publicly. Please contact Live Services for more information

Audit ID | Description
--- | ---
506 | GsoAuthorisation (Failure)

#### Notifications

Notifications are messages that originate from the Gateway and sent to an external source.

Notification | Description
--- | ---

#### Example

The following is a sample of an input document:

    <?xml version="1.0" encoding="utf-8"?>
    <GsoGetAssignedClientAllocationsForAgentCredentialXmlInput xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:GSO-System-Services:external:1.65:GsoGetAssignedClientAllocationsForAgentCredentialXmlInput">
      <TargetCredentialIdentifier>0000001275956976</TargetCredentialIdentifier>
    </GsoGetAssignedClientAllocationsForAgentCredentialXmlInput>

The following is a sample of an output document:

    <?xml version="1.0" encoding="utf-8"?>
    <GsoGetAssignedClientAllocationsForAgentCredentialXmlOutput xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" RequestID="55B60903D7744BB4AD50A581050D15AE" xmlns="urn:GSO-System-Services:external:1.65:GsoGetAssignedClientAllocationsForAgentCredentialXmlOutput">
      <AssignedClientAllocations>
        <ClientAllocation>
          <ServiceName>MOSW2</ServiceName>
          <FriendlyName />
          <IdentifiersForDisplay>
            <IdentifierForDisplay Type="MOSW2ID" Value="1234569" MaskedValue="1*3*5*9" />
            <IdentifierForDisplay Type="MOSW2Number" Value="123" MaskedValue="1*3" />
          </IdentifiersForDisplay>
        </ClientAllocation>
      </AssignedClientAllocations>
    </GsoGetAssignedClientAllocationsForAgentCredentialXmlOutput>

#### See Also

Public Interface

© Crown Copyright 2008. All rights reserved