I am trying to submit data through a SOAP request. The data received in the web service is null, presumably because the blank xmlns namespace in the XML that I am sending causes the the data to return null (e.g. the TransmissionVersion). Most of the online resources recommend removing xmlns = "", but is there a quick way to make the service accept the namespace without having to inspect it and remove it before the request is sent, as is done here?
https://cmatskas.com/changing-soap-message-data-and-namespaces-with-c/
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:efil="http://samplelink.org" xmlns="http://samplelink.org">
<soapenv:Header/>
<soapenv:Body>
<Send xmlns="http://samplelink.org">
<Transmission>
<SimplifiedReturnTransmission transmissionVersion="2015V01" xmlns="">
<TransmissionHeader>
<TransmissionId>TI000024691218803</TransmissionId>
<Timestamp>2014-09-07T10:18:26</Timestamp>
<Transmitter>
<ETIN>67666665</ETIN>
</Transmitter>
<ProcessType>T</ProcessType>
<DocumentCount>1</DocumentCount>
<TransmissionPaymentHash>14022.49</TransmissionPaymentHash>
</TransmissionHeader>
</SimplifiedReturnTransmission>
</Transmission>
</Send>
</soapenv:Body>
</soapenv:Envelope>
Here's the relevant code from the interface:
<DataContract()>
<System.Xml.Serialization.XmlRootAttribute("SimplifiedReturnTransmission")>
Public Class SimplifiedReturnTransmissionType
Private transmissionHeaderField As TransmissionHeaderType
Private simplifiedReturnDocumentField() As SimplifiedReturnDocumentType
Private transmissionVersionField As String
<DataMember(EmitDefaultValue:=False)>
<System.Xml.Serialization.XmlElementAttribute("TransmissionHeader")>
Public Property TransmissionHeader() As TransmissionHeaderType
Get
Return Me.transmissionHeaderField
End Get
Set(ByVal value As TransmissionHeaderType)
Me.transmissionHeaderField = value
End Set
End Property
<DataMember(EmitDefaultValue:=False)> <System.Xml.Serialization.XmlAttributeAttribute()>
Public Property transmissionVersion() As String
Get
Return Me.transmissionVersionField
End Get
Set(ByVal value As String)
Me.transmissionVersionField = value
End Set
End Property
End Class