D
Douglas Robson
Hi,
I've got a simple C# web service. That has the following method.
[WebMethod]
public MyItem getMyItem()
{
MyItem i = new MyItem();
return i;
}
The class MyItem is as follows:
[Serializable]
public class MyItem
{
private string _name;
private int _price;
private string[] features;
public MyItem()
{
name = "testproduct";
price = 22;
features = new string[2];
features[0] = "wireless lan";
features[1] = "bluetooth";
}
........................
I have a client application from which i simply wish to obtain an object
from the web service.
MyItem item = localservice.getMyItem( );
Cannot implicitly convert type 'TestApplication.localservice.MyItem' to
'MyItem'
How can i simply get a custom object from a web service ? Both classes are
present in both the user application and the web service. Help please !!
It's taken me ages on this.
I've got a simple C# web service. That has the following method.
[WebMethod]
public MyItem getMyItem()
{
MyItem i = new MyItem();
return i;
}
The class MyItem is as follows:
[Serializable]
public class MyItem
{
private string _name;
private int _price;
private string[] features;
public MyItem()
{
name = "testproduct";
price = 22;
features = new string[2];
features[0] = "wireless lan";
features[1] = "bluetooth";
}
........................
I have a client application from which i simply wish to obtain an object
from the web service.
MyItem item = localservice.getMyItem( );
Cannot implicitly convert type 'TestApplication.localservice.MyItem' to
'MyItem'
How can i simply get a custom object from a web service ? Both classes are
present in both the user application and the web service. Help please !!
It's taken me ages on this.