I have created several web services. The function ws_read (GET request) returns a JavaScript object. This gives the caller a XML as response.
The problem is that the received XML has a cempletely different element order than the object that I created in ws_read. Validating this XML against a schema will fail.
Does anyone know why this is so and what I need to do to set the order?
Generally XML is unordered, so validating shouldn’t fail. Having said that, we have done a project that required returning the exact same response as a .NET web service, and needed to be in SOAP. We wrote our own servlet to handle it and had it use servoys web service, but then ran the XML through an XSLT to order it how they wanted, so its possible, but takes some work.
Alternately, try the Velocity Web Services project on servoyforge.net as I think you can have more control over the output with that.