I'm a total noob when it comes to XML and SOAP messages. ...Here's the SOAP message.
<?xml version="1.0" encoding="utf-8" ?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CR>
<Username xmlns="<Hidden>">mtas</Username>
<Password xmlns="<Hidden>">password</Password>
<id xmlns="<Hidden>">
70dad12b-bb50-402d-8b34-
fe2d4c0c283d
</id>
<Data xmlns="<Hidden>">
<Data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="<Hidden>">
<CS>
<CSCallbackRequest xmlns="">
<CDS xsi:nil="true" xmlns="<Hidden>"/>
<CDRP xmlns="<Hidden>"/>
<UDI xsi:nil="true"
xmlns="<Hidden>"/>
</CSCallbackRequest>
</CS>
<Fault xsi:nil="true" />
<Comment xsi:nil="true"/>
</Data>
</Data>
</CR>
</s:Body>
</s:Envelope>
We generated the classes with the xsd.exe tool that gave us classes to deserialize to. This .xsd file was provided by the company we are receiving the SOAP messages from.
Here is the issue. When we get this type of response back from the company, we are looking within CSCallbackRequest for those three elements inside, the CDS, CDRP, and UDI. We are attempting to determine which type of Callback we're receiving. My initial assumption was when we use an XMLSerializer with type (Generated Class Type), the element within CSCallbackRequest that does not have the xsi:nil=true would allow the object within the Generated Class Type object would NOT be null. But this isn't the case. How do I check if a property with the doesn't have the xsi:nil proprerty after deserializing?