Let me start this by saying I know prefix should not matter for xml that follows standards. I am forced to use a web service that requires the request to look like this
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prefix="http://www.url.com">
<soapenv:Header/>
<soapenv:Body>
<prefix:Search>
<SearchCriteria>
<registrationStatus>A</registrationStatus>
<startDate/>
<endDate/>
</SearchCriteria>
</prefix:Search>
</soapenv:Body>
</soapenv:Envelope>
When I generate my request it ends up looking like this
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.url.com">
<soapenv:Header/>
<soapenv:Body>
<Search (also tried here xmlns="http://www.url.com")>
<SearchCriteria>
<registrationStatus>A</registrationStatus>
<startDate/>
<endDate/>
</SearchCriteria>
</Search>
</soapenv:Body>
</soapenv:Envelope>
Because the prefix is missing I get an error saying it can't find the search child. Using fiddler I have recomposed this message a million different ways and all fails unless I add the prefix and the namespace for it. I don't own the web service and the owner won't make changes so I am stuck trying to figure it out.
My question is how can I add the prefix and the namespace to the request? I have added the service to my c# console test app using add service reference, I tried modifying the qualified and not qualified settings but that did not add the prefix.