4
I’m a beginner in C#, my Visual Studio is 2010, my version of Windows Phone is 7. I searched the internet and this version of the "async" command only works from Visual Studio 12 to top.
Is there any other alternative?
In a C# Desktop application works without any problem.
I can map the web service with the service References, but the return always comes null, but on Android works, which error can be ?
The error that appears is as follows: Unmarshalling Error: Unexpected element (Uri: "webservices.com.br/"; site: "parameter1"). The expected Elements are <{} parameter2>, <{} 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();
}
}
Cosengui solve the problem.
– Evaldo Junior
put as response to the next also know what you did
– Guilherme Golfetto
I put the solution on my personal website follow link: http://www.tidicas.com.br/? p=911
– Evaldo Junior
Great. If the site goes down, the solution reference is lost.
– Washington Morais
The idea is that the site no longer comes out.
– Evaldo Junior
Evaldojunior It would be nice if you put the solution here as @Washingtonmorais suggests. When you have a little time help us with your solution. Abs
– renanroncarati