Hi!
Technical data: Tamino V2.3.1, JDK 1.3.1, Apache Webserver
I have a xml document as a long String. I tried to insert this String in Tamino by using the native Java HTTP Interface. Here is the code, where sXML is the XML-String
…
String sEncodedXML = URLEncoder.encode(sXML);
URLConnection connection = url.openConnection();
connection.setDoOutput(true);
PrintWriter out = new PrintWriter(connection.getOutputStream());
out.println(“_process=” + sEncodedXML);
out.close();
…
This method works only if there is no “&” character in the text-elements of the XML-String. But if there is a “&” character I get this message from Tamino: Invalid token found or document incomplete
After that I tried to use the TamioClient API. I used the following code to create a DOM from my XML-String:
…
DOM dom = new DOM();
Document doc = dom.readDocument(new StringReader(sXML));
…
After that TaminoClients insert method got the same error, if there was a “&” character in any text-element of the XML-document. I don’t know what to do anymore, can you help me??
Wolfram Hu
#webMethods-Tamino-XML-Server-APIs#webMethods#API-Management