In WSDL file a function can return a Type or an Element. I have used only custom types as a results so far. However, I wonder when the Element should be more appropriate then the Type? What is the difference between them?
Is there any difference between
<wsdl:message name="MyFunction">
<wsdl:part name="parameters" element="tns:Person"></wsdl:part>
</wsdl:message>
and
<wsdl:message name="MyFunction">
<wsdl:part name="parameters" type="tns:Person"></wsdl:part>
</wsdl:message>
from a Client perspective (application that make use of the web service)?
The above question, as skaffman pointed, leads to a another question. What is the difference between
<xs:element name="Person" ... >
...
</xs:element>
and
<xs:complexType name="Person">
...
</xs:complexType>
?