Can someone help me understand why when I receive a soap envelope I don't receive all descendant nodes within the parent node when the receiving object serializes the soap body?
Contract interface class
namespace AssemblyMDEPort
{
[ServiceContract(Name = "AssemblyMDEPort", Namespace = "urn:oasis:names:tc:legalxml:wsdl:WebServicesProfile-Definitions-4.0")]
[XmlSerializerFormat]
public interface IAssemblyMDEPort
{
[OperationContract(ReplyAction = "*", Action = "urn:oasis:names:tc:legalxml:wsdl:WebServicesProfile-Definitions-4.0/AssemblyMDEPort/NotifyCompleteRequest")]
[XmlSerializerFormat(SupportFaults = true)]
NotifyCompleteResponse NotifyReviewComplete(NotifyCompleteRequest request);
}
}
This is the client soap interface method that's executed when the soap envelope arrives at our service endpoint.
public NotifyCompleteResponse NotifyReviewComplete(NotifyCompleteRequest request)
This is our SOAP object that handles serializing the incoming SOAP envelope.
[System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
public partial class NotifyCompleteRequest
{
[System.ServiceModel.MessageBodyMemberAttribute(Namespace = "urn:oasis:names:tc:legalxml:wsdl:WebServicesProfile-Definitions-4.0", Order = 0)]
public XElement NotifyCompleteRequestMessage;
public NotifyFilingReviewCompleteRequest()
{
}
}
This is an example SOAP envelope sent into the service
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:oasis:names:tc:legalxml:wsdl:WebServicesProfile-Definitions-4.0">
<soapenv:Header/>
<soapenv:Body>
<NotifyCompleteRequestMessage xmlns="urn:oasis:names:tc:legalxml:wsdl:WebServicesProfile-Definitions-4.0">
<SendingMDELocationID xmlns="urn:oasis:names:tc:legalxml:schema:xsd:CommonTypes-4.0">
<IdentificationID xmlns="http://niem.gov/niem/niem-core/2.0"></IdentificationID>
</SendingMDELocationID>
<SendingMDEProfileCode xmlns="urn:oasis:names:tc:legalxml:schema:xsd:CommonTypes-4.0">urn:oasis:names:tc:legalxml:schema:xsd:WebServicesMessaging-2.0</SendingMDEProfileCode>
<ReviewCallbackMessage xmlns="urn:oasis:names:tc:legalxml-courtfiling:schema:xsd:ReviewFilingCallbackMessage-4.0" xmlns:nc="http://niem.gov/niem/niem-core/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<nc:DocumentFiledDate>
<nc:DateTime>2018-06-07T13:55:56.0Z</nc:DateTime>
</nc:DocumentFiledDate>
</ReviewCallbackMessage>
</NotifyCompleteRequestMessage>
</soapenv:Body>
</soapenv:Envelope>
The NotifyCompleteRequestMessage XElement attribute is only loaded w/ the first node and not all it's descendants like below and we need all the element nodes within the envelope body loaded within the NotifyCompleteRequestMessage attribute. There has to be a way to accomplish this.
<SendingMDELocationID xmlns="urn:oasis:names:tc:legalxml:schema:xsd:CommonTypes-4.0">
<IdentificationID xmlns="http://niem.gov/niem/niem-core/2.0"></IdentificationID>
</SendingMDELocationID>