The Soapsuds tool does not generate the correct proxy code when indexers are used in the Microsoft .NET Framework (831688)



The information in this article applies to:

  • Microsoft .NET Framework 1.1
  • Microsoft .NET Framework 1.0

SYMPTOMS

You generate a proxy by using the Soapsuds tool (Soapsuds.exe) for a server that exposes an object. The object that the server exposes implements the ICollection interface and has an indexer. The code that is generated for the Indexer property is incorrect.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to reproduce the behavior

  1. Create a client application and create a server application to implement Microsoft .NET Framework remoting.

    The server code exposes an object. The object that the server exposes implements the ICollection interface and has an indexer.
  2. Generate the proxy code to be included in the client application by using the following Soapsuds command:
    soapsuds.exe -ia:server -gc -nowp
    The generated proxy code does not contain correct code for the Indexer property.

    Note In this step, server is a placeholder for the name of the server application that you use in your client application.
  3. In the generated code, the indexer is shown as
    public Int32 Item
    instead of
    public Class1 this
  4. The following code is the generated proxy code for a sample application:
    using System;
    using System.Runtime.Remoting.Messaging;
    using System.Runtime.Remoting.Metadata;
    using System.Runtime.Remoting.Metadata.W3cXsd2001;
    
    namespace TestSDK 
    {
    [Serializable, SoapType
    (XmlNamespace=
    @"http://schemas.microsoft.com/clr/nsassem/TestSDK/
    TestSDK%2C%20Version%3D1.0.863.18587%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull", 
    XmlTypeNamespace=
    @"http://schemas.microsoft.com/clr/nsassem/
    TestSDK/TestSDK%2C%20Version%3D1.0.863.18587%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull")]
    public class Class1 : System.MarshalByRefObject
    {
    public String Name
    {
    [SoapMethod(SoapAction=@"http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1/TestSDK#get_Name")]
    get{return Name;}
    [SoapMethod(SoapAction=@"http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1/TestSDK#set_Name")]
    set{Name= value;}
    }
    [SoapMethod(SoapAction=@"http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1/TestSDK#NameLength")]
    public Int32 NameLength()
    {
    return((Int32) (Object) null);
    }
    }
    [Serializable, 
    SoapType(
    XmlNamespace=
    @"http://schemas.microsoft.com/clr/nsassem/
    TestSDK/TestSDK%2C%20Version%3D1.0.863.18587%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull", 
    XmlTypeNamespace=
    @"http://schemas.microsoft.com/clr/nsassem/TestSDK/
    TestSDK%2C%20Version%3D1.0.863.18587%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull")]
    public class Class1s : System.MarshalByRefObject
    {
    [SoapMethod(SoapAction=@"http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#GetEnumerator")]
    public virtual System.Collections.IEnumerator GetEnumerator()
    {
    return((System.Collections.IEnumerator) (Object) null);
    }
    public virtual Boolean IsSynchronized
    {
    [SoapMethod
    (SoapAction=@"http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#get_IsSynchronized")]
    get{return IsSynchronized;}
    }
    public virtual Object SyncRoot
    {
    [SoapMethod(SoapAction=@"http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#get_SyncRoot")]
    get{return SyncRoot;}
    }
    public virtual Int32 Count
    {
    [SoapMethod(SoapAction=@"http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#get_Count")]
    get{return Count;}
    }
    [SoapMethod(SoapAction=@"http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#CopyTo")]
    public virtual void CopyTo(Array array, Int32 index)
    {
    return;
    }
    public Int32 Item
    {
    [SoapMethod(SoapAction=@"http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#get_Item")]
    get{return Item;}
    [SoapMethod(SoapAction=@"http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#set_Item")]
    set{Item= value;}
    }
    [SoapMethod(SoapAction=@"http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#Add")]
    public void Add(Object newItem)
    {
    return;
    }
    }
    }

Modification Type:MajorLast Reviewed:2/17/2004
Keywords:kbServer kbClient kbRemoteProg kbRemoting kbbug KB831688 kbAudDeveloper