Enhance WsdlDocument handling on includes and add example WSDL/XSD files#29
Open
abossard wants to merge 3 commits intoAzure-Samples:mainfrom
Open
Enhance WsdlDocument handling on includes and add example WSDL/XSD files#29abossard wants to merge 3 commits intoAzure-Samples:mainfrom
abossard wants to merge 3 commits intoAzure-Samples:mainfrom
Conversation
… WSDL and XSD files
… exclude .idea directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
When trying to process a WSDL with includes, if any include defines a xmlns:xsd attribute, it will fail with a key error, since dotnet XSL parser always adds an xmlns:xs attribute and the ToDictionary will have a key clash.
This PR will make it so that you can have multiple times the same namespace when doing includes. Which is correct, since the included namespace could use an existing namespace on a different property.
Enhancements to Namespace Handling:
ApiManagementSchemaImport/Microsoft.Azure.ApiManagement.WsdlProcessor.Common/WsdlDocument.cs: Improved theAddXmlnsAndChangePrefixReferencedmethod by capturing all declaredxmlnsattributes and using a composite key for the namespace dictionary to handle potential conflicts.Addition of New Schema and WSDL Files:
examples/includeExample/additional.xsd: Added a new schema file defining anAdditionalElementof typexsd:string.examples/includeExample/common.xsd: Added a new schema file defining aCommonElementof typexsd:string.examples/includeExample/example.wsdl: Added a new WSDL file defining a web service with operations, bindings, and messages.examples/includeExample/schema1.xsd: Added a new schema file with an importedcommon.xsdand defined a complex typeExampleTypewith anexampleField.examples/includeExample/schema2.xsd: Added a new schema file with an importedcommon.xsd, includedadditional.xsd, and defined a complex typeExampleTypewith anexampleField.Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test