class to class

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?
 
C

casey chesnut

you can.
search for 'Alternate to Remoting' posted at 5/3 for a guide.

there is not enough code here to tell what is going on.
the problem might be a namespace mismatch in the auto generated proxy.

casey
http://www.brains-N-brawn.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top