Java action utilizing Integration.importStream for XML parsing not allowed due to restriction set by the accessExternalSchema property

0
Hi, I set up a Java action to parse an XML file based on a XSD schema. The XSD schema is referencing other schema definitions (XSDs) I use Java API of Studio 10 defined API Integration API Core.integration().importStream​(IContext context, java.io.InputStream stream, java.lang.String importMappingName, IMendixObject mappingParameter, boolean shouldValidate) An exception occurs stating: Caused by: org.xml.sax.SAXParseException: schema_reference: Failed to read schema document 'xml.xsd', because 'http' access is not allowed due to restriction set by the accessExternalSchema property.   I tried to find this property setting but I couldn't find it. where is it? Also if I use the Microflow for XML parsing, there is no problem. However, I need the Java action for a shortcoming in the XML parser Microflow.   any help would be appriciated best regards Stefan
asked
1 answers
0

I created a support ticket which was answered by Mendix. Here's the response:

We've seen similar errors when customer ran into 'file' access issues. In that case, you could add -Djavax.xml.accessExternalSchema=all to your Java argument (add it to the "Extra JVM parameters" in your server configuration), which should also allow accessing over HTTP (you could try to test locally whether this indeed solves the issue).  However, this will not work (to add the JVM variable) on the Mendix Cloud due to security best practices. 

Alas it didn't work for me right away and since we plan to utilize the Mendix Cloud anyway this soltion won't suffice.

Just wanted t owrap this question up

best regards

Stefan

answered