Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. [ServiceContract]
  2. public interface IConvert
  3. {
  4. [OperationContract]
  5. bool ConvertVideo(string path);
  6. }
  7.  
  8. public class ConvertService : IConvert
  9. {
  10. public bool ConvertVideo(string path)
  11. {
  12. Console.WriteLine("Converting video... wait 3 sec");
  13. Thread.Sleep(3000);
  14. Console.WriteLine("Video converted!");
  15. Console.WriteLine(path);
  16.  
  17. return true;
  18. }
  19. }
  20.  
  21. _TubiconClient.ConvertVideo(GetFullFtpPath())
  22.  
  23. try
  24. {
  25. _TubiconClient.ConvertVideoAsync(GetFullFtpPath());
  26. }
  27. catch (Exception e) { }
  28.  
  29. {System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]:
  30. Error in deserializing body of request message for operation 'ConvertVideo'.
  31. OperationFormatter encountered an invalid Message body.
  32. Expected to find node type 'Element' with name 'ConvertVideo' and namespace 'http://tempuri.org/'.
  33. Found node type 'Element' with name 'ConvertVideoAsync' and namespace 'http://tempuri.org/'
  34. (Fault Detail is equal to Error in deserializing body of request message for operation 'ConvertVideo'.
  35. OperationFormatter encountered an invalid Message body.
  36. Expected to find node type 'Element' with name 'ConvertVideo' and namespace 'http://tempuri.org/'.
  37. Found node type 'Element' with name 'ConvertVideoAsync' and namespace 'http://tempuri.org/').}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement