Microsoft KB Archive/831688

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

Article ID: 831688

Article Last Modified on 4/25/2007

-

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.



Steps to reproduce the behavior
 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.  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,  is a placeholder for the name of the server application that you use in your client application.   In the generated code, the indexer is shown as public Int32 Item instead of public Class1 this   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= @&quot;http://schemas.microsoft.com/clr/nsassem/TestSDK/ TestSDK%2C%20Version%3D1.0.863.18587%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull&quot;, XmlTypeNamespace= @&quot;http://schemas.microsoft.com/clr/nsassem/ TestSDK/TestSDK%2C%20Version%3D1.0.863.18587%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull&quot;)] public class Class1 : System.MarshalByRefObject { public String Name { [SoapMethod(SoapAction=@&quot;http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1/TestSDK#get_Name&quot;)] get{return Name;} [SoapMethod(SoapAction=@&quot;http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1/TestSDK#set_Name&quot;)] set{Name= value;} } [SoapMethod(SoapAction=@&quot;http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1/TestSDK#NameLength&quot;)] public Int32 NameLength { return((Int32) (Object) null); } } [Serializable, SoapType( XmlNamespace= @&quot;http://schemas.microsoft.com/clr/nsassem/ TestSDK/TestSDK%2C%20Version%3D1.0.863.18587%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull&quot;, XmlTypeNamespace= @&quot;http://schemas.microsoft.com/clr/nsassem/TestSDK/ TestSDK%2C%20Version%3D1.0.863.18587%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull&quot;)] public class Class1s : System.MarshalByRefObject { [SoapMethod(SoapAction=@&quot;http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#GetEnumerator&quot;)] public virtual System.Collections.IEnumerator GetEnumerator { return((System.Collections.IEnumerator) (Object) null); } public virtual Boolean IsSynchronized { [SoapMethod (SoapAction=@&quot;http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#get_IsSynchronized&quot;)] get{return IsSynchronized;} } public virtual Object SyncRoot { [SoapMethod(SoapAction=@&quot;http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#get_SyncRoot&quot;)] get{return SyncRoot;} } public virtual Int32 Count { [SoapMethod(SoapAction=@&quot;http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#get_Count&quot;)] get{return Count;} } [SoapMethod(SoapAction=@&quot;http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#CopyTo&quot;)] public virtual void CopyTo(Array array, Int32 index) { return; } public Int32 Item { [SoapMethod(SoapAction=@&quot;http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#get_Item&quot;)] get{return Item;} [SoapMethod(SoapAction=@&quot;http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#set_Item&quot;)] set{Item= value;} } [SoapMethod(SoapAction=@&quot;http://schemas.microsoft.com/clr/nsassem/TestSDK.Class1s/TestSDK#Add&quot;)] public void Add(Object newItem) { return; } } } 

