I'm a beginner in C #, my Visual Studio is 2010, my Windows Phone version is 7. I searched the internet and in this version of the "async" command only Visual Studio 12 works up.
Do you have any other alternatives?
In a C # Desktop application it works without any problems.
I can map the web service with service references, but the return always comes null, but in Android works, what error can it be?
The error that appears is as follows: Unmarshalling Error: unexpected element (uri: "webservices.com.br/"; site: "parameter1"). The expected elements are < {} parameter2 & gt ;, < {} parameter1 >
Follow the source code:
public partial class MainPage : PhoneApplicationPage
{
wsServico.cadastroTo cadastroTo = null;
public MainPage(){
InitializeComponent();
}
private void button1_Click(object sender, RoutedEventArgs e){
wsServico.TesteJavaWsClient ws = new wsServico.TesteJavaWsClient();
ws.returnServicoAsync("A", "B");
ws.returnServicoCompleted += new EventHandler<wsServico.returnServicoCompletedEventArgs>(ws_returnServicoCompleted);
}
private void ws_returnServicoCompleted(object sender,
wsServico.returnServicoCompletedEventArgs e){
cadastroTo = e.Result;
textBox1.Text = cadastroTo.cadastroId.ToString();
}
}