The web service is here: http://api.bing.net/search.wsdl
In the VS2010 project, I click Add Service Link. For "Collection Type" I specify " System.Collections.Generic.List " (or something else on this list, but not in the array). Click "OK" - it will generate the code.
Actual Results :
The code contains arrays instead of lists:
[System.Xml.Serialization.XmlArrayAttribute(Order=10)]
public SourceType[] Sources {
get {
return this.sourcesField;
}
set {
this.sourcesField = value;
this.RaisePropertyChanged("Sources");
}
}
Expected Results :
The code should contain lists for all collections.
Question
There are many files in the web services folder that affect the generation of the actual code: Reference.svcmap, * .svcinfo, * .wsdl.
Wsdl2code ( , ) -?
Reference.svcmap , :
<CollectionMappings>
<CollectionMapping TypeName="System.Collections.Generic.List`1" Category="List" />
</CollectionMappings>
<GenerateSerializableTypes>true</GenerateSerializableTypes>
<Serializer>Auto</Serializer>
<UseSerializerForFaults>true</UseSerializerForFaults>
<ReferenceAllAssemblies>true</ReferenceAllAssemblies>
<ReferencedAssemblies />
<ReferencedDataContractTypes />
<ServiceContractMappings />
- .