XMLInputFactory Error on IPhone App (not on Browser)

Hi there,
I have a confusing error on a different behaviour between IPhone Conflunce App Version 1.37.0.1 and Web-Browser.

Technical the macro receives Data (XML) from a Redmine server. The XML is stored in a ByteArray Class.
Storing in a ByteArray allows to cache the Redmine server response for a while.

For parsing it was wrapped by ByteArray Stream:

    public InputStream httpGetAsInputStream(String url) throws IOException {
        byte[] result = httpGetAsString(url).getBytes(UTF_8);
        return new ByteArrayInputStream(result);
    }
    private static void parse_xml(InputStream in, TicketState t) throws Exception {
        try {
            // ---> THIS FAILS  on IPhone only
            XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(in);
            ...
        }   ...
    }
try {
     InputStream strm =  ....httpGetAsInputStream(tmpurl);
     parse_xml(strm, t);
     strm.close();
}

The XML Output is parsed and rendered as a HTML-Table.

What is realy confusing to me is that the Webbrowser works like expected,
but the IPhone App Throws the Exception: Provider for Class javax.xml.stream.XMLInputFactory cannot be created

Well that is the server side … there should be no difference between IPhone App and Browser.

BR
Rainer

In addtion:

A mobile Browser will render the Page:
confl_XMLInput-MobileBrowser

Hi,
an can announce that I have solved the Problem.
For IPhone App Api it is requried to use the Conflunce Class Loader instead of Javas System Class Loader:

private static XMLInputFactory xmlf = null;
private final static Object xmlf_mutex = new Object();

/* Create a XMLInputFactory with Confluence Class Loader instead of system class loader
 * This is required by iPhone Confluence App Web-API. */
private static XMLInputFactory getXmlFConfl()throws FactoryConfigurationError {
    if(xmlf == null) { synchronized (xmlf_mutex) {
        ClassLoader currentCL = Thread.currentThread().getContextClassLoader();
        ClassLoader webappClassLoader = ConfluenceEvent.class.getClassLoader();
        Thread.currentThread().setContextClassLoader(webappClassLoader);
        xmlf = XMLInputFactory.newInstance();
        Thread.currentThread().setContextClassLoader(currentCL);
    }}
   return xmlf;
}

Then I replaced the XMLStreamReader creation:

-  XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(in);
+  XMLStreamReader reader = getXmlFConfl().createXMLStreamReader(in);