This is an example of the Web Service request payload for each allowed Default Value Behavior for a not optional and not nillable WSDL definition.

In this example we'll use the 'Phone' attribute.

WSDL

<xs:complexType name="Customer">

<xs:sequence>

<xs:element name="Id" type="xs:integer" minOccurs="1">

<xs:element name="Name" type="xs:string" minOccurs="1">

<xs:element name="Company" type="xs:string" minOccurs="1">

<xs:element name="IdCard" type=”xs:string” minOccurs="1" nillable=”true”>

<xs:element name="Phone" type=”xs:string” minOccurs="0">  

<xs:element name="Address" type=”xs:string” minOccurs="0" nillable=”true”>

<xs:sequence>

</xs:complexType>

Data to Send

Customer

Id

1

 

Name

"John Doe"

 

Company

"TransLand"

 

IdCard

"82749928"

 

Phone

 ""

Default Value

Address

"455 Larkspur Dr., California Springs, CA 92926"

 

Payload

In this case there are two possible values for the Default Value Behavior property:

Send: the default value is sent in the payload.

<Customer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<Id>1</Id>

<Name>John Doe</Name>

<Company>TransLand</Company>

<IdCard>82749928</IdCard>

<Phone></Phone>  

<Address>455 Larkspur Dr., California Springs, CA 92926</Address>

</Customer>

Don't Send: the default value is not sent in the payload.

<Customer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<Id>1</Id>

<Name>John Doe</Name>

<Company>TransLand</Company>

<IdCard>82749928</IdCard>

<Address>455 Larkspur Dr., California Springs, CA 92926</Address>

</Customer>