In my wsdl:message i got two parameters, firstname and lastname:
<message name="setName">
<part name="firstname" type="xsd:string"></part>
<part name="lastname" type="xsd:string"></part>
</message>
I want to define the "firstname" part as required, and the "lastname" part as optional. How do i do that?
WSDL - <message> Element The <message> element describes the data being exchanged between the web service providers and the consumers. Each Web Service has two messages: input and output. The input describes the parameters for the web service and the output describes the return data from the web service.
WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information. The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint.
There are two different types of WSDL documents: WSDL Service Interface documents. WSDL Service Implementation documents.
In WSDL parts can not be optional. They are always required. If you need optional parts, you will have to create one part that refers to a XSD complexType that then can have optional elements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With