Compartir a través de


About the Calc.wsml File (Windows CE 5.0)

Send Feedback

The Web Services Meta Language (WSML) is specific to SOAP Toolkit implementation.

This file provides mapping information to map an operation in a service described in a Web Services Description Language (WSDL) file to a specific method in the COM object

Wrapping the contents of the WSML file is the <servicemapping> element.

This element has three child elements:

  • <service>
  • <types>
  • <operation>

<servicemapping> element

The <servicemapping> element identifies the <service> element that mapping is being specified for. This is the <service> element you created in the WSDL file.

The following code example from the Calc.wsml file shows the beginning of the <service> element. Notice that the <service> element has the <using> child element that identifies the COM object.

<servicemapping name='Calc'>
  <service name='Calc'>
    <using PROGID='CalcSvcRpcCpp.Calc.1' cachable='1' ID='CalcObject' />
    <port name='CalcSoapPort'>
...

Also notice that the PROGID attribute identifies the COM class which implements all the various methods.

The Boolean cachable attribute specifies whether the class instance (the object) stays in memory as long as the SoapServer object is in memory.

The value of '0' for the cachable attribute indicates the object instance is not cached.

If the COM object is apartment or single-threaded, this flag is ignored.

The value specified for the ID attribute refers to the COM object. This ID refers to the COM object.

<port> element

The <port> element specifies the <portType> element as defined in the WSDL file.

For each operation in a given <portType> element, there is one <operation> element in the WSML file.

The name attribute of the <operation> element identifies the operation.

In the following fragment from the Calc.wsml file, this attribute identifies the Add operation.

<port name='Sample1SoapPort'>
...
      <operation name='Add'>
        <execute uses='CalcObject' method='Add' dispID='1'>
          <parameter callIndex='1' name='A' elementName='A' />
          <parameter callIndex='2' name='B' elementName='B' />
          <parameter callIndex='-1' name='retval' elementName='Result' />
        </execute>
      </operation>
...
</port>

<execute> element

The <execute> child element specifies the object that executes the specified operation.

This element has three attributes:

  • The uses attribute identifies the object name.

  • The method attribute identifies the method name.

  • The optional dispID attribute provides the dispatch ID of the method.

    This attribute is optional, but including it improves performance because there is no need to search for the dispatch ID.

<parameter> element

The <parameter> child element of the <execute> element describes method parameters.

This child element has three attributes:

  • The callIndex attribute, which provides the parameter number (first parameter is "1", second parameter is "2", and so on).

    A callIndex value of "-1" identifies the parameter as the return parameter

  • The name attribute, which provides a unique name for the parameter (primarily used for documentation purposes).

  • The elementName attribute, which provides the name of the element in the <types> section of the WSDL that holds the value of the parameter.

See Also

SOAP Application Development

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.