Glossary Item Box

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

# GatewaySoapPublic.GsoGetEligibleServicesByServiceOwner Method

This method returns a set of services that the caller is eligible to enrol in, filtered by a single service owner.

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

#### Parameters

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

#### Remarks

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

- ServiceOwner: The service owner to filter on.

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:GsoGetEligibleServicesByServiceOwnerXmlInput" 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:GsoGetEligibleServicesByServiceOwnerXmlInput" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0">
      <xs:import namespace="urn:GSO-System-Services:external:1.65:GsoCore" />
      <xs:element name="GsoGetEligibleServicesByServiceOwnerXmlInput">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ServiceOwner" type="core:ServiceOwnerTYPE" />
          </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:GsoGetEligibleServicesByServiceOwnerXmlOutput" 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:GsoGetEligibleServicesByServiceOwnerXmlOutput" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0">
      <xs:import namespace="urn:GSO-System-Services:external:1.65:GsoCore" />
      <xs:element name="GsoGetEligibleServicesByServiceOwnerXmlOutput">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Services">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="Service" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="ServiceOwner" type="core:ServiceOwnerTYPE" />
                        <xs:element name="Name" type="core:ServiceNameTYPE" />
                        <xs:element name="Description" type="core:TextDataTYPE" />
                        <xs:element name="HelpText" type="core:TextDataTYPE" />
                        <xs:element name="HelpUrl" type="core:TextDataTYPE" />
                      </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

As the calling principal or agent user is asking about the eligibility (of their credential) to enrol in a number of services, no business rule exceptions will be raised. If the user is are not eligible for any services, an empty list will be returned.

Please note, even though the services returned are valid for the calling credential, the credential will still require a valid set of known facts to enrol.

#### Method Steps

This method performs the following steps:

- Obtains a list of all services owned by the specified service owner
- The list is filtered to remove any services that are not active
- The list is filtered to remove any services that do not match the credential registration category
- The list is filtered to remove any services with a minimum required authentication level that is greater than the credential's authentication level
- The list is filtered to remove any services that have already been enrolled in, unless the service supports multiple enrolments

#### 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 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 NOT be of the following type: Admin | 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
--- | ---
3005 | The service owner specified does not exist The Service Owner name supplied to the method does not exist on the Gateway

#### 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"?>
    <GsoGetEligibleServicesByServiceOwnerXmlInput xmlns="urn:GSO-System-Services:external:1.65:GsoGetEligibleServicesByServiceOwnerXmlInput">
      <ServiceOwner>MOSW</ServiceOwner>
    </GsoGetEligibleServicesByServiceOwnerXmlInput>

The following is a sample of an output document:

    <?xml version="1.0" encoding="utf-8"?>
    <GsoGetEligibleServicesByServiceOwnerXmlOutput RequestID="447C78C2A1B448F5BC74C816612552CD" xmlns="urn:GSO-System-Services:external:1.65:GsoGetEligibleServicesXmlOutput">
      <Services>
        <Service>
          <ServiceOwner>MOSW</ServiceOwner>
          <Name>MOSW2</Name>
          <Description>MOSW2 Test Service</Description>
          <HelpText>This is the help text</HelpText>
          <HelpUrl>www.gateway.gov.uk</HelpUrl>
        </Service>
      </Services>
    </GsoGetEligibleServicesByServiceOwnerXmlOutput>

#### See Also

Public Interface

© Crown Copyright 2008. All rights reserved