'SOAP xml response received but not populating the result object in response if the result is null/empty

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns4:entryResponse xmlns:ns4="http://xxx.yyy.zzz/types"/>
    </soap:Body>
</soap:Envelope>

The above is the response I am getting for the below WSDL complextype

    <complexType name="entryResponse">
        <sequence>
            <element name="result" type="tns:EntryTO"
                nillable="true" minOccurs="1" />
        </sequence>
    </complexType>

But the expected response is as mentioned below incase of result is null. But the result attribute is missing from the soap response. Its great if any one can help on what I am missing

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns4:entryResponse xmlns:ns4="http://xxx.yyy.zzz/types">
            <result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
        </ns4:entryResponse>
    </soap:Body>
</soap:Envelope>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source