I want to use the WCF service in my client application. There is no problem if I run my application in .NET, but when I run it in Mono, I have a problem with my SOAP message. When I checked my queries (created in Mono and .NET) in Fiddler, I could see some differences.
.NET request
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Header> <ActivityId CorrelationId="cf76ec82-9a16-4c0f-840c-0a2f2afc0c39" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">2d22e7a7-56a6-4972-836c-56c6fcda0a35</ActivityId> </s:Header> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <login xmlns="http://xml.kamsoft.pl/ws/kaas/login_types"> <credentials> <item> <name>login</name> <value> <stringValue>login</stringValue> </value> </item> </credentials> <password>password</password> </login> </s:Body> </s:Envelope>
Mono request
<?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"> <login> <credentials xmlns="http://xml.kamsoft.pl/ws/kaas/login_types"> <item> <name>login</name> <value> <stringValue>login</stringValue> </value> </item> </credentials> <password xmlns="http://xml.kamsoft.pl/ws/kaas/login_types">password</password> </login/> </s:Body> </s:Envelope>
Is there any solution or workaround to solve this problem?
Mono bugzilla has a problem with the same problem: https://bugzilla.xamarin.com/show_bug.cgi?id=6677 without an answer.
This problem can be reproduced by creating a service link (without asynchronous operations) in Visual Studio 2013 from webservice from the address: https://ewus.nfz.gov.pl/ws-broker-server-ewus-auth-test/services/Auth ? wsdl and use this code:
static void Main(string[] args) { var ewusAuthService = new AuthClient(); var loginRequest = new loginRequest(); var credentials = new List<loginParam> { new loginParam { name = "login", value = new paramValue { Item = "login" }, }, }; loginRequest.credentials = credentials.ToArray(); loginRequest.password = "password"; string loginReturn; authToken authToken; session result = ewusAuthService.login(loginRequest, out authToken, out loginReturn); Console.WriteLine(result.id); }
source share