Author: mmerz
Date: Mon Feb 28 16:07:18 2005
New Revision: 155718
URL: http://svn.apache.org/viewcvs?view=rev&rev=155718
Log:
*** UPDATED XmlBeans to 2.0beta1. ***
[Also fixed a String-var in wsm-sample's build-svn.xml.]
Modified:
incubator/beehive/trunk/external/xmlbeans/apache-xbean.jar
incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-svn.xml
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/AnnotatedWebServiceDeploymentHandler.java
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanSerializer.java
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/jsr181/Jsr181ObjectModelStore.java
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/wsdl/XmlBeanWSDLProcessor.java
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/wsdl/Schema.java
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/wsdl/WSDLParser.java
Modified: incubator/beehive/trunk/external/xmlbeans/apache-xbean.jar
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/external/xmlbeans/apache-xbean.jar?view=diff&r1=155717&r2=155718
==============================================================================
Binary files - no diff available.
Modified: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-svn.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-svn.xml?view=diff&r1=155717&r2=155718
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-svn.xml (original)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/build-svn.xml Mon Feb
28 16:07:18 2005
@@ -18,7 +18,7 @@
$Header:$
-->
-<project name="wsm-blank" default="build" basedir=".">
+<project name="wsm-samples" default="build" basedir=".">
<import file="../../../beehive-imports.xml" />
Modified:
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/AnnotatedWebServiceDeploymentHandler.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/AnnotatedWebServiceDeploymentHandler.java?view=diff&r1=155717&r2=155718
==============================================================================
---
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/AnnotatedWebServiceDeploymentHandler.java
(original)
+++
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/AnnotatedWebServiceDeploymentHandler.java
Mon Feb 28 16:07:18 2005
@@ -188,11 +188,24 @@
// turn relative path into fq class name
final String JWS_EXTENSION = ".jws";
+/*
if ((! relativePath.startsWith("/")) || (!
relativePath.endsWith(JWS_EXTENSION))) {
throw new Exception ("invalid relative path: " + relativePath);
}
String className = relativePath.substring(1, relativePath.length() -
JWS_EXTENSION.length()).replaceAll("/", ".");
+*/
+ if (! relativePath.startsWith("/")) {
+ throw new Exception ("invalid relative path: " + relativePath);
+ }
+ String className = null;
+ if (relativePath.endsWith(JWS_EXTENSION)) {
+ className = relativePath.substring(1, relativePath.length() -
JWS_EXTENSION.length()).replaceAll("/", ".");
+ }
+ else {
+ className = relativePath.substring(1,
relativePath.length()).replaceAll("/", ".");
+ }
+
// load class
if (log.isDebugEnabled()) {
log.debug("trying to load web service class: " + className);
Modified:
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanSerializer.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanSerializer.java?view=diff&r1=155717&r2=155718
==============================================================================
---
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanSerializer.java
(original)
+++
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/util/encoding/XmlBeanSerializer.java
Mon Feb 28 16:07:18 2005
@@ -39,7 +39,8 @@
import org.apache.xmlbeans.XmlBeans;
import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlObject;
-import org.w3.x2001.xmlSchema.LocalElement;
+import org.apache.xmlbeans.impl.xb.xsdschema.LocalElement;
+
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
Modified:
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/jsr181/Jsr181ObjectModelStore.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/jsr181/Jsr181ObjectModelStore.java?view=diff&r1=155717&r2=155718
==============================================================================
---
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/jsr181/Jsr181ObjectModelStore.java
(original)
+++
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/jsr181/Jsr181ObjectModelStore.java
Mon Feb 28 16:07:18 2005
@@ -129,22 +129,33 @@
// try className as simple class name
catch (ClassNotFoundException e) {
final File wsDirectory = new File(new
File(cl.getResource(LOCATOR).getFile()).getParent());
- final String _className = className;
- FilenameFilter filenameFilter = new FilenameFilter() {
- public boolean accept(File dir, String name) {
- return (wsDirectory.equals(dir) &&
(name.endsWith(_className + EXTENSION)));
- }
- };
- for (File file : wsDirectory.listFiles(filenameFilter)) {
- String filename = file.getName();
- if (! filename.endsWith(EXTENSION)) {
- continue;
- }
- className = filename.substring(0, filename.length() -
EXTENSION.length());
- clazz = cl.loadClass(className);
+ String fqClassName = getFullyQualifiedClassName(wsDirectory,
className);
+ // todo: we do this for the TCK only...
+ if (null == fqClassName) {
+ fqClassName = getFullyQualifiedClassName(wsDirectory,
className.substring(0, className.length() - "Service".length()));
}
+ clazz = cl.loadClass(fqClassName);
}
return clazz;
+ }
+
+ private static String getFullyQualifiedClassName(final File wsDirectory,
final String simpleName) throws ClassNotFoundException {
+System.out.println("@@@trying to find class... name: " + simpleName);
+ FilenameFilter filenameFilter = new FilenameFilter() {
+ public boolean accept(File dir, String name) {
+ return (wsDirectory.equals(dir) && (name.endsWith(simpleName +
EXTENSION)));
+ }
+ };
+ String fqClassName = null;
+ for (File file : wsDirectory.listFiles(filenameFilter)) {
+ String filename = file.getName();
+ if (filename.endsWith(EXTENSION)) {
+ fqClassName = filename.substring(0, filename.length() -
EXTENSION.length());
+ break;
+ }
+ }
+System.out.println("@@@found: " + fqClassName);
+ return fqClassName;
}
}
Modified:
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/wsdl/XmlBeanWSDLProcessor.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/wsdl/XmlBeanWSDLProcessor.java?view=diff&r1=155717&r2=155718
==============================================================================
---
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/wsdl/XmlBeanWSDLProcessor.java
(original)
+++
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/wsdl/XmlBeanWSDLProcessor.java
Mon Feb 28 16:07:18 2005
@@ -68,11 +68,12 @@
import org.xmlsoap.schemas.wsdl.TTypes;
import org.xmlsoap.schemas.wsdl.soap.TStyleChoice;
import org.xmlsoap.schemas.wsdl.soap.UseChoice;
-import org.w3.x2001.xmlSchema.Element;
-import org.w3.x2001.xmlSchema.Group;
-import org.w3.x2001.xmlSchema.ComplexType;
-import org.w3.x2001.xmlSchema.SchemaDocument;
-import org.w3.x2001.xmlSchema.SchemaDocument.Schema;
+
+import org.apache.xmlbeans.impl.xb.xsdschema.Element;
+import org.apache.xmlbeans.impl.xb.xsdschema.Group;
+import org.apache.xmlbeans.impl.xb.xsdschema.ComplexType;
+import org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument;
+import org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument.Schema;
/*******************************************************************************
* An Implementation of WSDLProcessor that uses XmlBeans to convert the WSDL
Modified:
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/wsdl/Schema.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/wsdl/Schema.java?view=diff&r1=155717&r2=155718
==============================================================================
---
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/wsdl/Schema.java
(original)
+++
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/wsdl/Schema.java
Mon Feb 28 16:07:18 2005
@@ -24,13 +24,16 @@
import javax.xml.namespace.QName;
+import org.xmlsoap.schemas.wsdl.TTypes;
+
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlObject;
-import org.w3.x2001.xmlSchema.SchemaDocument;
-import org.w3.x2001.xmlSchema.TopLevelComplexType;
-import org.w3.x2001.xmlSchema.TopLevelElement;
-import org.w3.x2001.xmlSchema.TopLevelSimpleType;
-import org.xmlsoap.schemas.wsdl.TTypes;
+
+import org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument;
+import org.apache.xmlbeans.impl.xb.xsdschema.TopLevelComplexType;
+import org.apache.xmlbeans.impl.xb.xsdschema.TopLevelElement;
+import org.apache.xmlbeans.impl.xb.xsdschema.TopLevelSimpleType;
+
public class Schema {
Modified:
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/wsdl/WSDLParser.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/wsdl/WSDLParser.java?view=diff&r1=155717&r2=155718
==============================================================================
---
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/wsdl/WSDLParser.java
(original)
+++
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/wsdl/WSDLParser.java
Mon Feb 28 16:07:18 2005
@@ -1,3 +1,5 @@
+package org.apache.beehive.wsm.wsdl;
+
/*
*
* Copyright 2001-2004 The Apache Software Foundation.
@@ -17,9 +19,6 @@
*
*
*/
-package org.apache.beehive.wsm.wsdl;
-
-
import java.io.IOException;
import java.io.InputStream;
@@ -27,18 +26,20 @@
import javax.xml.namespace.QName;
-import org.apache.xmlbeans.SchemaType;
-import org.apache.xmlbeans.XmlException;
-import org.apache.xmlbeans.XmlObject;
-import org.w3.x2001.xmlSchema.SchemaDocument;
-import org.w3.x2001.xmlSchema.TopLevelComplexType;
-import org.w3.x2001.xmlSchema.TopLevelElement;
-import org.w3.x2001.xmlSchema.TopLevelSimpleType;
import org.xmlsoap.schemas.wsdl.DefinitionsDocument;
import org.xmlsoap.schemas.wsdl.TPort;
import org.xmlsoap.schemas.wsdl.TService;
import org.xmlsoap.schemas.wsdl.TTypes;
import org.xmlsoap.schemas.wsdl.soap.TAddress;
+
+import org.apache.xmlbeans.SchemaType;
+import org.apache.xmlbeans.XmlException;
+import org.apache.xmlbeans.XmlObject;
+
+import org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument;
+import org.apache.xmlbeans.impl.xb.xsdschema.TopLevelComplexType;
+import org.apache.xmlbeans.impl.xb.xsdschema.TopLevelElement;
+import org.apache.xmlbeans.impl.xb.xsdschema.TopLevelSimpleType;
public class WSDLParser {