Hello,
could this be a VJ++ problem? I tried your code with both JDK 1.3.1_04 and 1.4.1_01 and the document inserted (into Tamino 3.1.2.1, using the 3.1.2.4 API from the Community) correctly.
I made a minor modification to the code:
TXMLObject xmlObject = TXMLObject.newInstance( TDOMObjectModel.getInstance() );
// Create a URL
URL url = new URL("http://localhost/components.xml");
InputStream fin = url.openStream();
xmlObject.readFrom( fin );
TConnection connection = TConnectionFactory.getInstance().newConnection( "http://localhost/tamino/test" );
TXMLObjectAccessor accessor = connection.newXMLObjectAccessor( TAccessLocation.newInstance( "ino:etc" ),
TDOMObjectModel.getInstance() );
// tamino response object
TResponse response = accessor.insert( xmlObject );
(I also chopped the end off the document, but the encoding is still “utf-8”.)
I hope that helps,
Trevor.
#webMethods#webMethods-Tamino-XML-Server-APIs#API-Management