You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-dev@ws.apache.org by as...@apache.org on 2005/08/10 13:33:07 UTC
cvs commit: ws-wsif/java/lib axis-1_2-ant.jar axis-1_2.jar wsdl4j-20030807.jar
aslom 2005/08/10 04:33:07
Modified: java/doc changes.html
java/src/org/apache/wsif/schema Parser.java
java/test wsif.test.properties
Removed: java/lib axis-1_2-ant.jar axis-1_2.jar wsdl4j-20030807.jar
Log:
added check to Parser.getTypesSchemas to skip non UnknownExtensibilityElement
Revision Changes Path
1.20 +8 -1 ws-wsif/java/doc/changes.html
Index: changes.html
===================================================================
RCS file: /home/cvs/ws-wsif/java/doc/changes.html,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- changes.html 12 Oct 2004 21:34:34 -0000 1.19
+++ changes.html 10 Aug 2005 11:33:05 -0000 1.20
@@ -27,6 +27,13 @@
<li>modularization
</ul>
+<a name="WSIF_2_0_1"><h3>CVS Head </h3></a>
+
+<ul>
+<li>2005-08-09: moved to AXIS 1.2.1 and WSDL 1.5.1
+</li>
+</ul>
+
<a name="WSIF_2_0_1"><h3>interim builds(WSIF_2_0_1) </h3></a>
<ul>
1.10 +71 -67 ws-wsif/java/src/org/apache/wsif/schema/Parser.java
Index: Parser.java
===================================================================
RCS file: /home/cvs/ws-wsif/java/src/org/apache/wsif/schema/Parser.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Parser.java 1 Mar 2004 23:53:18 -0000 1.9
+++ Parser.java 10 Aug 2005 11:33:05 -0000 1.10
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -55,7 +55,7 @@
* A class used for parsing the schema(s) defined in a Definition object. It does not provide
* full schema parsing. Its main purpose is to help in determining a list off all the types that
* are defined in schemas either inline in the wsdl document or imported xsd files.
- *
+ *
* @author Owen Burroughs <ow...@apache.org>
*/
public class Parser {
@@ -72,7 +72,7 @@
* their corresponding Java class names.
* @param def The Definition object representing the wsdl
* @param table The Map to proulate with xml type -> Java class name (QName -> String) mappings
- * @deprecated Use getAllSchemaTypes in combination with a {@link org.apache.wsif.mapping.WSIFMapper} rather
+ * @deprecated Use getAllSchemaTypes in combination with a {@link org.apache.wsif.mapping.WSIFMapper} rather
* than this method
*/
public static void getTypeMappings(Definition def, Map table) throws WSIFException {
@@ -85,11 +85,11 @@
* @param def The Definition object representing the wsdl
* @param table The Map to proulate with xml type -> Java class name (QName -> String) mappings
* @param loader A ClassLoader to use in resolving xsd locations
- * @deprecated Use getAllSchemaTypes in combination with a {@link org.apache.wsif.mapping.WSIFMapper} rather
+ * @deprecated Use getAllSchemaTypes in combination with a {@link org.apache.wsif.mapping.WSIFMapper} rather
* than this method
*/
public static void getTypeMappings(Definition def, Map table, ClassLoader loader) throws WSIFException {
- WSDLLocator locator = new WSIFWSDLLocatorImpl((String) null, (String) null, loader);
+ WSDLLocator locator = new WSIFWSDLLocatorImpl((String) null, (String) null, loader);
getTypeMappings(def, table, true, locator);
}
@@ -101,15 +101,15 @@
* @param loader A ClassLoader to use in resolving xsd locations
* @param includeStandardMappings Flag to indicate whether or not standard xsd, soapenc and Apache SOAP mappings
* should be included in the table
- * @deprecated Use getAllSchemaTypes in combination with a {@link org.apache.wsif.mapping.WSIFMapper} rather
+ * @deprecated Use getAllSchemaTypes in combination with a {@link org.apache.wsif.mapping.WSIFMapper} rather
* than this method
*/
public static void getTypeMappings(
- Definition def,
- Map table,
- ClassLoader loader,
- boolean includeStandardMappings) throws WSIFException {
- WSDLLocator locator = new WSIFWSDLLocatorImpl((String) null, (String) null, loader);
+ Definition def,
+ Map table,
+ ClassLoader loader,
+ boolean includeStandardMappings) throws WSIFException {
+ WSDLLocator locator = new WSIFWSDLLocatorImpl((String) null, (String) null, loader);
getTypeMappings(def, table, includeStandardMappings, locator);
}
@@ -119,7 +119,7 @@
* @param def The Definition object representing the wsdl
* @param table The Map to proulate with xml type -> Java class name (QName -> String) mappings
* @param loc WSDLLocator equal or equivalent to that used to locate the original wsdl document
- * @deprecated Use getAllSchemaTypes in combination with a {@link org.apache.wsif.mapping.WSIFMapper} rather
+ * @deprecated Use getAllSchemaTypes in combination with a {@link org.apache.wsif.mapping.WSIFMapper} rather
* than this method
*/
public static void getTypeMappings(Definition def, Map table, WSDLLocator loc) throws WSIFException {
@@ -133,7 +133,7 @@
* @param table The Map to proulate with xml type -> Java class name (QName -> String) mappings
* @param includeStandardMappings Flag to indicate whether or not standard xsd, soapenc and Apache SOAP mappings
* should be included in the table
- * @deprecated Use getAllSchemaTypes in combination with a {@link org.apache.wsif.mapping.WSIFMapper} rather
+ * @deprecated Use getAllSchemaTypes in combination with a {@link org.apache.wsif.mapping.WSIFMapper} rather
* than this method
*/
public static void getTypeMappings(
@@ -152,23 +152,23 @@
* @param includeStandardMappings Flag to indicate whether or not standard xsd, soapenc and Apache SOAP mappings
* should be included in the table
* @param loc WSDLLocator equal or equivalent to that used to locate the original wsdl document
- * @deprecated Use getAllSchemaTypes in combination with a {@link org.apache.wsif.mapping.WSIFMapper} rather
+ * @deprecated Use getAllSchemaTypes in combination with a {@link org.apache.wsif.mapping.WSIFMapper} rather
* than this method
*/
public static void getTypeMappings(
Definition def,
Map table,
- boolean includeStandardMappings,
+ boolean includeStandardMappings,
WSDLLocator loc) throws WSIFException {
- Trc.entry(null, def, table, new Boolean(includeStandardMappings), loc);
- if (loc == null) {
- loc = new WSIFWSDLLocatorImpl((String) null, (String) null, null);
- }
-
+ Trc.entry(null, def, table, new Boolean(includeStandardMappings), loc);
+ if (loc == null) {
+ loc = new WSIFWSDLLocatorImpl((String) null, (String) null, null);
+ }
+
ArrayList schemaList = new ArrayList();
getTypesSchemas(def, schemaList, loc);
-
+
Hashtable standards = null;
if (includeStandardMappings) {
@@ -186,7 +186,7 @@
WSIFConstants.NS_URI_2001_SCHEMA_XSD,
false);
} else {
- // set up all standard mappings in a seperate map for use when resolving arrays
+ // set up all standard mappings in a seperate map for use when resolving arrays
standards = new Hashtable();
populateWithStandardMappings(
standards,
@@ -230,17 +230,17 @@
if (st.isArray()) {
arrays.add(st);
} else {
- // Deal with elements
+ // Deal with elements
if (st instanceof ElementType) {
QName baseType = ((ElementType) st).getElementType();
if (baseType != null) {
- if (((ElementType) st).isNillable()) {
- String wrapperClass = getWrapperClassName(baseType);
- if (wrapperClass != null) {
- table.put(typeName, wrapperClass);
- continue;
- }
+ if (((ElementType) st).isNillable()) {
+ String wrapperClass = getWrapperClassName(baseType);
+ if (wrapperClass != null) {
+ table.put(typeName, wrapperClass);
+ continue;
+ }
}
String baseClassName =
(String) table.get(baseType);
@@ -264,7 +264,7 @@
}
}
} else {
- // Deal with complexTypes and simpleTypes
+ // Deal with complexTypes and simpleTypes
String className = resolveClassName(typeName);
if (className != null) {
table.put(typeName, className);
@@ -325,7 +325,7 @@
} else if (baseClass.equals("short")) {
table.put(theType, extraDims + "[S");
} else if (baseClass.startsWith("[")) {
- // The base for this array is another array!!
+ // The base for this array is another array!!
String arrayOfBase = "[" + baseClass;
table.put(theType, arrayOfBase);
} else {
@@ -504,23 +504,27 @@
Iterator extEleIt = types.getExtensibilityElements().iterator();
while (extEleIt.hasNext()) {
+ Object nextEl = extEleIt.next();
+ if(!(nextEl instanceof UnknownExtensibilityElement)) {
+ continue;
+ }
UnknownExtensibilityElement typesElement =
- (UnknownExtensibilityElement) extEleIt.next();
+ (UnknownExtensibilityElement) nextEl;
Element schemaEl = typesElement.getElement();
if (QNameUtils.matches(schema2001, schemaEl)
|| QNameUtils.matches(schema2000, schemaEl)
|| QNameUtils.matches(schema1999, schemaEl)) {
- Schema sc = new Schema(schemaEl);
+ Schema sc = new Schema(schemaEl);
schemas.add(sc);
String docBase = def.getDocumentBaseURI();
if (docBase != null && loc != null) {
- String[] importsAndIncludes = sc.getImportsAndIncludes();
+ String[] importsAndIncludes = sc.getImportsAndIncludes();
for (int i=0; i<importsAndIncludes.length; i++) {
- String sl = importsAndIncludes[i];
- getImportedSchemas(docBase, sl, loc, schemas);
- }
- }
+ String sl = importsAndIncludes[i];
+ getImportedSchemas(docBase, sl, loc, schemas);
+ }
+ }
}
}
}
@@ -545,11 +549,11 @@
if (importedDef != null) {
getTypesSchemas(importedDef, schemas, loc);
} else {
- String baseLoc = def.getDocumentBaseURI();
- String importLoc = tempImport.getLocationURI();
- if (baseLoc != null && importLoc != null && loc != null) {
- getImportedSchemas(baseLoc, importLoc, loc, schemas);
- }
+ String baseLoc = def.getDocumentBaseURI();
+ String importLoc = tempImport.getLocationURI();
+ if (baseLoc != null && importLoc != null && loc != null) {
+ getImportedSchemas(baseLoc, importLoc, loc, schemas);
+ }
}
}
}
@@ -565,7 +569,7 @@
try {
InputSource inputSource = loc.getImportInputSource(base, rel);
if (inputSource == null) {
- throw new WSIFException("Unable to read schema file "+rel+" relative to "+base);
+ throw new WSIFException("Unable to read schema file "+rel+" relative to "+base);
}
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
@@ -576,33 +580,33 @@
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(inputSource);
if (inputSource.getCharacterStream() != null) {
- inputSource.getCharacterStream().close();
+ inputSource.getCharacterStream().close();
} else if (inputSource.getByteStream() != null) {
- inputSource.getByteStream().close();
- }
+ inputSource.getByteStream().close();
+ }
Element el = doc.getDocumentElement();
if (el != null) {
if (QNameUtils.matches(schema2001, el)
|| QNameUtils.matches(schema2000, el)
|| QNameUtils.matches(schema1999, el)) {
- Schema sc = new Schema(el);
+ Schema sc = new Schema(el);
schemaList.add(sc);
String[] importsAndIncludes = sc.getImportsAndIncludes();
String lastURI = loc.getLatestImportURI();
for (int i=0; i<importsAndIncludes.length; i++) {
- String sl = importsAndIncludes[i];
- getImportedSchemas(lastURI, sl, loc, schemaList);
+ String sl = importsAndIncludes[i];
+ getImportedSchemas(lastURI, sl, loc, schemaList);
}
}
}
} catch (Exception e) {
- Trc.exception(e);
- if (e instanceof WSIFException) {
- throw (WSIFException) e;
- } else {
- throw new WSIFException("Error when getting imported schemas", e);
- }
+ Trc.exception(e);
+ if (e instanceof WSIFException) {
+ throw (WSIFException) e;
+ } else {
+ throw new WSIFException("Error when getting imported schemas", e);
+ }
}
}
@@ -638,21 +642,21 @@
String lp = qn.getLocalPart();
if (lp == null) return null;
if (lp.equals("int")) {
- return "java.lang.Integer";
+ return "java.lang.Integer";
} else if (lp.equals("long")) {
- return "java.lang.Long";
+ return "java.lang.Long";
} else if (lp.equals("float")) {
- return "java.lang.Float";
+ return "java.lang.Float";
} else if (lp.equals("short")) {
- return "java.lang.Short";
+ return "java.lang.Short";
} else if (lp.equals("double")) {
- return "java.lang.Double";
+ return "java.lang.Double";
} else if (lp.equals("boolean")) {
- return "java.lang.Boolean";
+ return "java.lang.Boolean";
} else if (lp.equals("byte")) {
- return "java.lang.Byte";
- }
+ return "java.lang.Byte";
+ }
}
return null;
- }
+ }
}
1.13 +7 -6 ws-wsif/java/test/wsif.test.properties
Index: wsif.test.properties
===================================================================
RCS file: /home/cvs/ws-wsif/java/test/wsif.test.properties,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- wsif.test.properties 25 Feb 2003 15:48:25 -0000 1.12
+++ wsif.test.properties 10 Aug 2005 11:33:06 -0000 1.13
@@ -1,8 +1,8 @@
-#
+#
# wsif.test.properties is internal use only. It is used to control WSIF's junit
# tests.
#
-# wsif.path=<root directory of WSIF packages>
+# wsif.path=<root directory of WSIF packages>
wsif.path=/wsif
#
# wsif.async.replytoq value should match the wsiftestjmssetup and wsitestfmqsetup bat files
@@ -14,13 +14,13 @@
wsif.nativejms.requestq=NativeJmsRequestQueue
wsif.nativejms.responseq=NativeJmsResponseQueue
#
-# wsif.test.components switches off some areas of unit test so that you can run
+# wsif.test.components switches off some areas of unit test so that you can run
# whole suite without jms, ejb, remotewsdl (in WsdlLoadingTest) or jndi. By default,
# all areas are on unless you explicitly turn them off.
# wsif.test.components=[ejb=on|off,][jms=on|off,][remotewsdl=on|off,][jndi=on|off,][async=on|off][mime=on|off]
wsif.test.components=ejb=on,jms=on,remotewsdl=on,jndi=on,async=on,mime=on
#
-# wsif.jms.output=terse|verbose Controls how much output you get from the
+# wsif.jms.output=terse|verbose Controls how much output you get from the
# JMS2HTTPBridge when running the testcases. Default is terse.
wsif.jms.output=terse
#
@@ -28,7 +28,7 @@
# The default is 2000ms.
wsif.displaytime=2000
#
-# The wsif.jms2httpbridge properties are used to start the JMS2HTTPBridge
+# The wsif.jms2httpbridge properties are used to start the JMS2HTTPBridge
# when it is started automatically by the testcases. The
# jndidestinationnamepattern is used to construct the jndiDestinationName
# by replacing the % with Stockquote or AddressBook, etc.
@@ -46,6 +46,7 @@
wsif.jms2httpbridge.jndiconnectionfactoryname=WSIFSampleQCF
wsif.jms2httpbridge.httpurl=http://localhost:8080/soap/servlet/rpcrouter
#
-# wsif.soapserver is either soap or axis depending on whether Apache Soap or
+# wsif.soapserver is either soap or axis depending on whether Apache Soap or
# Apache Axis is being used as a server to run the unit tests against.
wsif.soapserver=soap
+