This may be related to my other issue with OpenAPI (Parameters cannot have both a "in: body" and "in: formData", as "formData" _will_ be the body) but I am getting what appears to be incorrectly generated WSDL for SOAP 1.2.
The root of the problem appears to be that the WSDL and XSD seem to expect certain types (typically array types) to be declared in a standard XSD when they’re not.
For example, in the definition of the response you find
<xs:complexType name="ResponseStatus">
<xs:sequence>
<xs:element name="ErrorCode" type="xs:string" minOccurs="0" nillable="true"/>
<xs:element name="Message" type="xs:string" minOccurs="0" nillable="true"/>
<xs:element name="StackTrace" type="xs:string" minOccurs="0" nillable="true"/>
<xs:element name="Errors" type="tns:ArrayOfResponseError" minOccurs="0" nillable="true"/>
<xs:element name="Meta" type="q8:ArrayOfKeyValueOfstringstring" minOccurs="0" nillable="true" xmlns:q8="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
</xs:sequence>
</xs:complexType>
Which presumes there is a definition of ArrayOfKeyValueOfstringstring in the “http://schemas.microsoft.com/2003/10/Serialization/Arrays” schema – but there isn’t. Similar expectations are found throughout the XSD, with things like ArrayOfdouble and ArrayOfdateTime.
The DTO is simply:
[DataContract]
[Route("/candidate", “PUT”, Summary = “Create or update a candidate”)]
public class CandidatePut : IReturn
{
// Unique to this put
[DataMember]
[ApiMember(Description = “Details of the candidate to update or add”, IsRequired = true)]
public Candidate candidate { get; set; }
}
public class CandidatePutResponse : IHasResponseStatus
{
[DataMember]
[ApiMember(Description = "The unique reference for the updated or newly inserted candidate record")]
public Int32 CandidateRef { get; set; }
public ResponseStatus ResponseStatus { get; set; }
}
public class Candidate
{
[DataMember]
[ApiMember(Description = "The unique reference for this candidate. When PUTting a record if this value is 0 then a new candidate will be added")]
public Int32 CandidateRef { get; set; }
}