geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r157629 - in geronimo/trunk/modules: axis-builder/src/java/org/apache/geronimo/axis/builder/ axis/src/java/org/apache/geronimo/axis/server/ jetty/src/java/org/apache/geronimo/jetty/ webservices/src/java/org/apache/geronimo/webservices/
Date Wed, 16 Mar 2005 02:20:55 GMT
Author: dblevins
Date: Tue Mar 15 18:20:53 2005
New Revision: 157629

URL: http://svn.apache.org/viewcvs?view=rev&rev=157629
Log:
Fixed soapAction URI issues, JavaServiceDesc deserialization issues, and classloading issues
on MessageContext demarshalling.

Added:
    geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/server/ReadOnlyServiceDesc.java
Removed:
    geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/ReadOnlyServiceDesc.java
Modified:
    geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisBuilder.java
    geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java
    geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/server/AxisWebServiceContainer.java
    geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyEJBWebServiceContext.java
    geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/POJOWebServiceServlet.java
    geronimo/trunk/modules/webservices/src/java/org/apache/geronimo/webservices/WebServiceContainer.java

Modified: geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisBuilder.java?view=diff&r1=157628&r2=157629
==============================================================================
--- geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisBuilder.java
(original)
+++ geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisBuilder.java
Tue Mar 15 18:20:53 2005
@@ -105,7 +105,7 @@
             throw new DeploymentException("Invalid webservice endpoint URI", e);
         }
 
-        AxisWebServiceContainer axisWebServiceContainer = new AxisWebServiceContainer(location,
wsdlURL, service);
+        AxisWebServiceContainer axisWebServiceContainer = new AxisWebServiceContainer(location,
wsdlURL, service, classLoader);
         targetGBean.setAttribute("webServiceContainer", axisWebServiceContainer);
     }
 

Modified: geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java?view=diff&r1=157628&r2=157629
==============================================================================
--- geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java
(original)
+++ geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java
Tue Mar 15 18:20:53 2005
@@ -43,6 +43,7 @@
 import org.apache.geronimo.kernel.ClassLoading;
 import org.apache.geronimo.xbeans.j2ee.JavaXmlTypeMappingType;
 import org.apache.geronimo.xbeans.j2ee.ServiceEndpointMethodMappingType;
