Stylus Studio XML Editor

Table of contents

Appendices

2.13 Service

Service

The Service Component[top]

The Service Component

A Service component describes a set of endpoints (see [Endpoint]) at which a particular deployed implementation of the service is provided. The endpoints thus are in effect alternate places at which the service is provided.

Services are named constructs and can be referred to by QName (see [QName resolution]).

The properties of the Service component are as follows:

  • {name} REQUIRED. A wsdls:NCName as defined by [ Type].

  • {target namespace} REQUIRED. A wsdls:anyURI as defined in [ Type].

  • {interface} REQUIRED. An Interface component.

  • {endpoints} REQUIRED. A non-empty set of Endpoint components.

  • {features} OPTIONAL. A set of Feature components.

  • {properties} OPTIONAL. A set of Property components.

For each Service component in the {services} property of a definitions container, the combination of {name} and {target namespace} properties MUST be unique.

XML Representation of Service Component[top]

XML Representation of Service Component
<definitions>
  <service
        name="xs:NCName" 
        interface="xs:QName" >
    <documentation />?
    <endpoint />+
    [ <feature /> | <property /> ]*
  </service>
</definitions>

The XML representation for a Service component is an element information item with the following Infoset properties:

  • A [local name] of service

  • A [namespace name] of http://www.w3.org/2004/08/wsdl

  • Two or more attribute information items amongst its [attributes] as follows:

    • A REQUIRED name attribute information item as described below in [ ].

    • A REQUIRED interface attribute information item as described below in [ ].

    • Zero or more namespace qualified attribute information items. The [namespace name] of such attribute information items MUST NOT be http://www.w3.org/2004/08/wsdl.

  • One or more element information item amongst its [children], in order, as follows:

    1. An OPTIONAL documentation element information item (see [Documentation]).

    2. One or more element information items from among the following, in any order:

Note that the XML Schema [XMLSchemaP1] type of the element information item service as defined in the WSDL schema MAY be used as the basis for defining new elements which can be used as service references in message exchanges. To enable such reuse, the WSDL schema defines the attribute information item name as optional in the type of the element information item service, while it is REQUIRED for the element information item service as indicated above.

NOTE: 

See the primer [WSDL-PART0] for more information and examples.

name attribute information item with service [owner][top]

name attribute information item with service [owner]

The name attribute information item together with the targetNamespace attribute information item of the definitions element information item forms the QName of the service.

The name attribute information item has the following Infoset properties:

  • A [local name] of name

  • A [namespace name] which has no value

The type of the name attribute information item is xs:NCName.

interface attribute information item with service [owner][top]

interface attribute information item with service [owner]

The interface attribute information item identifies the interface that the service is an instance of.

The interface attribute information item has the following Infoset properties:

  • A [local name] of interface

  • A [namespace name] which has no value

The type of the interface attribute information item is xs:QName..

Mapping Service's XML Representation to Component Properties[top]

Mapping Service's XML Representation to Component Properties

The mapping between the properties of the Service component (see [The Service Component]) and the XML Representation of the service element information item (see [XML Representation of Service Component]) is as described in [tab_Service_Mapping].

1tab_Service_Mapping Mapping between Service Component Properties and XML Representation Property Mapping
11{name} 11The actual value of the name attribute information item
11{target namespace} 11 The actual value of the targetNamespace attribute information item of the [parent] definitions element information item
11{interface} 11 The Interface component resolved to by the actual value of the interface attribute information item.
11{endpoints} 11 The Endpoint components corresponding to the endpoint element information items in [children] if any.
11{features} 11 The set of Feature components corresponding to the feature element information items in [children], if any.
11{properties} 11 The set of Property components corresponding to the property element information items in [children], if any.