Describe the WSDL PortType Documentation Schema with the WCF LOB Adapter SDK


The WSDL that the WCF LOB Adapter SDK generates contains additional descriptive information for each portType. The schema for this additional information is described in this topic.

The operation documentation is implemented using annotation of the portType to add a node that represents the adapter documentation for the operation. This node contains subnodes that further describe the operation and parameters. This schema is defined as follows.

<?xml version="1.0" encoding="utf-8"?>  
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="">  
  <xs:element name="adapterOperationDocumentation">  
        <xs:element name="summary" type="xs:string" />  
        <xs:element maxOccurs="unbounded" name="param">  
              <xs:extension base="xs:string">  
                <xs:attribute name="name" type="xs:string" use="required" />  
        <xs:element name="returns" type="xs:string" />  

When WSDL is generated for a given operation, the preceding schema is used to provide additional descriptive information in human readable format. For example, the following portType information is returned for the EchoString operation of the Echo Adapter.

<wsdl:portType name="EchoService">  
  <wsdl:operation name="EchoString">  
        <doc:summary>String EchoString( string aName)</doc:summary>  
        <doc:param name="aName">This string will be echoed back to the user.</doc:param>  
        <doc:returns>String value containing the value of aName </doc:returns>  
    <wsdl:input wsaw:Action="Echo/EchoString" message="ns2:EchoService_EchoString_InputMessage" />  
    <wsdl:output wsaw:Action="Echo/EchoString/response" message="ns2:EchoService_EchoString_OutputMessage" />  

The values for the documentation elements are obtained from ParameterizedOperationMetadata for the operation. The preceding example was generated as a result of the following example.

ParameterizedOperationMetadata om = new ParameterizedOperationMetadata(operationId, operationId);  
// set this if you want this operation to belong to this interface name  
// in the generated proxy, the interface name will be EchoService  
// and the client implementation name will be EchoServiceClient.  
om.OperationGroup = "EchoService";  
// set the operation namespace to be same as service namespace  
om.OperationNamespace = EchoAdapter.SERVICENAMESPACE;              
switch (operationId)  
   case "Echo/EchoString":  
       om.DisplayName = "EchoString";  
       om.OriginalName = "targetSystemEchoString";  
       om.Description = "String EchoString( string aName)";  
       OperationParameter parm1 = new OperationParameter("aName", OperationParameterDirection.In, QualifiedType.StringType, false);  
       parm1.Description = "This string will be echoed back to the user.";  
       OperationResult result = new OperationResult(new SimpleQualifiedType(XmlTypeCode.String), false);  
       result.Description = "String value containing the value of aName";  
       om.OperationResult = result;  
       return om;   

Development best practices using the WCF LOB Adapter SDK