+import org.apache.geronimo.axis.server.ReadOnlyServiceDesc;
 import org.apache.xmlbeans.SchemaType;
 
 /**
@@ -87,8 +88,9 @@
     }
 
     public static JavaServiceDesc createServiceDesc(PortInfo portInfo, ClassLoader classLoader)
throws DeploymentException {
+
         Port port = portInfo.getPort();
-        System.out.println("port = " + port);
+//        System.out.println("port = " + port);
 
         Class serviceEndpointInterface = null;
         try {
@@ -145,6 +147,8 @@
         } else {
             buildHeavyweightTypes(javaXmlTypeMappings, classLoader, schemaTypeKeyToSchemaTypeMap,
typeMapping);
         }
+
+        serviceDesc.getOperations();
         return new ReadOnlyServiceDesc(serviceDesc);
     }
 

Modified: geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/server/AxisWebServiceContainer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/server/AxisWebServiceContainer.java?view=diff&r1=157628&r2=157629
==============================================================================
--- geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/server/AxisWebServiceContainer.java
(original)
+++ geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/server/AxisWebServiceContainer.java
Tue Mar 15 18:20:53 2005
@@ -48,17 +48,20 @@
     public static final String XSD_NS = "http://www.w3.org/2001/XMLSchema";
     protected final URI location;
     protected final URL wsdlURL;
-    protected final SOAPService service;
+    protected final SOAPService service;  //TODO why did i make these protected?
+    private final ClassLoader classLoader;
 
-    public AxisWebServiceContainer(URI location, URL wsdlURL, SOAPService service) {
+    public AxisWebServiceContainer(URI location, URL wsdlURL, SOAPService service, ClassLoader
classLoader) {
         this.location = location;
         this.wsdlURL = wsdlURL;
         this.service = service;
+        this.classLoader = classLoader;
     }
 
     public void invoke(Request req, Response res) throws Exception {
         org.apache.axis.MessageContext context = new org.apache.axis.MessageContext(null);
-
+        context.setClassLoader(classLoader);
+        
         Message responseMessage = null;
 
         String contentType = req.getHeader(HTTPConstants.HEADER_CONTENT_TYPE);
@@ -175,7 +178,7 @@
             in = wsdlURL.openStream();
             byte[] buffer = new byte[1024];
             for (int read = in.read(buffer); read > 0; read = in.read(buffer)) {
-                System.out.write(buffer, 0, read);
+//                System.out.write(buffer, 0, read);
                 out.write(buffer, 0, read);
             }
         } finally {

Added: geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/server/ReadOnlyServiceDesc.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/server/ReadOnlyServiceDesc.java?view=auto&rev=157629
==============================================================================
--- geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/server/ReadOnlyServiceDesc.java
(added)
+++ geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/server/ReadOnlyServiceDesc.java
Tue Mar 15 18:20:53 2005
@@ -0,0 +1,190 @@
+/**
+ *
+ * Copyright 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.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.axis.server;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.description.JavaServiceDesc;
+import org.apache.axis.description.OperationDesc;
+import org.apache.axis.encoding.TypeMapping;
+import org.apache.axis.encoding.TypeMappingRegistry;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ReadOnlyServiceDesc extends JavaServiceDesc {
+    private final JavaServiceDesc serviceDesc;
+
+    public ReadOnlyServiceDesc(JavaServiceDesc serviceDesc) {
+        this.serviceDesc = serviceDesc;
+    }
+
+    public Class getImplClass() {
+        return serviceDesc.getImplClass();
+    }
+
+    public void setImplClass(Class implClass) {
+        serviceDesc.setImplClass(implClass);
+    }
+
+    public ArrayList getStopClasses() {
+        return serviceDesc.getStopClasses();
+    }
+
+    public void setStopClasses(ArrayList stopClasses) {        }
+
+    public void loadServiceDescByIntrospection()
+    {
+        serviceDesc.loadServiceDescByIntrospection();
+    }
+
+    public void loadServiceDescByIntrospection(Class implClass) {
+        serviceDesc.loadServiceDescByIntrospection(implClass);
+    }
+
+    public void loadServiceDescByIntrospection(Class cls, TypeMapping tm)
+    {
+        serviceDesc.loadServiceDescByIntrospection(cls, tm);
+    }
+
+    public Style getStyle() {
+        return serviceDesc.getStyle();
+    }
+
+    public void setStyle(Style style) {
+    }
+
+    public Use getUse() {
+        return serviceDesc.getUse();
+    }
+
+    public void setUse(Use use) {
+    }
+
+    public String getWSDLFile() {
+        return serviceDesc.getWSDLFile();
+    }
+
+    public void setWSDLFile(String wsdlFileName) {
+    }
+
+    public List getAllowedMethods() {
+        return serviceDesc.getAllowedMethods();
+    }
+
+    public void setAllowedMethods(List allowedMethods) {
+    }
+
+    public TypeMapping getTypeMapping() {
+        return serviceDesc.getTypeMapping();
+    }
+
+    public void setTypeMapping(TypeMapping tm) {
+    }
+
+    public String getName() {
+        return serviceDesc.getName();
+    }
+
+    public void setName(String name) {
+    }
+
+    public String getDocumentation() {
+        return serviceDesc.getDocumentation();
+    }
+
+    public void setDocumentation(String documentation) {
+    }
+
+    public void removeOperationDesc(OperationDesc operation) {
+    }
+
+    public void addOperationDesc(OperationDesc operation) {
+    }
+
+    public ArrayList getOperations() {
+        return serviceDesc.getOperations();
+    }
+
+    public OperationDesc [] getOperationsByName(String methodName) {
+        return serviceDesc.getOperationsByName(methodName);
+    }
+
+    public OperationDesc getOperationByName(String methodName) {
+        return serviceDesc.getOperationByName(methodName);
+    }
+
+    public OperationDesc getOperationByElementQName(QName qname) {
+        return serviceDesc.getOperationByElementQName(qname);
+    }
+
+    public OperationDesc [] getOperationsByQName(QName qname) {
+        return serviceDesc.getOperationsByQName(qname);
+    }
+
+    public void setNamespaceMappings(List namespaces) {
+    }
+
+    public String getDefaultNamespace() {
+        return serviceDesc.getDefaultNamespace();
+    }
+
+    public void setDefaultNamespace(String namespace) {
+    }
+
+    public void setProperty(String name, Object value) {
+        serviceDesc.setProperty(name, value);
+    }
+
+    public Object getProperty(String name) {
+        return serviceDesc.getProperty(name);
+    }
+
+    public String getEndpointURL() {
+        return serviceDesc.getEndpointURL();
+    }
+
+    public void setEndpointURL(String endpointURL) {
+    }
+
+    public TypeMappingRegistry getTypeMappingRegistry() {
+        return serviceDesc.getTypeMappingRegistry();
+    }
+
+    public void setTypeMappingRegistry(TypeMappingRegistry tmr) {
+    }
+
+    public boolean isInitialized() {
+        return serviceDesc.isInitialized();
+    }
+
+    public boolean isWrapped() {
+        return serviceDesc.isWrapped();
+    }
+
+    public List getDisallowedMethods() {
+        return serviceDesc.getDisallowedMethods();
+    }
+
+    public void setDisallowedMethods(List disallowedMethods) {
+    }
+}

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyEJBWebServiceContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyEJBWebServiceContext.java?view=diff&r1=157628&r2=157629
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyEJBWebServiceContext.java
(original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyEJBWebServiceContext.java
Tue Mar 15 18:20:53 2005
@@ -21,6 +21,7 @@
 import java.io.InputStream;
 import java.net.URL;
 import java.net.MalformedURLException;
+import java.net.URISyntaxException;
 import java.util.Map;
 import java.util.HashMap;
 
@@ -130,12 +131,12 @@
             return request.getField(name);
         }
 
-        public URL getURI() {
-            // TODO getURI should return a URI
+        public java.net.URI getURI() {
             try {
-                URI uri = request.getURI();
-                return new URL(uri.toString());
-            } catch (MalformedURLException e) {
+                String uriString = request.getURI().toString();
+                //return new java.net.URI(uri.getScheme(),uri.getHost(),uri.getPath(),uri.);
+                return new java.net.URI(uriString);
+            } catch (URISyntaxException e) {
                 throw new IllegalStateException(e.getMessage());
             }
         }

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/POJOWebServiceServlet.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/POJOWebServiceServlet.java?view=diff&r1=157628&r2=157629
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/POJOWebServiceServlet.java
(original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/POJOWebServiceServlet.java
Tue Mar 15 18:20:53 2005
@@ -21,6 +21,7 @@
 import java.io.OutputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.net.URISyntaxException;
 import java.util.HashMap;
 import java.util.Map;
 import javax.servlet.Servlet;
@@ -99,12 +100,11 @@
             return request.getHeader(name);
         }
 
-        public URL getURI() {
-            // TODO getURI should return a URI
+        public java.net.URI getURI() {
             try {
-                URI uri = new URI(request.getRequestURI());
-                return new URL(uri.toString());
-            } catch (MalformedURLException e) {
+                String uriString = request.getRequestURI();
+                return new java.net.URI(uriString);
+            } catch (URISyntaxException e) {
                 throw new IllegalStateException(e.getMessage());
             }
         }

Modified: geronimo/trunk/modules/webservices/src/java/org/apache/geronimo/webservices/WebServiceContainer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/webservices/src/java/org/apache/geronimo/webservices/WebServiceContainer.java?view=diff&r1=157628&r2=157629
==============================================================================
--- geronimo/trunk/modules/webservices/src/java/org/apache/geronimo/webservices/WebServiceContainer.java
(original)
+++ geronimo/trunk/modules/webservices/src/java/org/apache/geronimo/webservices/WebServiceContainer.java
Tue Mar 15 18:20:53 2005
@@ -76,7 +76,7 @@
 
         String getHeader(String name);
 
-        URL getURI();
+        URI getURI();
 
         String getHost();
 



Mime
View raw message