geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r126583 - /geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisBuilder.java /geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Date Thu, 27 Jan 2005 05:04:49 GMT
Author: djencks
Date: Wed Jan 26 21:04:47 2005
New Revision: 126583

URL: http://svn.apache.org/viewcvs?view=rev&rev=126583
Log:
don't assume optional elements are present
Modified:
   geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisBuilder.java
   geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.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&rev=126583&p1=geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisBuilder.java&r1=126582&p2=geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisBuilder.java&r2=126583
==============================================================================
--- 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
Wed Jan 26 21:04:47 2005
@@ -159,7 +159,7 @@
         }
         JavaWsdlMappingType mapping = mappingDocument.getJavaWsdlMapping();
 
-        Object service =  createService(serviceInterface, definition, mapping, serviceQName,
SOAP_VERSION, deploymentContext, module, classLoader);
+        Object service = createService(serviceInterface, definition, mapping, serviceQName,
SOAP_VERSION, deploymentContext, module, classLoader);
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream oos = null;
         try {
@@ -177,7 +177,9 @@
     public javax.xml.rpc.Service createService(Class serviceInterface, Definition definition,
JavaWsdlMappingType mapping, QName serviceQName, SOAPConstants soapVersion, DeploymentContext
context, Module module, ClassLoader classloader) throws DeploymentException {
         Map seiFactoryMap = new HashMap();
         ServiceImpl serviceInstance = createService(serviceInterface, seiFactoryMap, context,
module, classloader);
-        buildSEIFactoryMap(serviceInterface, definition, mapping, serviceQName, soapVersion,
seiFactoryMap, serviceInstance, context, module, classloader);
+        if (serviceQName != null) {
+            buildSEIFactoryMap(serviceInterface, definition, mapping, serviceQName, soapVersion,
seiFactoryMap, serviceInstance, context, module, classloader);
+        }
         return serviceInstance;
     }
 
@@ -218,7 +220,7 @@
         //find the service we are working with
         javax.wsdl.Service service = definition.getService(serviceQName);
         if (service == null) {
-                throw new DeploymentException("No service wsdl for supplied service interface");
+            throw new DeploymentException("No service wsdl for supplied service qname " +
serviceQName);
         }
 
         Map wsdlPortMap = service.getPorts();
@@ -277,7 +279,7 @@
             }
         }
         if (found == null) {
-            throw new DeploymentException("No method found for operation named " + opName
);
+            throw new DeploymentException("No method found for operation named " + opName);
         }
         return found;
     }
@@ -293,7 +295,7 @@
                 String longName = serviceEndpointInterface.getName();
                 String name = longName.substring(longName.lastIndexOf('.') + 1);
                 if (!name.equals(serviceEndpointInterfaceShortName) &&
-                       !Introspector.decapitalize(name).equals(serviceEndpointInterfaceShortName))
{
+                        !Introspector.decapitalize(name).equals(serviceEndpointInterfaceShortName))
{
                     throw new DeploymentException("unexpected name for service endpoint interface,
expected ending: " + serviceEndpointInterfaceShortName + ", found " + serviceEndpointInterface.getName());
                 }
                 return serviceEndpointInterface;
@@ -391,8 +393,8 @@
             if (outputMessage != null && outputMessage.getParts().size() == 1) {
                 //TODO this might be wrong
                 returnQName = outputMessage.getQName();
-                Part part = (Part)outputMessage.getParts().values().iterator().next();
-                returnType = part.getTypeName() == null? part.getElementName(): part.getTypeName();
+                Part part = (Part) outputMessage.getParts().values().iterator().next();
+                returnType = part.getTypeName() == null ? part.getElementName() : part.getTypeName();
             }
         } else {
             //todo fix this
@@ -442,7 +444,6 @@
         }
         return -1;
     }
-
 
 
     private void saveClass(DeploymentContext deploymentContext, String className, byte[]
classBytes) throws DeploymentException {

Modified: geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java?view=diff&rev=126583&p1=geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java&r1=126582&p2=geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java&r2=126583
==============================================================================
--- geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
(original)
+++ geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Wed Jan 26 21:04:47 2005
@@ -439,18 +439,25 @@
                 throw new DeploymentException("Could not load service interface class: "
+ serviceInterfaceName, e);
             }
             URI wsdlURI = null;
-            try {
-                wsdlURI = new URI(getStringValue(serviceRef.getWsdlFile().getStringValue()));
-            } catch (URISyntaxException e) {
-                throw new DeploymentException("could not construct wsdl uri from " + serviceRef.getWsdlFile().getStringValue(),
e);
+            if (serviceRef.isSetWsdlFile()) {
+                try {
+                    wsdlURI = new URI(getStringValue(serviceRef.getWsdlFile().getStringValue()));
+                } catch (URISyntaxException e) {
+                    throw new DeploymentException("could not construct wsdl uri from " +
serviceRef.getWsdlFile().getStringValue(), e);
+                }
             }
             URI jaxrpcMappingURI = null;
-            try {
-                jaxrpcMappingURI = new URI(getStringValue(serviceRef.getJaxrpcMappingFile()));
-            } catch (URISyntaxException e) {
-                throw new DeploymentException("Could not construct jaxrpc mapping uri from
" + serviceRef.getJaxrpcMappingFile(), e);
+            if (serviceRef.isSetJaxrpcMappingFile()) {
+                try {
+                    jaxrpcMappingURI = new URI(getStringValue(serviceRef.getJaxrpcMappingFile()));
+                } catch (URISyntaxException e) {
+                    throw new DeploymentException("Could not construct jaxrpc mapping uri
from " + serviceRef.getJaxrpcMappingFile(), e);
+                }
+            }
+            QName serviceQName = null;
+            if (serviceRef.isSetServiceQname()) {
+                serviceQName = serviceRef.getServiceQname().getQNameValue();
             }
-            QName serviceQName = serviceRef.getServiceQname().getQNameValue();
             Map portComponentRefMap = new HashMap();
             PortComponentRefType[] portComponentRefs = serviceRef.getPortComponentRefArray();
             if (portComponentRefs != null) {
@@ -516,7 +523,7 @@
         } catch (ClassNotFoundException e) {
             throw new DeploymentException("Class " + superInterfaceName + " could not be
loaded");
         }
-        if (clazz.isAssignableFrom(superInterface)) {
+        if (!superInterface.isAssignableFrom(clazz)) {
             throw new DeploymentException(interfaceType + " interface does not extend " +
superInterfaceName + ": " + interfaceName);
         }
     }

Mime
View raw message