Need maxOccurs=“unbounded” in WCF Data Contract Needs

RitaMaxself

New Member
I'm trying to mock an existing Web Service in another environment for testing purposes and have run into a road block.I'm attempting to create this Mock Service in WCFThe service i'm mocking (which is not dev'd in WCF) has an entity with this type defintion:\[code\]<xs:sequence><xs:element maxOccurs="unbounded" minOccurs="0" name="dog" nillable="true" type="xs:string"/></xs:sequence>\[/code\]Notice the maxOccurs="unbounded" the message itself looks something like this:\[code\]<dog>1</dog><dog>2</dog>\[/code\]But i can't figure out how to define my DataContract to deal with this. I assumed just using an array type like:\[code\] [DataContract] public class P56040Input { [DataMember] public string[] dog { get; set; } }\[/code\]would correspond, but it does something unexpected with a new type (arrayofstring):\[code\]<xs:sequence><xs:element xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="dog" nillable="true" type="q1:ArrayOfstring"/></xs:sequence>\[/code\]Is this even possible to mock in WCF?
 
Back
Top