Извлечение сообщения веб-службы из клиента C#
I call from console application a web service that returns this message when file transfer is sucessful : <s:Body> <ImportResponse> <ImportResult>Process Complete</ImportResult> <ImportResponse> <s:Body> I have created the client from WSDL file and Service.cs is: [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] [System.ServiceModel.ServiceContractAttribute(Namespace="",ConfigurationName="Service")] public interface Service { [System.ServiceModel.OperationContractAttribute(Action="urn:Service/Import", ReplyAction="urn:Service/ImportResponse")] string Import(string username, string password,string data); }
Что я уже пробовал:
In client web service Main method I use : try { client.Import("user", "pass", strXML); } catch (Exception e) { Console.WriteLine("{0} Exception caught.", e); Console.ReadLine(); } While I get error messages, I cannot get back message: 'Process Complete'. Can anyone help me how can I get this message for successful transfer?