I reported this same issue last year...

[http://discuss.develop.com/archives/wa.exe?A2=ind0205B&L=DOTNET&P=R3206
7&I=-3]

Our solution was to role out our own type-safe (and remotable)
collections. To alleviate some of the pain in doing this, we built
source code templates for the collection and enumerator classes. Now
whenever we want a type-safe (and remotable) collection, we just copy
the templates and then substitute in the base type using 'cut and
paste'...Not elegant, but it works.

Regards
scott

> -----Original Message-----
> From: PFM [mailto:[EMAIL PROTECTED]] 
> Sent: Saturday, 15 February 2003 12:14 AM
> To: [EMAIL PROTECTED]
> Subject: [ADVANCED-DOTNET] CollectionBase problem with Soapsuds
> 
> 
> I have a DLL class library, Messaging_Common.dll, that 
> contains a class called MessageAttachments derived from 
> CollectionBase.
> 
> Another DLL called Message_BusinessRules.dll has a reference 
> to Messaging_Common.dll.  The Message_BusinessRules.dll 
> contains a MessageQueue class derived from MarshalByRefObject.
> 
> When I try to use Soapsuds to create the client proxy dll, I 
> receive the following error,
> 
> ...\bin\Debug>>soapsuds -ia:Messaging_BusinessRules -os:x.xml 
> gc ===========================
> LineNum   : 126
> NodeType  : 1
> Name      : complexType
> Namespace : http://www.w3.org/2001/XMLSchema
> Prefix    :
> Hasvalue  : False
> IsEmpty   : True
> Depth     : 3
> AttributeCount: 2
>       =========================
>       AttributeName: name
>       Prefix       :
>       Namespace    :
>       Value        : MessageAttachments
>       =========================
>       AttributeName: base
>       Prefix       :
>       Namespace    :
>       Value        : ns5:CollectionBase
> Error: Invalid schema data., Value cannot be null.
> Parameter name: key
> 
> 
> Has anyone every seen this before or know what the problem is?
> 
> *****************************************************************
> This is the XML generated - There is not namespace of xmlns:ns5.
> *****************************************************************
> 
> <?xml version='1.0' encoding='UTF-8'?>
> <definitions name='MessageQueue' 
> targetNamespace='http://schemas.microsoft.com/clr/nsassem/Mess
> aging/Messagi
> ng_BusinessRules%2C%20Version%3D1.0.1139.29415%2C%20Culture%3D
> neutral%2C%
> 20PublicKeyToken%3Dnull'
>             xmlns='http://schemas.xmlsoap.org/wsdl/'
>             xmlns:tns='http://schemas.xmlsoap.org/wsdl/'
>             xmlns:xsd='http://www.w3.org/2001/XMLSchema'
>             xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
>             xmlns:suds='http://www.w3.org/2000/wsdl/suds'
>             xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
>             xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
> 
> xmlns:ns2='http://schemas.microsoft.com/clr/nsassem/Messaging.
> MessageQueue/
> Messaging_BusinessRules%2C%20Version%3D1.0.1139.29415%2C%20Culture%
> 3Dneutral%2C%20PublicKeyToken%3Dnull'
> 
> xmlns:ns0='http://schemas.microsoft.com/clr/nsassem/Messaging/
> Messaging_Bus
> inessRules%2C%20Version%3D1.0.1139.29415%2C%20Culture%3Dneutral%2C%
> 20PublicKeyToken%3Dnull'
> 
> xmlns:ns3='http://schemas.microsoft.com/clr/nsassem/Messaging/
> Messaging_Com
> mon%2C%20Version%3D1.0.1139.29414%2C%20Culture%3Dneutral%2C%
> 20PublicKeyToken%3Dnull'
>             xmlns:ns1='http://schemas.microsoft.com/clr/ns/System'
> 
> xmlns:ns4='http://schemas.microsoft.com/clr/nsassem/System.Dat
> a.SqlTypes/Sy
> stem.Data%2C%20Version%3D1.0.3300.0%2C%20Culture%3Dneutral%2C%
> 20PublicKeyToken%3Db77a5c561934e089'
>             xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'>
>     <types>
>         <schema 
> targetNamespace='http://schemas.microsoft.com/clr/nsassem/Mess
> aging/Messagi
> ng_BusinessRules%2C%20Version%3D1.0.1139.29415%2C%20Culture%3D
> neutral%2C%
> 20PublicKeyToken%3Dnull'
>                 xmlns='http://www.w3.org/2001/XMLSchema'
>                 elementFormDefault='unqualified' 
> attributeFormDefault='unqualified'>
>         </schema>
>         <schema 
> targetNamespace='http://schemas.microsoft.com/clr/nsassem/Mess
> aging/Messagi
> ng_Common%2C%20Version%3D1.0.1139.29414%2C%20Culture%3Dneutral%2C%
> 20PublicKeyToken%3Dnull'
>                 xmlns='http://www.w3.org/2001/XMLSchema'
>                 elementFormDefault='unqualified' 
> attributeFormDefault='unqualified'>
>             <import 
> namespace='http://schemas.microsoft.com/clr/nsassem/System.Dat
> a.SqlTypes/Sy
> stem.Data%2C%20Version%3D1.0.3300.0%2C%20Culture%3Dneutral%2C%
> 20PublicKeyToken%3Db77a5c561934e089'/>
>             <simpleType name='AcknowledgementType' 
> suds:enumType='xsd:int'>
>                 <restriction base='xsd:string'>
>                         <enumeration value='None'/>
>                         <enumeration value='PositiveArrival'/>
>                         <enumeration value='PositiveReceive'/>
>                         <enumeration value='NegativeArrival'/>
>                         <enumeration value='NegativeReceive'/>
>                 </restriction>
>             </simpleType>
>             <simpleType name='MessagePriority' 
> suds:enumType='xsd:int'>
>                 <restriction base='xsd:string'>
>                         <enumeration value='Highest'/>
>                         <enumeration value='High'/>
>                         <enumeration value='Normal'/>
>                         <enumeration value='Low'/>
>                         <enumeration value='Lowest'/>
>                 </restriction>
>             </simpleType>
>             <simpleType name='MessageType' suds:enumType='xsd:int'>
>                 <restriction base='xsd:string'>
>                         <enumeration value='Acknowledgement'/>
>                         <enumeration value='Normal'/>
>                 </restriction>
>             </simpleType>
>             <simpleType name='EncryptionAlgorithm' 
> suds:enumType='xsd:int'>
>                 <restriction base='xsd:string'>
>                         <enumeration value='None'/>
>                 </restriction>
>             </simpleType>
>             <simpleType name='DistributionPriority' 
> suds:enumType='xsd:int'>
>                 <restriction base='xsd:string'>
>                         <enumeration value='Highest'/>
>                         <enumeration value='High'/>
>                         <enumeration value='Normal'/>
>                         <enumeration value='Low'/>
>                         <enumeration value='Lowest'/>
>                 </restriction>
>             </simpleType>
>             <simpleType name='DistributionState' 
> suds:enumType='xsd:int'>
>                 <restriction base='xsd:string'>
>                         <enumeration value='NotDistributed'/>
>                         <enumeration value='Distributing'/>
>                         <enumeration value='Distributed'/>
>                         <enumeration value='Exception'/>
>                 </restriction>
>             </simpleType>
>             <simpleType name='MessageFormatter' 
> suds:enumType='xsd:int'>
>                 <restriction base='xsd:string'>
>                         <enumeration value='XML'/>
>                         <enumeration value='Binary'/>
>                         <enumeration value='Soap'/>
>                 </restriction>
>             </simpleType>
>             <element name='Message' type='ns3:Message'/>
>             <complexType name='Message'>
>                 <all>
>                         <element name='_AcknowledgeType' 
> type='ns3:AcknowledgementType'/>
>                         <element name='_Priority' 
> type='ns3:MessagePriority'/>
>                         <element name='_Type' type='ns3:MessageType'/>
>                         <element name='_MessageGuid' 
> type='ns3:MessageGuid'/>
>                         <element name='_SenderGuid' 
> type='ns3:ParticipantGuid'/>
>                         <element name='_SentTime' 
> type='ns4:SqlDateTime'/>
>                         <element name='_ExpirationTime' 
> type='xsd:duration'/>
>                         <element name='_CorrelationGuid' 
> type='ns3:MessageGuid'/>
>                         <element name='_Body' type='ns3:MessageBody'/>
>                         <element name='Attachments' 
> type='ns3:MessageAttachments'/>
>                         <element name='_ArrivedTime' 
> type='ns4:SqlDateTime'/>
>                         <element name='_EncryptionAlgorithm' 
> type='ns3:EncryptionAlgorithm'/>
>                         <element name='_UseDeadMessageQueue' 
> type='xsd:boolean'/>
>                 </all>
>             </complexType>
>             <element name='ParticipantGuid' 
> type='ns3:ParticipantGuid'/>
>             <complexType name='ParticipantGuid' base='ns3:DFS_Guid'/>
>             <element name='MessageGuid' type='ns3:MessageGuid'/>
>             <complexType name='MessageGuid' base='ns3:DFS_Guid'/>
>             <element name='Distribution' type='ns3:Distribution'/>
>             <complexType name='Distribution'>
>                 <all>
>                         <element name='_DistributionGuid' 
> type='ns1:Guid'/>
>                         <element name='_Description' 
> type='xsd:string'/>
>                         <element name='_QueueName' type='xsd:string'/>
>                         <element name='_Priority' 
> type='ns3:DistributionPriority'/>
>                         <element name='_DistributionState' 
> type='ns3:DistributionState'/>
>                         <element name='_DistributionTime' 
> type='xsd:dateTime'/>
>                         <element name='_CreationTime' 
> type='xsd:dateTime'/>
>                         <element name='_UpdateTime' 
> type='xsd:dateTime'/>
>                         <element name='Rule' 
> type='ns3:ArrayOfDistributionRule'/>
>                 </all>
>             </complexType>
>             <element name='MessageBody' type='ns3:MessageBody'/>
>             <complexType name='MessageBody'>
>                 <all>
>                         <element name='_MessageBodyGuid' 
> type='ns3:MessageBodyGuid'/>
>                         <element name='_Handler' type='xsd:string'/>
>                         <element name='_Description' 
> type='xsd:string'/>
>                         <element name='_Object' type='xsd:anyType'/>
>                         <element name='_Formatter' 
> type='ns3:MessageFormatter'/>
>                         <element name='_ObjectType' type='ns1:Type'/>
>                 </all>
>             </complexType>
>             <element name='MessageAttachments' 
> type='ns3:MessageAttachments'/>
>             <complexType name='MessageAttachments' 
> base='ns5:CollectionBase'/>
>             <element name='DFS_Guid' type='ns3:DFS_Guid'/>
>             <complexType name='DFS_Guid'>
>                 <all>
>                         <element name='_Guid' type='ns1:Guid'/>
>                 </all>
>             </complexType>
>             <element name='DistributionRule' 
> type='ns3:DistributionRule'/>
>             <complexType name='DistributionRule'>
>                 <all>
>                         <element name='_DistributionRuleGuid' 
> type='ns1:Guid'/>
>                         <element name='_Description' 
> type='xsd:string'/>
>                         <element name='_RuleIndex' type='xsd:int'/>
>                         <element name='_ParticipantGuid' 
> type='ns1:Guid'/>
>                         <element name='_CreationTime' 
> type='xsd:dateTime'/>
>                         <element name='_UpdateTime' 
> type='xsd:dateTime'/>
>                 </all>
>             </complexType>
>             <element name='MessageBodyGuid' 
> type='ns3:MessageBodyGuid'/>
>             <complexType name='MessageBodyGuid' base='ns3:DFS_Guid'/>
>             <complexType name='ArrayOfDistributionRule'>
>                     <complexContent>
>                             <restriction base='soapenc:Array'>
>                                     <attribute 
> ref='soapenc:arrayType' wsdl:arrayType ='ns3:DistributionRule[]'/>
>                             </restriction>
>                     </complexContent>
>             </complexType>
>         </schema>
>     </types>
> 
>     <message name='MessageQueue.ReceiveAndWaitInput'>
>         <part name='queueName' type='xsd:string'/>
>         <part name='participantGuid' type='ns3:ParticipantGuid'/>
>     </message>
>     <message name='MessageQueue.ReceiveAndWaitOutput'>
>         <part name='return' type='ns3:Message'/>
>     </message>
> 
>     <message name='MessageQueue.ReceiveCompleteInput'>
>         <part name='queueName' type='xsd:string'/>
>         <part name='participantGuid' type='ns3:ParticipantGuid'/>
>         <part name='messageGuid' type='ns3:MessageGuid'/>
>     </message>
>     <message name='MessageQueue.ReceiveCompleteOutput'>
>     </message>
> 
>     <message name='MessageQueue.ReceiveInput'>
>         <part name='queueName' type='xsd:string'/>
>         <part name='participantGuid' type='ns3:ParticipantGuid'/>
>     </message>
>     <message name='MessageQueue.ReceiveOutput'>
>         <part name='return' type='ns3:Message'/>
>     </message>
> 
>     <message name='MessageQueue.SendInput'>
>         <part name='queueName' type='xsd:string'/>
>         <part name='message' type='ns3:Message'/>
>         <part name='distribution' type='ns3:Distribution'/>
>     </message>
>     <message name='MessageQueue.SendOutput'>
>     </message>
> 
>     <portType name='MessageQueuePortType'>
>         <operation name='ReceiveAndWait' 
> parameterOrder='queueName participantGuid'>
>             <input name='ReceiveAndWaitRequest' 
> message='ns0:MessageQueue.ReceiveAndWaitInput'/>
>             <output name='ReceiveAndWaitResponse' 
> message='ns0:MessageQueue.ReceiveAndWaitOutput'/>
>         </operation>
>         <operation name='ReceiveComplete' 
> parameterOrder='queueName participantGuid messageGuid'>
>             <input name='ReceiveCompleteRequest' 
> message='ns0:MessageQueue.ReceiveCompleteInput'/>
>             <output name='ReceiveCompleteResponse' 
> message='ns0:MessageQueue.ReceiveCompleteOutput'/>
>         </operation>
>         <operation name='Receive' parameterOrder='queueName 
> participantGuid'>
>             <input name='ReceiveRequest' 
> message='ns0:MessageQueue.ReceiveInput'/>
>             <output name='ReceiveResponse' 
> message='ns0:MessageQueue.ReceiveOutput'/>
>         </operation>
>         <operation name='Send' parameterOrder='queueName 
> message distribution'>
>             <input name='SendRequest' 
> message='ns0:MessageQueue.SendInput'/>
>             <output name='SendResponse' 
> message='ns0:MessageQueue.SendOutput'/>
>         </operation>
>     </portType>
> 
>     <binding name='MessageQueueBinding' 
> type='ns0:MessageQueuePortType'>
>         <soap:binding style='rpc' 
> transport='http://schemas.xmlsoap.org/soap/http'/>
>         <suds:class type='ns0:MessageQueue' 
> rootType='MarshalByRefObject'>
>         </suds:class>
>         <operation name='ReceiveAndWait'>
>             <soap:operation 
> soapAction='http://schemas.microsoft.com/clr/nsassem/Messaging
> .MessageQueue
> /Messaging_BusinessRules#ReceiveAndWait'/>
>             <suds:method attributes='public'/>
>             <input name='ReceiveAndWaitRequest'>
>                 <soap:body use='encoded' 
> encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
> namespace='http://schemas.microsoft.com/clr/nsassem/Messaging.
> MessageQueue/
> Messaging_BusinessRules%2C%20Version%3D1.0.1139.29415%2C%20Culture%
> 3Dneutral%2C%20PublicKeyToken%3Dnull'/>
>             </input>
>             <output name='ReceiveAndWaitResponse'>
>                 <soap:body use='encoded' 
> encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
> namespace='http://schemas.microsoft.com/clr/nsassem/Messaging.
> MessageQueue/
> Messaging_BusinessRules%2C%20Version%3D1.0.1139.29415%2C%20Culture%
> 3Dneutral%2C%20PublicKeyToken%3Dnull'/>
>             </output>
>         </operation>
>         <operation name='ReceiveComplete'>
>             <soap:operation 
> soapAction='http://schemas.microsoft.com/clr/nsassem/Messaging
> .MessageQueue
> /Messaging_BusinessRules#ReceiveComplete'/>
>             <suds:method attributes='public'/>
>             <input name='ReceiveCompleteRequest'>
>                 <soap:body use='encoded' 
> encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
> namespace='http://schemas.microsoft.com/clr/nsassem/Messaging.
> MessageQueue/
> Messaging_BusinessRules%2C%20Version%3D1.0.1139.29415%2C%20Culture%
> 3Dneutral%2C%20PublicKeyToken%3Dnull'/>
>             </input>
>             <output name='ReceiveCompleteResponse'>
>                 <soap:body use='encoded' 
> encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
> namespace='http://schemas.microsoft.com/clr/nsassem/Messaging.
> MessageQueue/
> Messaging_BusinessRules%2C%20Version%3D1.0.1139.29415%2C%20Culture%
> 3Dneutral%2C%20PublicKeyToken%3Dnull'/>
>             </output>
>         </operation>
>         <operation name='Receive'>
>             <soap:operation 
> soapAction='http://schemas.microsoft.com/clr/nsassem/Messaging
> .MessageQueue
> /Messaging_BusinessRules#Receive'/>
>             <suds:method attributes='public'/>
>             <input name='ReceiveRequest'>
>                 <soap:body use='encoded' 
> encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
> namespace='http://schemas.microsoft.com/clr/nsassem/Messaging.
> MessageQueue/
> Messaging_BusinessRules%2C%20Version%3D1.0.1139.29415%2C%20Culture%
> 3Dneutral%2C%20PublicKeyToken%3Dnull'/>
>             </input>
>             <output name='ReceiveResponse'>
>                 <soap:body use='encoded' 
> encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
> namespace='http://schemas.microsoft.com/clr/nsassem/Messaging.
> MessageQueue/
> Messaging_BusinessRules%2C%20Version%3D1.0.1139.29415%2C%20Culture%
> 3Dneutral%2C%20PublicKeyToken%3Dnull'/>
>             </output>
>         </operation>
>         <operation name='Send'>
>             <soap:operation 
> soapAction='http://schemas.microsoft.com/clr/nsassem/Messaging
> .MessageQueue
> /Messaging_BusinessRules#Send'/>
>             <suds:method attributes='public'/>
>             <input name='SendRequest'>
>                 <soap:body use='encoded' 
> encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
> namespace='http://schemas.microsoft.com/clr/nsassem/Messaging.
> MessageQueue/
> Messaging_BusinessRules%2C%20Version%3D1.0.1139.29415%2C%20Culture%
> 3Dneutral%2C%20PublicKeyToken%3Dnull'/>
>             </input>
>             <output name='SendResponse'>
>                 <soap:body use='encoded' 
> encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
> namespace='http://schemas.microsoft.com/clr/nsassem/Messaging.
> MessageQueue/
> Messaging_BusinessRules%2C%20Version%3D1.0.1139.29415%2C%20Culture%
> 3Dneutral%2C%20PublicKeyToken%3Dnull'/>
>             </output>
>         </operation>
>     </binding>
> 
>     <portType name='MessagePortType'>
>     </portType>
> 
>     <binding name='MessageBinding' type='ns3:MessagePortType'>
>         <soap:binding style='rpc' 
> transport='http://schemas.xmlsoap.org/soap/http'/>
>         <suds:class type='ns3:Message' rootType='ISerializable'>
>         </suds:class>
>         <suds:class type='ns3:ParticipantGuid' extends='ns3:DFS_Guid'>
>         </suds:class>
>         <suds:class type='ns3:MessageGuid' extends='ns3:DFS_Guid'>
>         </suds:class>
>         <suds:class type='ns3:Distribution'>
>         </suds:class>
>         <suds:class type='ns3:MessageBody'>
>         </suds:class>
>         <suds:class type='ns3:MessageAttachments' 
> extends='ns5:CollectionBase'>
>         </suds:class>
>         <suds:class type='ns3:DFS_Guid'>
>         </suds:class>
>         <suds:class type='ns3:DistributionRule'>
>         </suds:class>
>         <suds:class type='ns3:MessageBodyGuid' extends='ns3:DFS_Guid'>
>         </suds:class>
>     </binding>
> 
>     <service name='MessageQueueService'>
>         <port name='MessageQueuePort' 
> binding='ns0:MessageQueueBinding'>
>         </port>
>     </service>
> </definitions>
> 

Reply via email to