I am facing a problem with my webservice written in C#. It works fine until I want to call method with parameters, the SOAP Request generated from an external supplier using my wsdl looks like the following:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<s:Header xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<To s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://127.0.0.1/AService</To>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">ANameSpace/login</Action>
</s:Header>
<soapenv:Body>
<ns1:login soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="ANameSpace">
<a_sDMSUserName xsi:type="xsd:string">test</a_sDMSUserName>
<a_sDMSUserPassword xsi:type="xsd:string">oscar</a_sDMSUserPassword>
</ns1:login>
</soapenv:Body>
</soapenv:Envelope>
This is a part of the interface of my Service:
[ServiceContract (Namespace ="ANameSpace")]
public interface IFordEcat
{
[OperationContract (Action ="ANameSpace/connect")]
int connect();
[OperationContract(Action = "ANameSpace/disconnect")]
int disconnect();
[OperationContract(Action = "ANameSpace/login")]
string login(string a_sDMSUserName, string a_sDMSUserPassword);
[OperationContract(Action = "ANameSpace/logout")]
string logout(string a_sSessionID, string a_sDMSUserName, string a_sDMSUserPassword);
With SoapUI or a test client setup in C# via Service Reference it works fine.
The only problem is that the parameters of the login Method or any other Method with parameters, are missing the namespace prefix (nsl) in the nodes where are the parameters are passed. When I add them manually for example in SOAPUi it works like charm. Is there a way to add the namespace prefix without inspecting every incoming request?
Many thanks in advance!