---
title: "<service> Element"
url: https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-xml-reference/service-descriptor-element
docs_index: https://docs.zeroc.com/llms.txt
---

> For an index of every page, see [llms.txt](https://docs.zeroc.com/llms.txt).

# \<service> Element

A `service` element defines an [IceBox](https://docs.zeroc.com/ice/3.8/services/icegrid/icebox-integration-with-icegrid.md) service. It typically contains at least one [adapter](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-xml-reference/adapter-descriptor-element.md) element, and may supply additional information such as [configuration properties](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-xml-reference/properties-descriptor-element.md).

This element may only appear as a child of an [icebox](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-xml-reference/icebox-descriptor-element.md) element or a [service-template](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-xml-reference/service-template-descriptor-element.md) element.

The following attributes are supported:

| **Attribute** | **Description** | **Required** |
| --- | --- | --- |
| `entry` | Specifies the entry point of this service. | Yes |
| `name` | Specifies the name of this service. Within the service, child elements can refer to its name using the [reserved variable](https://docs.zeroc.com/ice/3.8/services/icegrid/using-descriptor-variables-and-parameters.md) `${service}`. | Yes |

An optional nested `description` element provides free-form descriptive text.

Here is an example to demonstrate the use of this element:

```xml
<icebox id="MyIceBox" ...>
    <service name="Service1" entry="service1:Create">
        <description>A description of this service.</description>
        <property name="ServiceName" value="${service}"/>
        <adapter name="MyAdapter" id="${service}Adapter" .../>
    </service>
    <service name="Service2" entry="service2:Create"/>
</icebox>
```

## See Also

- [IceBox](https://docs.zeroc.com/ice/3.8/services/icebox.md)
- [Adapter Descriptor Element](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-xml-reference/adapter-descriptor-element.md)
- [Properties Descriptor Element](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-xml-reference/properties-descriptor-element.md)
- [IceBox Descriptor Element](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-xml-reference/icebox-descriptor-element.md)
- [Service-Template Descriptor Element](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-xml-reference/service-template-descriptor-element.md)
- [IceBox Integration with IceGrid](https://docs.zeroc.com/ice/3.8/services/icegrid/icebox-integration-with-icegrid.md)
