What is Opf3? Why is Opf3? How is Opf3? All these burning questions and issues discussed here.
 | |
| | Could someone give a a clue what what could be wrong in this setup?
What works: Calling a web service from a client to return an object.
What does not work: Sending an object from the client to a web service.
Actually, even with just having the web method exposed a call to HelloWorld fails. I don't even have to be calling the method thats expecting a object for the whole service to product the following error:
"System.InvalidOperationException: Unable to generate a temporary class (result=1)."
If, in the service, I comment out the method thats expecting an object all is well and I can then call all other functions.
Another interesting item is that if I pull in the shipper class from the Web Serice demo into my web service I CAN setup a method with the shipper class that will accept an object from the client. This leads me to beleive that it might have something to do with having my class inherit from the ISelfContainingObject inteface. My class does inherit from it ISelfContainingObject.
What else can I check?
Does anyone has any ideas?
Thanks,
Todd
|
 | |
| | Hi Todd,
you just need to inherit from ISelfContainingObject. You could take the Shipper class as a template. What is different in your class, then in shipper?
Regards, Christian
|
 | |
| | Christian Liensberger wrote: Hi Todd,
you just need to inherit from ISelfContainingObject. You could take the Shipper class as a template. What is different in your class, then in shipper?
Regards, Christian Hi Christian,
Thanks for your suggestion. I found the problem and it had to do with the code the wizard spewed out and had nothing to do with not having inherited from ISelfContainingObject.
The wizard created the following property for my class:
[Field("ID", AllowDBNull = false, Identifier = true, AutoNumber = true)] public long ID { get { return _id; } private set { _id = value;
OnRowChanged("ID"); } }
I find that if I remove the 'private' keyword on the set, see it underlined above, then all works properly.
What do you think about that?
Thanks,
Todd
|
 | |
| | Hi,
this is the default behaviour, because the wizard sees the property as autoincrement and sets the setter to private... That is a limitation of the current implementation. I mean it is not possible to override that behaviour at the moment.
Regards, Christian
Edit: I'm sorry for the inconvenience.
|
 | |
| | Thanks.
With your help I found a solution. What more could I ask for. Maybe others will benefit.
Thanks again,
Todd
|
 | |
| | Thanks. I'm here to help. I hope Opf3 is working as you expect it... We are spending a lot time to keep the thing easy, customizable and fast 
Regards, Christian
|