geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r548921 - in /geronimo/server/trunk/modules/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder: PortInfo.java WSDescriptorParser.java
Date Wed, 20 Jun 2007 03:58:41 GMT
Author: gawor
Date: Tue Jun 19 20:58:40 2007
New Revision: 548921

URL: http://svn.apache.org/viewvc?view=rev&rev=548921
Log:
handle service location properly

Modified:
    geronimo/server/trunk/modules/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/PortInfo.java
    geronimo/server/trunk/modules/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/WSDescriptorParser.java

Modified: geronimo/server/trunk/modules/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/PortInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/PortInfo.java?view=diff&rev=548921&r1=548920&r2=548921
==============================================================================
--- geronimo/server/trunk/modules/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/PortInfo.java
(original)
+++ geronimo/server/trunk/modules/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/PortInfo.java
Tue Jun 19 20:58:40 2007
@@ -17,6 +17,7 @@
 package org.apache.geronimo.webservices.builder;
 
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.Map;
 import java.util.jar.JarFile;
 
@@ -37,7 +38,6 @@
     private final QName portQName;
     private final String seInterfaceName;
     private final PortComponentHandlerType[] handlers;
-    private final URI contextURI;
     private final SharedPortInfo sharedPortInfo;
     
     // set after initialize is called
@@ -45,14 +45,16 @@
     private JavaWsdlMappingType javaWsdlMapping;
     private Port port;
     private ServiceEndpointInterfaceMappingType seiMapping;
+    private URI contextURI;
+    private String location;
 
-    public PortInfo(SharedPortInfo sharedPortInfo, String portComponentName, QName portQName,
String seiInterfaceName, PortComponentHandlerType[] handlers, URI contextURI) {
+    public PortInfo(SharedPortInfo sharedPortInfo, String portComponentName, QName portQName,
String seiInterfaceName, PortComponentHandlerType[] handlers, String location) {
         this.sharedPortInfo = sharedPortInfo;
         this.portComponentName = portComponentName;
         this.portQName = portQName;
         this.seInterfaceName = seiInterfaceName;
         this.handlers = handlers;
-        this.contextURI = contextURI;
+        this.location = location;
     }
 
     public String getWsdlLocation() {
@@ -106,7 +108,6 @@
         this.javaWsdlMapping = this.sharedPortInfo.getJavaWsdlMapping();
                                
         QName portQName = getPortQName();
-        URI contextURI = getContextURI();
         String portComponentName = getPortComponentName();
         String seiInterfaceName = getServiceEndpointInterfaceName();
                               
@@ -119,6 +120,12 @@
                 
         this.seiMapping = this.sharedPortInfo.getSEIMappings().get(seiInterfaceName);
         
-        this.schemaInfoBuilder.movePortLocation(portQName.getLocalPart(), contextURI.toString());
+        this.location = this.schemaInfoBuilder.movePortLocation(portQName.getLocalPart(),
this.location);
+        
+        try {
+            this.contextURI = new URI(this.location);
+        } catch (URISyntaxException e) {
+            throw new DeploymentException("Could not construct URI for web service location");
+        }
     }
 }

Modified: geronimo/server/trunk/modules/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/WSDescriptorParser.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/WSDescriptorParser.java?view=diff&rev=548921&r1=548920&r2=548921
==============================================================================
--- geronimo/server/trunk/modules/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/WSDescriptorParser.java
(original)
+++ geronimo/server/trunk/modules/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/WSDescriptorParser.java
Tue Jun 19 20:58:40 2007
@@ -22,7 +22,6 @@
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.net.URI;
-import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Calendar;
@@ -326,14 +325,7 @@
                 }
                 PortComponentHandlerType[] handlers = portComponent.getHandlerArray();
                 
-                URI contextURI;
-                try {
-                    contextURI = new URI(servletLocation);
-                } catch (URISyntaxException e) {
-                    throw new DeploymentException("Could not construct URI for web service
location");
-                }
-
-                PortInfo portInfo = new PortInfo(sharedPortInfo, portComponentName, portQName,
seiInterfaceName, handlers, contextURI);
+                PortInfo portInfo = new PortInfo(sharedPortInfo, portComponentName, portQName,
seiInterfaceName, handlers, servletLocation);
 
                 if (portMap.put(linkName, portInfo) != null) {
                     throw new DeploymentException("Ambiguous description of port associated
with j2ee component " + linkName);
@@ -394,14 +386,7 @@
                     }
                 }
                 
-                URI contextURI;
-                try {
-                    contextURI = new URI(servletLocation);
-                } catch (URISyntaxException e) {
-                    throw new DeploymentException("Could not construct URI for web service
location");
-                }
-
-                PortInfo portInfo = new PortInfo(sharedPortInfo, portComponentName, portQName,
seiInterfaceName, handlers, contextURI);
+                PortInfo portInfo = new PortInfo(sharedPortInfo, portComponentName, portQName,
seiInterfaceName, handlers, servletLocation);
 
                 if (portMap.put(linkName, portInfo) != null) {
                     throw new DeploymentException("Ambiguous description of port associated
with j2ee component " + linkName);



Mime
View raw message