Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Optional Message Parts in WSDL

Tags:

soap

wsdl

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?

like image 314
mosch Avatar asked Nov 30 '11 11:11

mosch


People also ask

What is the message element in WSDL?

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.

What is a WSDL and different parts of WSDL?

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.

What are WSDL types?

There are two different types of WSDL documents: WSDL Service Interface documents. WSDL Service Implementation documents.


1 Answers

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.

like image 192
Tina Avatar answered Jan 21 '23 08:01

Tina