WP7 - web service calls return null instead of collections
I want to consume a webservice and particulary a method which return a collection. When i consume it by using a console application, it works. But when I try to consume it with a WP7 App, i only get a null object or empty list.
I have try to get a simple string and it works with both apps (console and WP7) so I think that I only get this issue with collections.
With Fiddler i monitor the traffic and i can see that the webservice return the right collections, with many items, but the return is still empty in my WP7 App.
Other details :
I'm not the owner of the webservice
I'm using the WP7emulator
I meet the same issue but his solution doesn't help me: (WP7 consume a WCF Service)
Here is a code sample :
priv开发者_开发知识库ate void LoadData()
{
client = new Service.WsivPortTypeClient();
client.getLinesCompleted += new EventHandler<Service.getLinesCompletedEventArgs>(client_getLinesCompleted);
client.getLinesAsync(null);
}
static void client_getLinesCompleted(object sender, Service.getLinesCompletedEventArgs e)
{
//e.Results is always null or empty
}
And what do you have in e.Error ? Check if it's not null, you might get useful informations. Regards
精彩评论