You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by jo...@apache.org on 2006/08/30 12:57:05 UTC

svn commit: r438456 - in /webservices/jaxme/branches: MAVEN/ MAVEN/projects/jm/src/test/resources/bindings/ MAVEN/projects/js/ MAVEN/projects/xs/src/main/java/org/apache/ws/jaxme/xs/impl/ b0_5/src/xs/org/apache/ws/jaxme/xs/impl/ b0_5/src/xs/org/apache/...

Author: jochen
Date: Wed Aug 30 03:57:04 2006
New Revision: 438456

URL: http://svn.apache.org/viewvc?rev=438456&view=rev
Log:
Fixed that the XS parsers logging feature didn't work for transformed schemas.

Removed:
    webservices/jaxme/branches/MAVEN/projects/jm/src/test/resources/bindings/bindings.jxb
    webservices/jaxme/branches/MAVEN/projects/jm/src/test/resources/bindings/bindings.xsd
Modified:
    webservices/jaxme/branches/MAVEN/.project
    webservices/jaxme/branches/MAVEN/projects/js/maven.xml
    webservices/jaxme/branches/MAVEN/projects/xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSLogicalParser.java
    webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/impl/XSLogicalParser.java
    webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/util/LoggingContentHandler.java

Modified: webservices/jaxme/branches/MAVEN/.project
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/.project?rev=438456&r1=438455&r2=438456&view=diff
==============================================================================
--- webservices/jaxme/branches/MAVEN/.project (original)
+++ webservices/jaxme/branches/MAVEN/.project Wed Aug 30 03:57:04 2006
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>ws-jaxme-0.4</name>
+	<name>ws-jaxme-maven1</name>
 	<comment></comment>
 	<projects>
 	</projects>

Modified: webservices/jaxme/branches/MAVEN/projects/js/maven.xml
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/projects/js/maven.xml?rev=438456&r1=438455&r2=438456&view=diff
==============================================================================
--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-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

Modified: webservices/jaxme/branches/MAVEN/projects/xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSLogicalParser.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/projects/xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSLogicalParser.java?rev=438456&r1=438455&r2=438456&view=diff
==============================================================================
--- webservices/jaxme/branches/MAVEN/projects/xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSLogicalParser.java (original)
+++ webservices/jaxme/branches/MAVEN/projects/xs/src/main/java/org/apache/ws/jaxme/xs/impl/XSLogicalParser.java Wed Aug 30 03:57:04 2006
@@ -294,15 +294,6 @@
 		String logDir = System.getProperty("org.apache.ws.jaxme.xs.logDir");
 		FileOutputStream fos = null;
 		try {
-			if (logDir != null) {
-				File tmpFile = File.createTempFile("jaxmexs", ".xsd", new File(logDir));
-				fos = new FileOutputStream(tmpFile);
-				LoggingContentHandler lch = new LoggingContentHandler(fos);
-				lch.setParent(pReader);
-				pReader = lch;
-				String msg = "Read from " + pSource.getPublicId() + ", " + pSource.getSystemId() + " at " + new Date();
-				lch.comment(msg.toCharArray(), 0, msg.length());
-			}
 			SchemaTransformer transformer = getData().getXSObjectFactory().getSchemaTransformer();
 			if (transformer != null) {
 				transformer.parse(pSource, pReader);
@@ -311,6 +302,15 @@
 				newSource.setPublicId(pSource.getPublicId());
 				pSource = newSource;
 				pReader = transformer.getTransformedXMLReader();
+			}
+			if (logDir != null) {
+				File tmpFile = File.createTempFile("jaxmexs", ".xsd", new File(logDir));
+				fos = new FileOutputStream(tmpFile);
+				LoggingContentHandler lch = new LoggingContentHandler(fos);
+				lch.setParent(pReader);
+				pReader = lch;
+				String msg = "Read from " + pSource.getPublicId() + ", " + pSource.getSystemId() + " at " + new Date();
+				lch.comment(msg.toCharArray(), 0, msg.length());
 			}
 			pReader.setContentHandler(pHandler);
 			pReader.parse(pSource);

Modified: webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/impl/XSLogicalParser.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/impl/XSLogicalParser.java?rev=438456&r1=438455&r2=438456&view=diff
==============================================================================
--- webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/impl/XSLogicalParser.java (original)
+++ webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/impl/XSLogicalParser.java Wed Aug 30 03:57:04 2006
@@ -294,15 +294,6 @@
 		String logDir = System.getProperty("org.apache.ws.jaxme.xs.logDir");
 		FileOutputStream fos = null;
 		try {
-			if (logDir != null) {
-				File tmpFile = File.createTempFile("jaxmexs", ".xsd", new File(logDir));
-				fos = new FileOutputStream(tmpFile);
-				LoggingContentHandler lch = new LoggingContentHandler(fos);
-				lch.setParent(pReader);
-				pReader = lch;
-				String msg = "Read from " + pSource.getPublicId() + ", " + pSource.getSystemId() + " at " + new Date();
-				lch.comment(msg.toCharArray(), 0, msg.length());
-			}
 			SchemaTransformer transformer = getData().getXSObjectFactory().getSchemaTransformer();
 			if (transformer != null) {
 				transformer.parse(pSource, pReader);
@@ -311,6 +302,15 @@
 				newSource.setPublicId(pSource.getPublicId());
 				pSource = newSource;
 				pReader = transformer.getTransformedXMLReader();
+			}
+			if (logDir != null) {
+				File tmpFile = File.createTempFile("jaxmexs", ".xsd", new File(logDir));
+				fos = new FileOutputStream(tmpFile);
+				LoggingContentHandler lch = new LoggingContentHandler(fos);
+				lch.setParent(pReader);
+				pReader = lch;
+				String msg = "Read from " + pSource.getPublicId() + ", " + pSource.getSystemId() + " at " + new Date();
+				lch.comment(msg.toCharArray(), 0, msg.length());
 			}
 			pReader.setContentHandler(pHandler);
 			pReader.parse(pSource);

Modified: webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/util/LoggingContentHandler.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/util/LoggingContentHandler.java?rev=438456&r1=438455&r2=438456&view=diff
==============================================================================
--- webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/util/LoggingContentHandler.java (original)
+++ webservices/jaxme/branches/b0_5/src/xs/org/apache/ws/jaxme/xs/util/LoggingContentHandler.java Wed Aug 30 03:57:04 2006
@@ -16,7 +16,6 @@
 import org.xml.sax.helpers.XMLFilterImpl;
 
 
-
 /**
  * A content handler, which may be used to log a stream of SAX events.
  */



---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org