J
Jimmy
Hey
I was under the impression that it was possible to return an object of a
class from a webservice, and then assign it to an instance of the same
object on the PDA program receiving the returned object.
Example webservice:
namespace WS
{
[WebService(Namespace=http://whatever)]
public class WS : System.Web.Services.WebService
{
retClass retObj = new retClass();
...
...
...
[WebMethod]
public retClass Get_Value(){
...
...
...
retObj.retInt = some value;
retObj.retString = "some string"
retObj.retDS = some dataset;
return retObj;
}
}
public class retClass
{
public int retInt = 0;
public string retString = "";
public DataSet retDS = null;
}
}
And the following is my PDA app.:
{
public class retClass
{
public int retInt = 0;
public string retString = "";
public DataSet retDS = null;
}
mainclass{
WS ws = new WS();
retClass retObj = new retClass();
retObj = ws.Get_Value(); //This is where VS tells me that it cant
convert ws.Get_Value() into a retObj
}
}
Well i left some code out (guess you allready figured out).
Ok, what is going wrong?
Why cant i do this?
I was under the impression that it was possible to return an object of a
class from a webservice, and then assign it to an instance of the same
object on the PDA program receiving the returned object.
Example webservice:
namespace WS
{
[WebService(Namespace=http://whatever)]
public class WS : System.Web.Services.WebService
{
retClass retObj = new retClass();
...
...
...
[WebMethod]
public retClass Get_Value(){
...
...
...
retObj.retInt = some value;
retObj.retString = "some string"
retObj.retDS = some dataset;
return retObj;
}
}
public class retClass
{
public int retInt = 0;
public string retString = "";
public DataSet retDS = null;
}
}
And the following is my PDA app.:
{
public class retClass
{
public int retInt = 0;
public string retString = "";
public DataSet retDS = null;
}
mainclass{
WS ws = new WS();
retClass retObj = new retClass();
retObj = ws.Get_Value(); //This is where VS tells me that it cant
convert ws.Get_Value() into a retObj
}
}
Well i left some code out (guess you allready figured out).
Ok, what is going wrong?
Why cant i do this?