Azure / LogicAppsUX

https://learn.microsoft.com/azure/logic-apps
MIT License
77 stars 84 forks source link

Data mapper doesn't seem to support schema imports #3804

Open romlodihc opened 11 months ago

romlodihc commented 11 months ago

Describe the Bug with repro steps

I have a situation where one XSDs is importing 3 local XSDs. However, datamapper doesn't seem to support this. All of these schemas are located in the same directory and are valid. An example:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:test123="test1234" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation="schema1.xsd" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" />
  <xs:import schemaLocation="schema3.xsd" namespace="test1234" />

Can someone validate this?

Screenshots or Videos

No response

Version

v2.81.5

Additional context

No response

DanielleCogs commented 11 months ago

Yes we do not support this yet, but we are planning on implementing this as a feature soon! We can use this item for tracking

DanielleCogs commented 10 months ago

Not much frontend impact for this. This scenario would be simple to support from the backend. Question then becomes if we should work to support this with integration accounts.

fijsh commented 4 months ago

@DanielleCogs Can we have a status update for this one? Is there a workaround at this moment so that I can use XSD's with imports with the data mapper?

DanielleCogs commented 4 months ago

Yes I am working to get an update on this for you!

DanielleCogs commented 4 months ago

I am now having trouble reproducing the issue. We tested with our own example as you can see in the screenshot below. @fijsh are you seeing an error message? image

fijsh commented 4 months ago

Thanks for looking into it @DanielleCogs. I get the following error:

400 - InvalidSchema: The provided schema content is not valid. If the schema has any references, please upload the referenced schemas to the Integration Account first. The compilation of schema failed with error: 'The global element 'Name' has already been declared.'.

Only now I see the error message: 'The global element 'Name' has already been declared.'. But, the Xsd seems to be valid. I can successfully open it with Visual Studio and use the schema explorer to view the schema. When I load it into a SchemaSet it is valid and I can also create a class from it using [Xsd.exe.] See attached my schema files. The message about the integration account is a bit confusing for me.

image

(url) InvoiceDetails.zip