I was trying to populate an instance based on a resource. However, the following doesn't seem to work. We are using XSLTForms (client side implementation of XForms).
<xf:instance id="studentDetailsInstance" xmlns="" src="http://localhost:8081/Restfultest/empDetails" />
I already checked the 'http://localhost:8081/Restfultest/empDetails' resource and it works fine and returns the correct XML document in the browser. Any idea on how to initialise the instance ?
If I try to load the instance from a local file as follows it works fine.
<xf:instance id="testInstance" src="empDetails.xml" />
I can even see in the developer tools network tab that a call is being made and even there is a response. Just that when I view the instance, the value is not set !! I also tried to use the resource attribute but still instance value not populated.
The cross-domain restriction does not allow the browser to get a file not located in the same domain unless the server is configured for this, for example with
Access-Control-Allow-Origin: *