-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet-svcutil cannot handle recursively nested XSD structures #5404
Comments
Update:
|
@schneoka , since I was unable to reproduce the first "double namespace" problem, the example serivce/wsdl I created to reproduce the issue may be missing some key information compared to yours. Therefore, the conclusion mentioned in my previous comments for the second issue may not apply to you. Can you provide a fully constructed simplified wsdl file that reproduces the issue? |
@imcarolwang, i used this command to create the file:
Example with dotnet-svcutil:
It was a lot of work to change the access to member extension from list to array type, but it still doesn't work. The extension parameter provides no data. The WSDL WSDL.xml |
@schneoka thank you for the information! It's very helpful, and I'm able to reproduce both of the issues described. I found out that it was " I'm wondering how you defined your service that its WSDL would contain " |
@imcarolwang Isn't that the definition in https://www.w3.org/2001/XMLSchema?
|
Hi @schneoka, I have a proposed fix to address this issue and I tried to run the private "fixed" build against the WSDL.xml you provided, here is the cs file that was generated: BflowWSDL2.txt, would you mind try it out in your project and see if it works? |
@imcarolwang The new cs file works in our project, thank you very much. |
Hi @imcarolwang, we have a change in our WSDL. Do you know when a new release will be available that contains the fix. |
@schneoka, you can build and pack the product locally. Clone the repo, then run: build -restore
build -build
build -pack On high core count machines the build step sometimes fails due to an issue with parallel builds, if that happens, run it again. This will get you a local build of the nuget package which should unblock you. |
Here is an excerpt from our WSDL definition. The structure oel_CmisExtensionTypeList is recursively nested:
To generate the WCF class this command was used:
dotnet-svcutil http://localhost:17089/wsdl --namespace "*, COI.SOAPConnector" --internal --sync --reference "c:\Program Files\dotnet\sdk\8.0.100\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Collections.dll" --noStdLib --outputFile BflowWSDL.cs --targetFramework "net8.0"
The generated class (I also tried dotnet-svcutil 2.1.0, it does not work either) looks like this:
The definition of extension contains two errors: Firstly, the namespace COI.SOAPConnector appears twice:
COI.SOAPConnector.COI.SOAPConnector.oel_CmisExtensionType[]
and secondly, the XSD definition contains a reference to oel_CmisExtensionTypeList, not to oel_CmisExtensionType
The svcutil used with .NET6 has generated the correct code here.
Even if the duplicate namespace is corrected manually, the transfer of values in extension.any no longer works.
The text was updated successfully, but these errors were encountered: