Re: How to do: Web Services returning a class that inherits arrayl



I beg differ,

its an array. Array types can be defined in the soap schema. I'm just trying
to find out why doesn't mines get defined. I can update my reference files
but it does me little good if I then update my web references.

Has anyone encounter this problem or has a possible solution?

Thanks,

"Registered User" wrote:

On Thu, 18 Sep 2008 11:31:04 -0700, Hammer
<Hammer@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

All,

I have a class called CartLine and I try to return this class in a Web
Method I can not!

[Serializable]
public class Cartline: Arraylist
{
// class properties and etc.
}

The proxy reference doesn't contain any information even though I use the
following:

[XmlInclude(typeof(ShoppingCart)), XmlInclude(typeof(Business.Cart))]
public CartLine GetCartItem(String m_ShoppingCartUserId,
Common.UserStatus eStatus)

And to add insult to injury, when I uses this web method calls to returns my
class as object[] that I can not cast back to my business class.

Can anyone shed some light on how to accomplish this?


You're trying to return an object which contains both data and
functionality which can't be done. The objects in the array are of a
type declared within the web service's namespace. This is because not
every client will know about the System.Collections namespace and its
ArrayList type.

Web service types are described as simple objects because they are not
based upon true object-oriented types. The SOAP in SOAP web service
stands for Simple Object Access Protocol.A different mechanism will be
needed to pass complex types.

regards
A.G.

.



Relevant Pages

  • Re: How to do: Web Services returning a class that inherits arrayl
    ... array that applys to your situation. ... Array types can be defined in the soap schema. ... I have a class called CartLine and I try to return this class in a Web ... The proxy reference doesn't contain any information even though I use the ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: How to do: Web Services returning a class that inherits arrayl
    ... array that applys to your situation. ... Array types can be defined in the soap schema. ... I have a class called CartLine and I try to return this class in a Web ... The proxy reference doesn't contain any information even though I use the ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: VB-101: Passing Arrays ByVal vs ByRef
    ... changed if an array is passed by Val. ... ' new reference ... As each function creates a new array object, ... 'secondArray' and 'secondArrayCopy'. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Need help with textboxes
    ... The JavaScript 1.5 Reference already states: ... All forms and their children are stored in an array ... use dot notation or object literals. ... No. Bracket property accessors allow their argument to be any string value. ...
    (comp.lang.javascript)
  • Re: Garbage Collection Issues in long-standing services
    ... the pinned array should get unpinned or ... The receive case is done quite well, I do create a 4K buffer and reuse it ... and remove the reference to my wrapper socket class, ...
    (microsoft.public.dotnet.languages.csharp)