Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The message section describes the input and output data for each service operation.  Each Each message contains one or more parts. A part can be compared to the parameters of a function call in a traditional programming language. An example of an input and output message with one message part is given below.

Code Block
languagehtml/xml
<wsdl:message name="Input">
   <wsdl:part name="InputData" element="MyTypeDef:TeacherInfo"/>
</wsdl:message>
 
<wsdl:message name="Output">
  <wsdl:part name="OutputData" element="MyTypeDef:StudentInfo"/>
</wsdl:message>

All input and output messages that are used by your service operations are specified in a message section. Input and output messages can be used by multiple operations.

During import of the WSDL file in Encore, singlevalued Request and Response entities are created. The name of the message part is used as name for the relation between these generated entities and the type specified in the message. 
The element refers to an element in the XSD file. The input and output message part can refer to the same or two different elements. Because of WSI-BP 1.2 compliancy the messages must refer to an element in the XSD and not directly to a simple or complex type.

UI Text Boxtype

Info

The prefix MyTypeDef refers to the XSD namespace in this example.

...

Now that we specified two related entities we are going to add some attributes to the entities. Suppose we want to add attributes to the Teacher entity. We can do that by simply adding attributes to the complex type definition. Each attribute has a name and type. The primitive types like stringintegerdate etc. are specified in the W3C XML schema and therefore get the xsd namespace as a prefix.

UI Text Boxtype

Info

 Which prefix should be used to refer to the XML scheme namespace is specified in the XSD header. In the example we use the prefix xsd.


Code Block
languagehtml/xml
<xsd:complexType name="Teacher">
   <xsd:sequence>
      <xsd:element name="TeachesStudents" type="MyTypeDef:Student" minOccurs="1" maxOccurs="unbounded"/>
   </xsd:sequence>
   <xsd:attribute name="SocialSecurityNumber" type="xsd:string" use="required"/>
   <xsd:attribute name="EmployeeNumber" type="xsd:integer" use="required"/>
</xsd:complexType>

These type of attribute definitions will result in single value attributes in the domain model. We specified a use option with the value required. Adding this option has no impact on the generated model, but a business engineer can now see that these attributes are required and he should add validation rules to the operation's input message. This way the service will send an error message when the attributes are omitted from the request.

If we would want to add multivalue attributes we would specify them as an element in the sequence part of the complexType definition. We use elements for multivalue attributes because an element has the minOccurs and maxOccurs options.

...