User: jung
Date: 00/08/11 07:43:49
Modified: src/org/jboss/ejb/plugins/zoap ContractBinding.java
zoap.dfPackage
Added: src/org/jboss/ejb/plugins/zoap ComponentURNResolver.java
Log:
added comments how to run the testsuite with jboss.
an scl file was wrongly named and had to be moved.
added a special urn resolver that uses the bean-context
classloader to find the meta-data.
Revision Changes Path
1.2 +81 -63 zoap/src/org/jboss/ejb/plugins/zoap/ContractBinding.java
Index: ContractBinding.java
===================================================================
RCS file:
/products/cvs/ejboss/zoap/src/org/jboss/ejb/plugins/zoap/ContractBinding.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ContractBinding.java 2000/08/10 21:06:50 1.1
+++ ContractBinding.java 2000/08/11 14:43:49 1.2
@@ -1,63 +1,81 @@
-/*
- * $Id: ContractBinding.java,v 1.1 2000/08/10 21:06:50 jung Exp $
- * Copyright (c) 2000 infor:business solutions AG, Hauerstrasse 12,
- * D-66299 Friedrichsthal, Germany. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.jboss.ejb.plugins.zoap;
-
-import org.zoap.soap.Environment;
-
-import java.net.URL;
-
-import org.zoap.xml.XmlObjectReader;
-
-import de.infor.ce.util.URN;
-import org.zoap.soap.meta.builtin.DefaultMetaBinding;
-
-/** This binding constructs its meta-data from a fixed resource file under
"meta-inf/contract.scl". */
-
-public class ContractBinding extends DefaultMetaBinding {
-
- /** while constructing, try read the "meta-inf/contract.scl" file */
-
- public ContractBinding() {
-
- if (Environment.DEBUG_SOAP)
- Environment.out.print(toString() + "()\n");
-
- try {
- java.net.URL url = Thread.currentThread().
- getContextClassLoader().getResource("META-INF/contract.scl");
-
- XmlObjectReader xmlObjectReader =
- new XmlObjectReader(
- new java.io.InputStreamReader(url.openStream()),
- new URN(url.toString()), this);
-
- xmlObjectReader.readObject();
-
- } catch (java.io.IOException e) {
-
- if (Environment.DEBUG_SOAP)
- Environment.out.print(toString() + ".(): enountered "
+ e + " maybe contract meta-data is missing.\n");
-
-
- }
- }
-
-} // ImportBinding
+/*
+ * $Id: ContractBinding.java,v 1.2 2000/08/11 14:43:49 jung Exp $
+ * Copyright (c) 2000 infor:business solutions AG, Hauerstrasse 12,
+ * D-66299 Friedrichsthal, Germany. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.jboss.ejb.plugins.zoap;
+
+import org.jboss.zoap.Environment;
+
+import org.zoap.xml.XmlObjectReader;
+import de.infor.ce.util.URN;
+
+import org.zoap.soap.meta.builtin.DefaultMetaBinding;
+
+import java.util.ArrayList;
+
+/** This binding constructs its meta-data from a fixed resource file under
"meta-inf/contract.scl". */
+
+
+
+public class ContractBinding extends DefaultMetaBinding {
+
+
+ /** while constructing, try read the "META-INF/contract.scl" file */
+ public ContractBinding() {
+
+
+
+ if (Environment.DEBUG_ZOAP)
+
+ Environment.out.print(toString() + "()\n");
+
+
+
+ try {
+
+
+ ComponentURNResolver resolver = new ComponentURNResolver();
+
+ XmlObjectReader xmlObjectReader =
+ resolver.resolveURN(new URN("META-INF/contract.scl"), new
ArrayList(0));
+
+ xmlObjectReader.setBinding(this);
+
+ xmlObjectReader.readObject();
+
+
+
+ } catch (java.io.IOException e) {
+
+
+
+ if (Environment.DEBUG_ZOAP)
+
+ Environment.out.print(toString() + ".(): enountered "
+ e + " maybe contract meta-data is missing.\n");
+
+
+
+ }
+
+ }
+
+
+
+} // ImportBinding
+
1.2 +6 -1 zoap/src/org/jboss/ejb/plugins/zoap/zoap.dfPackage
Index: zoap.dfPackage
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/org/jboss/ejb/plugins/zoap/zoap.dfPackage,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- zoap.dfPackage 2000/08/10 21:06:52 1.1
+++ zoap.dfPackage 2000/08/11 14:43:49 1.2
@@ -39,6 +39,11 @@
@__modelType reference
*/
class reference10 {
+}/**
+@__ref
<oiref:java#Class#org.jboss.ejb.plugins.zoap.ComponentURNResolver:oiref><oihard>
+@__modelType reference
+*/
+class reference {
}}/**
@__tags
@shapeType ClassDiagram
@@ -52,4 +57,4 @@
@__positions
*/
class __positions {
-}
\ No newline at end of file
+}
1.1 zoap/src/org/jboss/ejb/plugins/zoap/ComponentURNResolver.java
Index: ComponentURNResolver.java
===================================================================
/*
* $Id: ComponentURNResolver.java,v 1.1 2000/08/11 14:43:49 jung Exp $
* Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
* D-66299 Friedrichsthal, Germany. All Rights Reserved.
*
*/
package org.jboss.ejb.plugins.zoap;
import org.jboss.zoap.Environment;
import de.infor.ce.util.URN;
import java.io.Reader;
import java.io.IOException;
import java.util.Collection;
import org.zoap.xml.URNResolver;
import org.zoap.xml.XmlObjectReader;
/**
* this urnresolver uses the context classpath to find meta-data resources
*/
class ComponentURNResolver implements URNResolver {
public XmlObjectReader resolveURN(URN theUrn, Collection visitedURNs)
throws IOException {
if(Environment.DEBUG_ZOAP)
Environment.out.println(toString()+".resolveURN("+theUrn+","+visitedURNs+")");
return new XmlObjectReader(new java.io.InputStreamReader(Thread.
currentThread().getContextClassLoader().
getResourceAsStream(theUrn.toString())), theUrn, this,
visitedURNs);
}
}
/*
* $Log: ComponentURNResolver.java,v $
* Revision 1.1 2000/08/11 14:43:49 jung
* added comments how to run the testsuite with jboss.
* an scl file was wrongly named and had to be moved.
* added a special urn resolver that uses the bean-context
* classloader to find the meta-data.
*
* Revision 1.1.1.1 2000/08/10 21:07:34 jung
* Initial import.
*
*
* Revision 1.1.2.1 2000/08/04 17:20:19 jung
* close to beta stadium. Meta-Data import now works.
*
* Revision 1.2 2000/07/06 16:55:05 jung
* moved the default binding caches in order to make apartments
* with different versions of the same class possible.
*
* Revision 1.1.1.1 2000/07/06 14:11:25 jung
* Import of a pre beta version of ZOAP source with a new directory structure,
* ant-based make, apache-kind of license, etc.
*
* jars are coming later because of cvs-history reasons.
*
*/