Description
Describe the bug
I'm trying to generate a service from a WSDL that uses requests/responses defined in imported XSDs, and although SvcUtil is reading the XSDs, no code is generated for them and the generated request/response classes are empty.
To Reproduce
Run dotnet-svcutil with a WSDL similar to this one:
<?xml version='1.0' encoding='UTF-8'?>
<definitions
xmlns:...
xmlns:xkms="http://www.w3.org/2002/03/xkms#"
xmlns:tns="some/namespace"
name="XKMSValidate"
targetNamespace="some/namespace">
<types>
<xsd:schema
xmlns:...
xmlns:xkms="http://www.w3.org/2002/03/xkms#"
xmlns:tns="some/namespace"
elementFormDefault="qualified"
targetNamespace="some/namespace">
<xsd:import namespace="http://www.w3.org/2002/03/xkms#" schemaLocation="http://.../xkms.xsd" />
</xsd:schema>
</types>
<message name="validateResult">
<part element="xkms:ValidateResult" name="parameters"></part>
</message>
<message name="validateRequest">
<part element="xkms:ValidateRequest" name="parameters"></part>
</message>
<portType name="SOAPEntryEUPortType">
<operation name="validate">
<input message="tns:validateRequest"></input>
<output message="tns:validateResult"></output>
</operation>
</portType>
<binding name="SOAPEntryEUServiceBinding" type="tns:SOAPEntryEUPortType">
<soap12:binding style="document" transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" />
<operation name="validate">
<soap12:operation soapAction="" />
<input><soap12:body use="literal" /></input>
<output><soap12:body use="literal" /></output>
</operation>
</binding>
<service name="xkms_soap_1_1">...</service>
</definitions>
Please let me know if you need the full WSDL with the XSD files, I may be able to share it privately.
The generated code looks like this:
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")]
[System.ServiceModel.MessageContractAttribute(WrapperName="ValidateRequest", WrapperNamespace="http://www.w3.org/2002/03/xkms#", IsWrapped=true)]
internal partial class validateRequest
{
public validateRequest()
{
}
}
Expected behavior
dotnet-svcutil should generate code for the referenced XSD files.
Additional context
Although I was able to use xsd.exe to generate classes for the referenced XSDs, it is missing a significant amount of attributes. I was able to fix it up somewhat but still cannot produce the XML I want. This would also be very hard to maintain.