tags:

views:

12

answers:

0

Hi,

I have an xaml app which is trying to use to wcf service. When i invoke a contract method is friezed and didn't work at all.

I implemented the wcf service as a console application, using the same contract and same configuration and everything worked properly, even through the network everything go well.

I don't have any idea about what is going on

Does any body can help me?

this is the host code:

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ServiceModel; using CineRemoteServiceLibrary; using System.ServiceModel.Description; using ConsoleApplication2.myServiceReference;

namespace ConsoleApplication2 { class Program { static void Main(string[] args) { ServiceHost host = new ServiceHost(typeof(myService));

        host.Open();
        Console.WriteLine("The Service is up and running with the following endpoints: ");
        foreach (ServiceEndpoint se in host.Description.Endpoints)
            Console.WriteLine(se.Address.ToString());

        Console.WriteLine("Press <Enter> to add a new object... ");
        Console.ReadLine();
        myServiceClient client = new myServiceClient();
        myInfoService object1 = new myInfoService();
        myInfoService object2 = new myInfoService();
        object1.id = Guid.NewGuid().ToString();
        object1.player = "MyPlayer";
        object1.comments = "This come from host application";
        object1.XMLPlayerInfo = "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\r\n<PLAYER_INFO>\r\n  <ID>1</ID>\r\n  <PLAYER></PLAYER>\r\n  <ADDRESS>http://localhost:5000/myservice/ws&lt;/ADDRESS&gt;\r\n  <AUTOMATION_SYSTEM>1</AUTOMATION_SYSTEM>\r\n  <POJECTION_SYSTEM>2</POJECTION_SYSTEM>\r\n  <SEND_PULSE_INTERVAL>0</SEND_PULSE_INTERVAL>\r\n  <AUTOMATION_TYPE>2</AUTOMATION_TYPE>\r\n  <TYPE_CONNECTION>RS-232</TYPE_CONNECTION>\r\n  <CURRENT_PLAYLIST_ID>5327</CURRENT_PLAYLIST_ID>\r\n  <PLAYLIST_AVAILABLE>True</PLAYLIST_AVAILABLE>\r\n  <SHOWTIME_INFO_AVAILABLE>True</SHOWTIME_INFO_AVAILABLE>\r\n  <GENERAL_LOAD_DATA_ERROR>False</GENERAL_LOAD_DATA_ERROR>\r\n  <PLAYER_INFO_AVAILABLE>True</PLAYER_INFO_AVAILABLE>\r\n  <IP_ADDRESS_PROJECTOR>127.0.0.1</IP_ADDRESS_PROJECTOR>\r\n  <PORT_PROJECTOR>7000</PORT_PROJECTOR>\r\n  <ENABLED>True</ENABLED>\r\n</PLAYER_INFO>";
        client.submitPlayer(object1);
        Console.WriteLine("object added successfully!!!");

        Console.WriteLine("Press <Enter> to show the object... ");
        Console.ReadLine();
        object2 = client.GetPlayer();
        Console.WriteLine(object2.id);
        Console.WriteLine(object2.player);
        Console.WriteLine(object2.comments);
        Console.WriteLine(object2.XMLPlayerInfo);
        Console.ReadLine();
        host.Close();
    }
}

}