Ask a Question related to ASP.NET Web Services, Design and Development.
-
RCS #1
Problem with a method, of an object, that a webmethod returns..
I have a web service. I have a method that returns an instance of another
class. I already learned the hard way that all properties of a returned
object have to be get AND set, even though I don't want the set. Now, when I
create a method in this secondary class, I don't see it on the consumer at
all. It's almost like, if I return an object from a WebMethod - I can't have
any methods. is that correct?
I've tried just about everything I can think of. I've set the [WebMethod]
attribute (even though this class isn't a web server, itself). I've tried
changing return types. I realized that I can't get any method, with any
return type to work in this scenario.
Is this an inside joke that I don't know about? Btw, the web service and
consumer app is 2.0 beta 2.
thanks
RCS Guest
-
[WebMethod] System.NullReferenceException: Object reference not set to an instance of an object.
Um, this isn't going to work, generally. Web services, as any web app (especially on Windows server 2003) are heavily sandboxed. The method you... -
WebMethod returning a object in a COM dll
Hi All I have writen a web method(C#) which is to return an Serializable object declared in a COM dll. The project compiles & but I am not... -
Error when WebMethod returns a jagged array
Hello. I've been getting an error message like the following when testing a webservice that I'm creating: "File or assembly name 8rsiphqb.dll,... -
Calling a WebMethod returns HTTP Status 417: Expectation failed
Hi Manish, Is there a proxy server between the web service server and the particualr client? Based on my experience, this kind of problem may be... -
problem displaying class method returns in form elements
Just come across this annoying problem -- Including a line such as <INPUT type="text" name="whatever" value = "<?php print @$myclass.value?>" >... -
Brock Allen #2
Re: Problem with a method, of an object, that a webmethod returns..
WebServices aren't about passing objects -- they're about passing XML from
one platform to another. You must realize the class/object you're passing
back is a .NET representation of the XML data your returning to your consumer.
The point of web services to to enable this data integration without caring
what the other platform is. So, don't think about objects; instead think
about passing data.
-Brock
DevelopMentor
[url]http://staff.develop.com/ballen[/url]
> I have a web service. I have a method that returns an instance of
> another class. I already learned the hard way that all properties of a
> returned object have to be get AND set, even though I don't want the
> set. Now, when I create a method in this secondary class, I don't see
> it on the consumer at all. It's almost like, if I return an object
> from a WebMethod - I can't have any methods. is that correct?
>
> I've tried just about everything I can think of. I've set the
> [WebMethod] attribute (even though this class isn't a web server,
> itself). I've tried changing return types. I realized that I can't get
> any method, with any return type to work in this scenario.
>
> Is this an inside joke that I don't know about? Btw, the web service
> and consumer app is 2.0 beta 2.
>
> thanks
>
Brock Allen Guest
-
Brad Roberts #3
RE: Problem with a method, of an object, that a webmethod returns..
I have a web service that returns an object that contains members that are
also objects. The client interface code that was created by the IDE did not
work. It sounds similar to your problem.
My solution made sense when I finally figured it out. The consuming(client)
code needed modifications in "New()" to include New() instances of the other
classes.
"RCS" wrote:
> I have a web service. I have a method that returns an instance of another
> class. I already learned the hard way that all properties of a returned
> object have to be get AND set, even though I don't want the set. Now, when I
> create a method in this secondary class, I don't see it on the consumer at
> all. It's almost like, if I return an object from a WebMethod - I can't have
> any methods. is that correct?
>
> I've tried just about everything I can think of. I've set the [WebMethod]
> attribute (even though this class isn't a web server, itself). I've tried
> changing return types. I realized that I can't get any method, with any
> return type to work in this scenario.
>
> Is this an inside joke that I don't know about? Btw, the web service and
> consumer app is 2.0 beta 2.
>
> thanks
>
>
>
>Brad Roberts Guest
-
RCS #4
Re: Problem with a method, of an object, that a webmethod returns..
As I've been digging into this more and more, I've really hit some walls
with Web Services - because I was looking to pass objects back and forth.
I'm now working on a Remoting solution that is working out just fine.
It does definitely seem that the SOAP (SIMPLE object access protocol)
concept really is for simple heterogenous system communication, not for
complex communication.
"Brad Roberts" <BradRoberts56nojunk@hotmail.com> wrote in message
news:2EDE39EB-B399-4F54-8C33-A881A86ABC8E@microsoft.com...>I have a web service that returns an object that contains members that are
> also objects. The client interface code that was created by the IDE did
> not
> work. It sounds similar to your problem.
>
> My solution made sense when I finally figured it out. The
> consuming(client)
> code needed modifications in "New()" to include New() instances of the
> other
> classes.
>
> "RCS" wrote:
>>> I have a web service. I have a method that returns an instance of another
>> class. I already learned the hard way that all properties of a returned
>> object have to be get AND set, even though I don't want the set. Now,
>> when I
>> create a method in this secondary class, I don't see it on the consumer
>> at
>> all. It's almost like, if I return an object from a WebMethod - I can't
>> have
>> any methods. is that correct?
>>
>> I've tried just about everything I can think of. I've set the [WebMethod]
>> attribute (even though this class isn't a web server, itself). I've tried
>> changing return types. I realized that I can't get any method, with any
>> return type to work in this scenario.
>>
>> Is this an inside joke that I don't know about? Btw, the web service and
>> consumer app is 2.0 beta 2.
>>
>> thanks
>>
>>
>>
>>
RCS Guest



Reply With Quote

