Activity Forums Salesforce® Discussions Explain what does the “types” define in WSDL?

  • Explain what does the “types” define in WSDL?

    Posted by Anjali on September 18, 2018 at 1:16 pm

    Explain what does the “types” define in WSDL?

    shariq replied 4 years ago 4 Members · 3 Replies
  • 3 Replies
  • Avnish Yadav

    September 18, 2018 at 1:22 pm


    The type element defines all the data types used between the server and the client
    To define data types WSDL uses the W3C XML Schema Specification as its default choice
    Type element is not required if the service uses only simple XML schema types like integers and strings
    To reuse the type with multiple web services, WSDL allows to define types in a separate elements

    Hope this will help you.


  • madhulika shah

    September 18, 2018 at 1:33 pm


    The 'types' mean a container for data type definitions using some type system (such as XSD).


  • shariq

    September 18, 2018 at 3:31 pm


    A web service needs to define its inputs and outputs and how they are mapped into and out of the services. WSDL <types> element takes care of defining the data types that are used by the web service. Types are XML documents, or document parts.

    The types element describes all the data types used between the client and the server.
    WSDL is not tied exclusively to a specific typing system.
    WSDL uses the W3C XML Schema specification as its default choice to define data types.
    If the service uses only XML Schema built-in simple types, such as strings and integers, then types element is not required.
    WSDL allows the types to be defined in separate elements so that the types are reusable with multiple web services.

    Here is a piece of code taken from W3C specification. This code depicts how a typeselement can be used within a WSDL.

    <schema targetNamespace = ""
    xmlns = "">

    <element name = "TradePriceRequest">
    <element name = "tickerSymbol" type = "string"/>

    <element name = "TradePrice">
    <element name = "price" type = "float"/>


    Data types address the problem of identifing the data types and the formats you intend to use with your web services. Type information is shared between the sender and the receiver. The recipients of messages therefore need access to the information you used to encode your data and must understand how to decode the data.


Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos