You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2007/04/26 07:19:33 UTC

svn commit: r532615 [12/13] - in /webservices/axis2/branches/java/1_2/modules: jaxws-api/src/javax/xml/ws/handler/soap/ jaxws-api/src/javax/xml/ws/soap/ jaxws/ jaxws/src/org/apache/axis2/jaxws/ jaxws/src/org/apache/axis2/jaxws/binding/ jaxws/src/org/ap...

Modified: webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java?view=diff&rev=532615&r1=532614&r2=532615
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java (original)
+++ webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java Wed Apr 25 22:19:23 2007
@@ -43,6 +43,7 @@
 import org.apache.axis2.jaxws.description.xml.handler.HandlerChainsType;
 import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.axis2.jaxws.util.WSDL4JWrapper;
+import org.apache.axis2.jaxws.util.WSDLWrapper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -296,85 +297,126 @@
         buildDescriptionHierachy();
 
         WsdlComposite wsdlComposite = null;
+        
+        String bindingType = getBindingType();
+        boolean isSOAP12 = (bindingType.equals( javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING) 
+                            || bindingType.equals(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_MTOM_BINDING)) 
+                            ? true : false;
 
         //Determine if we need to generate WSDL
-        //Assumption is that WSDL will be generated only when the composite does not contain a
-        //Wsdl Definition
-        if (
-                (isEndpointBased() &&
-                        DescriptionUtils.isEmpty(getAnnoWebServiceEndpointInterface()))
-                        ||
-                        (!isEndpointBased())
-                ) {
-            //This is either an implicit SEI, or a WebService Provider
-
-            wsdlComposite = generateWSDL(composite);
-
-        } else if (isEndpointBased()) {
-            //This impl class specifies an SEI...this is a special case. There is a bug
-            //in the tooling that allows for the wsdllocation to be specifed on either the
-            //impl. class, or the SEI, or both. So, we need to look for the wsdl as follows:
-            //			1. If the Wsdl exists on the SEI, then check for it on the impl.
-            //			2. If it is not found in either location, in that order, then generate
-
-            DescriptionBuilderComposite seic =
-                    getServiceDescriptionImpl().getDBCMap()
-                            .get(composite.getWebServiceAnnot().endpointInterface());
-
-            //Only generate WSDL if a definition doesn't already exist
-            if (seic.getWsdlDefinition() == null)
+        //First, make sure that this is not a SOAP 1.2 based binding, per JAXWS spec. we cannot 
+        //generate WSDL if the binding type is SOAP 1.2 based.
+        //Then, assuming the composite does not contain a 
+        //Wsdl Definition, go ahead and generate it
+        // REVIEW: I think this should this be isSOAP11 so the generators are only called for 
+        //         SOAP11; i.e. NOT for SOAP12 or XML/HTTP bindings.
+        if (!isSOAP12) {
+            if (
+                    (isEndpointBased() &&
+                            DescriptionUtils.isEmpty(getAnnoWebServiceEndpointInterface()))
+                            ||
+                            (!isEndpointBased())
+                    ) {
+                //This is either an implicit SEI, or a WebService Provider
+    
                 wsdlComposite = generateWSDL(composite);
+    
+            } else if (isEndpointBased()) {
+                //This impl class specifies an SEI...this is a special case. There is a bug
+                //in the tooling that allows for the wsdllocation to be specifed on either the
+                //impl. class, or the SEI, or both. So, we need to look for the wsdl as follows:
+                //			1. If the Wsdl exists on the SEI, then check for it on the impl.
+                //			2. If it is not found in either location, in that order, then generate
+    
+                DescriptionBuilderComposite seic =
+                        getServiceDescriptionImpl().getDBCMap()
+                                .get(composite.getWebServiceAnnot().endpointInterface());
+    
+                //Only generate WSDL if a definition doesn't already exist
+                if (seic.getWsdlDefinition() == null)
+                    wsdlComposite = generateWSDL(composite);
+            }
+
+        } else if (composite.getWsdlDefinition() == null) {
+            //This is a SOAP12 binding that does not contain a WSDL definition, log a WARNING
+            log.warn("This implementation does not contain a WSDL definition and uses a SOAP 1.2 based binding. " +
+                    "Per JAXWS spec. - a WSDL definition cannot be generated for this implementation. Name: "
+                    + composite.getClassName());
         }
 
-        //Store the WsdlComposite only if it was created
-        if (wsdlComposite != null) {
+        if (!isSOAP12) {
+    
+            //Save the WSDL Location and the WsdlDefinition, value depends on whether wsdl was generated
+            Parameter wsdlLocationParameter = new Parameter();
+            wsdlLocationParameter.setName(MDQConstants.WSDL_LOCATION);
+    
+            Parameter wsdlDefParameter = new Parameter();
+            wsdlDefParameter.setName(MDQConstants.WSDL_DEFINITION);
+    
             Parameter wsdlCompositeParameter = new Parameter();
             wsdlCompositeParameter.setName(MDQConstants.WSDL_COMPOSITE);
-            wsdlCompositeParameter.setValue(wsdlComposite);
-
+    
+            if (wsdlComposite != null) {
+    
+                //We have a wsdl composite, so set these values for the generated wsdl
+                wsdlCompositeParameter.setValue(wsdlComposite);
+                wsdlLocationParameter.setValue(wsdlComposite.getWsdlFileName());
+                wsdlDefParameter.setValue(
+                        getServiceDescriptionImpl().getGeneratedWsdlWrapper().getDefinition());
+            } else if (getServiceDescriptionImpl().getWSDLWrapper() != null) {
+                //No wsdl composite because wsdl already exists
+                wsdlLocationParameter.setValue(getAnnoWebServiceWSDLLocation());
+                wsdlDefParameter.setValue(getServiceDescriptionImpl().getWSDLWrapper().getDefinition());
+            } else {
+                //There is no wsdl composite and there is NOT a wsdl definition
+                wsdlLocationParameter.setValue(null);
+                wsdlDefParameter.setValue(null);
+    
+            }
+    
             try {
-                axisService.addParameter(wsdlCompositeParameter);
+                if (wsdlComposite != null) {
+                    axisService.addParameter(wsdlCompositeParameter);
+                }
+                axisService.addParameter(wsdlDefParameter);
+                axisService.addParameter(wsdlLocationParameter);
             } catch (Exception e) {
                 throw ExceptionFactory.makeWebServiceException(
-                        "EndpointDescription: Unable to add wsdlComposite parm. to AxisService");
+                        "EndpointDescription: Unable to add parameters to AxisService");
             }
         }
+        else {
+            // Need to account for SOAP 1.2 WSDL when supplied with application
+            Parameter wsdlDefParameter = new Parameter();
+            wsdlDefParameter.setName(MDQConstants.WSDL_DEFINITION);
+            Parameter wsdlLocationParameter = new Parameter();
+            wsdlLocationParameter.setName(MDQConstants.WSDL_LOCATION);
+            if (getServiceDescriptionImpl().getWSDLWrapper() != null) {
+                wsdlLocationParameter.setValue(getAnnoWebServiceWSDLLocation());
+                wsdlDefParameter.setValue(getServiceDescriptionImpl().getWSDLWrapper()
+                    .getDefinition());
+            }
+            // No WSDL supplied and we do not generate for non-SOAP 1.1/HTTP
+            // endpoints
+            else {
+                wsdlLocationParameter.setValue(null);
+                wsdlDefParameter.setValue(null);
+            }
+            try {
+                axisService.addParameter(wsdlDefParameter);
+                axisService.addParameter(wsdlLocationParameter);
 
-        //Save the WSDL Location and the WsdlDefinition, value depends on whether wsdl was generated
-        Parameter wsdlLocationParameter = new Parameter();
-        wsdlLocationParameter.setName(MDQConstants.WSDL_LOCATION);
-
-        Parameter wsdlDefParameter = new Parameter();
-        wsdlDefParameter.setName(MDQConstants.WSDL_DEFINITION);
-
-        if (wsdlComposite != null) {
-
-            wsdlLocationParameter.setValue(wsdlComposite.getWsdlFileName());
-            wsdlDefParameter.setValue(
-                    getServiceDescriptionImpl().getGeneratedWsdlWrapper().getDefinition());
-        } else if (getServiceDescriptionImpl().getWSDLWrapper() != null) {
-
-            wsdlLocationParameter.setValue(getAnnoWebServiceWSDLLocation());
-            wsdlDefParameter.setValue(getServiceDescriptionImpl().getWSDLWrapper().getDefinition());
-        } else {
-            wsdlLocationParameter.setValue(null);
-            wsdlDefParameter.setValue(null);
-
-        }
-
-        try {
-            axisService.addParameter(wsdlDefParameter);
-            axisService.addParameter(wsdlLocationParameter);
-        } catch (Exception e) {
-            throw ExceptionFactory.makeWebServiceException(
-                    "EndpointDescription: Unable to add parms. to AxisService");
+            } catch (Exception e) {
+                throw ExceptionFactory
+                    .makeWebServiceException("EndpointDescription: Unable to add parameters to AxisService");
+            }
         }
     }
 
     /**
-     * Create from an annotated implementation or SEI class. Note this is currently used only on the
-     * server-side (this probably won't change).
-     *
+     * Create from an annotated implementation or SEI class. Note this is
+     * currently used only on the server-side (this probably won't change).
+     * 
      * @param theClass An implemntation or SEI class
      * @param portName May be null; if so the annotation is used
      * @param parent
@@ -711,12 +753,16 @@
             // Note that the axis service builder takes only the localpart of the port qname.
             // TODO:: This should check that the namespace of the definition matches the namespace of the portQName per JAXRPC spec
 
+            WSDLWrapper wrapper = getServiceDescriptionImpl().getWSDLWrapper();
             WSDL11ToAxisServiceBuilder serviceBuilder =
                     new WSDL11ToAxisServiceBuilder(
-                            getServiceDescriptionImpl().getWSDLWrapper().getDefinition(),
+                            wrapper.getDefinition(),
                             getServiceDescription().getServiceQName(),
                             getPortQName().getLocalPart());
 
+            //TODO: Temporary, please change the following log.info to log.debug
+            log.info("Building AxisService from wsdl: " + wrapper.getWSDLLocation());
+            
             if (getServiceDescriptionImpl().isDBCMap()) {
                 //this.class.getClass().getClassLoader();
                 URIResolverImpl uriResolver =
@@ -1198,7 +1244,7 @@
      * @return HandlerChainsType This is the top-level element for the Handler configuration file
      */
     public HandlerChainsType getHandlerChain() {
-        // TODO: This needs to work for DBC or class
+
         if (handlerChainsType == null) {
             getAnnoHandlerChainAnnotation();
             if (handlerChainAnnotation != null) {
@@ -1206,7 +1252,7 @@
 
                 // TODO RAS & NLS
                 if (log.isDebugEnabled()) {
-                    log.debug("EndpointDescriptionImpl.getHandlerList: fileName: "
+                    log.debug("EndpointDescriptionImpl.getHandlerChain: fileName: "
                             + handlerFileName
                             + " className: "
                             + composite.getClassName());
@@ -1223,21 +1269,25 @@
                         className,
                         classLoader);
 
-                try {
-                    // All the classes we need should be part of this package
-                    JAXBContext jc = JAXBContext
-                            .newInstance("org.apache.axis2.jaxws.description.xml.handler",
-                                         this.getClass().getClassLoader());
-
-                    Unmarshaller u = jc.createUnmarshaller();
-
-                    JAXBElement<?> o = (JAXBElement<?>)u.unmarshal(is);
-                    handlerChainsType = (HandlerChainsType)o.getValue();
-
-                } catch (Exception e) {
-                    throw ExceptionFactory
-                            .makeWebServiceException(
-                                    "EndpointDescriptionImpl: getHandlerList: thrown when attempting to unmarshall JAXB content");
+                if(is == null) {
+                    log.warn("Unable to load handlers from file: " + handlerFileName);                    
+                } else {
+                    try {
+                        // All the classes we need should be part of this package
+                        JAXBContext jc = JAXBContext
+                                .newInstance("org.apache.axis2.jaxws.description.xml.handler",
+                                             this.getClass().getClassLoader());
+    
+                        Unmarshaller u = jc.createUnmarshaller();
+    
+                        JAXBElement<?> o = (JAXBElement<?>)u.unmarshal(is);
+                        handlerChainsType = (HandlerChainsType)o.getValue();
+    
+                    } catch (Exception e) {
+                        throw ExceptionFactory
+                                .makeWebServiceException(
+                                        "EndpointDescriptionImpl: getHandlerList: thrown when attempting to unmarshall JAXB content");
+                    }
                 }
             }
         }
@@ -1247,7 +1297,31 @@
     public HandlerChain getAnnoHandlerChainAnnotation() {
         if (this.handlerChainAnnotation == null) {
             if (getServiceDescriptionImpl().isDBCMap()) {
+                /*
+                 * Per JSR-181 The @HandlerChain annotation MAY be present on
+                 * the endpoint interface and service implementation bean. The
+                 * service implementations bean's @HandlerChain is used if
+                 * @HandlerChain is present on both. So, if we do find the
+                 * annotation on this impl, then don't worry about else
+                 * Otherwise, check to see if the SEI might be annotated with
+                 * @HandlerChain
+                 */
+
                 handlerChainAnnotation = composite.getHandlerChainAnnot();
+                if (handlerChainAnnotation == null) {
+
+                    // If this is NOT an implicit SEI, then check for the
+                    // annotation on the SEI
+                    if (!DescriptionUtils.isEmpty(getAnnoWebServiceEndpointInterface())) {
+
+                        DescriptionBuilderComposite seic = getServiceDescriptionImpl().getDBCMap()
+                                        .get(composite.getWebServiceAnnot().endpointInterface());
+                        if (seic != null) {
+                            handlerChainAnnotation = seic.getHandlerChainAnnot();
+                        }
+                        // TODO else clause for if to throw exception when seic == null
+                    }
+                }
             } else {
                 if (implOrSEIClass != null) {
                     handlerChainAnnotation =
@@ -1258,20 +1332,7 @@
 
         return handlerChainAnnotation;
     }
-
-    /*
-     * Returns a live list describing the handlers on this port.
-     * TODO: This is currently returning List<String>, but it should return a HandlerDescritpion
-     * object that can represent a handler description from various Metadata (annotation, deployment descriptors, etc);
-     * use JAX-WS Appendix B Handler Chain Configuration File Schema as a starting point for HandlerDescription.
-     *  
-     * @return A List of handlers for this port.  The actual list is returned, and therefore can be modified.
     
-    public List<String> getHandlerList() {
-        return handlerList;
-    }
-    */
-
     private Definition getWSDLDefinition() {
         return ((ServiceDescriptionWSDL)getServiceDescription()).getWSDLDefinition();
     }

Modified: webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java?view=diff&rev=532615&r1=532614&r2=532615
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java (original)
+++ webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java Wed Apr 25 22:19:23 2007
@@ -319,9 +319,14 @@
                     for (OperationDescription checkOpDesc : updateOpDesc) {
                         if (checkOpDesc.getSEIMethod() == null) {
                             // TODO: Should this be checking (somehow) that the signature matches?  Probably not an issue until overloaded WSDL ops are supported.
-                            ((OperationDescriptionImpl)checkOpDesc).setSEIMethod(seiMethod);
-                            addOpDesc = false;
-                            break;
+                            
+                            //Make sure that this is not one of the 'async' methods associated with
+                            //this operation. If it is, let it be created as its own opDesc.
+                            if (!DescriptionUtils.isAsync(seiMethod)) {
+                                ((OperationDescriptionImpl) checkOpDesc).setSEIMethod(seiMethod);
+                                addOpDesc = false;
+                                break;
+                            }
                         }
                     }
                     if (addOpDesc) {
@@ -440,6 +445,26 @@
         }
         return returnOperations;
     }
+    /* (non-Javadoc)
+     * @see org.apache.axis2.jaxws.description.EndpointInterfaceDescription#getDispatchableOperations()
+     */
+    public OperationDescription[] getDispatchableOperations() {
+        OperationDescription[] returnOperations = null;
+        OperationDescription[] allMatchingOperations = getOperations();
+        if (allMatchingOperations != null && allMatchingOperations.length > 0) {
+            ArrayList<OperationDescription> dispatchableOperations = new ArrayList<OperationDescription>();
+            for (OperationDescription operation : allMatchingOperations) {
+                if (!operation.isJAXWSAsyncClientMethod()) {
+                    dispatchableOperations.add(operation);
+                }
+            }
+            
+            if (dispatchableOperations.size() > 0) {
+                returnOperations = dispatchableOperations.toArray(new OperationDescription[0]);
+            }
+        }
+        return returnOperations;
+    }
 
     /**
      * Return an OperationDescription for the corresponding SEI method.  Note that this ONLY works
@@ -844,7 +869,9 @@
         if (wsdlDefn != null) {
             String tns = getEndpointDescription().getTargetNamespace();
             String localPart = getEndpointDescription().getName();
-            portType = wsdlDefn.getPortType(new QName(tns, localPart));
+            if (localPart != null) {
+                portType = wsdlDefn.getPortType(new QName(tns, localPart));
+            }
         }
         return portType;
     }

Modified: webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java?view=diff&rev=532615&r1=532614&r2=532615
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java (original)
+++ webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java Wed Apr 25 22:19:23 2007
@@ -37,6 +37,7 @@
 import org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite;
 import org.apache.axis2.jaxws.description.builder.OneWayAnnot;
 import org.apache.axis2.jaxws.description.builder.ParameterDescriptionComposite;
+import org.apache.axis2.jaxws.description.builder.WebParamAnnot;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -47,6 +48,7 @@
 import javax.jws.WebParam.Mode;
 import javax.jws.WebResult;
 import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlList;
 import javax.xml.namespace.QName;
 import javax.xml.ws.AsyncHandler;
 import javax.xml.ws.RequestWrapper;
@@ -61,6 +63,7 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Future;
 
@@ -94,6 +97,9 @@
     private Oneway onewayAnnotation;
     private Boolean onewayIsOneway;
 
+    // ANNOTATION: @XmlList
+    private boolean 			isListType = false;
+    
     // ANNOTATION: @RequestWrapper
     private RequestWrapper requestWrapperAnnotation;
     private String requestWrapperTargetNamespace;
@@ -162,7 +168,7 @@
         // TODO: Look for WebMethod anno; get name and action off of it
         parentEndpointInterfaceDescription = parent;
         setSEIMethod(method);
-
+		checkForXmlListAnnotation(method.getAnnotations());
         // The operationQName is intentionally unqualified to be consistent with the remaining parts of the system. 
         // Using a qualified name will cause breakage.
         // Don't do --> this.operationQName = new QName(parent.getTargetNamespace(), getOperationName());
@@ -190,6 +196,7 @@
 
         parameterDescriptions = createParameterDescriptions();
         faultDescriptions = createFaultDescriptions();
+		isListType = mdc.isListType();
 
         //If an AxisOperation was already created for us by populateService then just use that one
         //Otherwise, create it
@@ -261,13 +268,13 @@
                         // QName based on this parameter then break out of the loop.
                         AxisMessage axisMessage =
                                 newAxisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
-                        String partLocalName = paramDesc.getPartName();
+                        String elementName = paramDesc.getParameterName();
                         String partNamespace = paramDesc.getTargetNamespace();
                         if (log.isDebugEnabled()) {
                             log.debug("Setting up annotation based Doc/Lit/Bare operation: " +
                                     newAxisOperation.getName()
-                                    + "; axisMessage: " + axisMessage + "; partLocalName: "
-                                    + partLocalName + "; partTNS: " + partNamespace);
+                                    + "; axisMessage: " + axisMessage + "; name: "
+                                    + elementName + "; partTNS: " + partNamespace);
                         }
                         if (axisMessage == null) {
                             // TODO: RAS & NLS
@@ -277,12 +284,16 @@
                             // TODO: RAS & NLS
                             throw ExceptionFactory.makeWebServiceException(
                                     "Could not setup Doc/Lit/Bare operation because part namespace is empty");
-                        } else if (DescriptionUtils.isEmpty(partLocalName)) {
+                        } else if (DescriptionUtils.isEmpty(elementName)) {
                             // TODO: RAS & NLS
                             throw ExceptionFactory.makeWebServiceException(
-                                    "Could not setup Doc/Lit/Bare operation because part local name is empty");
+                                    "Could not setup Doc/Lit/Bare operation because name is empty");
                         } else {
-                            QName partQName = new QName(partNamespace, partLocalName);
+                            QName partQName = new QName(partNamespace, elementName);
+                            if(log.isDebugEnabled()) {
+                                log.debug("Setting AxisMessage element QName for bare mapping: " +
+                                        partQName);
+                            }
                             axisMessage.setElementQName(partQName);
                         }
                         break;
@@ -346,6 +357,16 @@
     }
 
     public AxisOperation getAxisOperation() {
+        // Note that only the sync operations, and not the JAX-WS async client versions of an 
+        // operation, will have an AxisOperation associated with it.  For those async operations, 
+        // get the AxisOperation associated with the sync method and return that.
+        if (axisOperation == null) {
+            OperationDescription opDesc = getSyncOperation();
+            if (opDesc != null && opDesc != this) {
+                return getSyncOperation().getAxisOperation();
+            }
+        } 
+        
         return axisOperation;
     }
 
@@ -1190,7 +1211,7 @@
 
     public javax.jws.soap.SOAPBinding.ParameterStyle getAnnoSoapBindingParameterStyle() {
         if (soapBindingParameterStyle == null) {
-            if (getAnnoSoapBinding() != null && getAnnoSoapBinding().use() != null) {
+            if (getAnnoSoapBinding() != null && getAnnoSoapBinding().parameterStyle() != null) {
                 soapBindingParameterStyle = getAnnoSoapBinding().parameterStyle();
             } else {
                 // Per JSR-181 MR Sec 4.7, pg 28: if not specified, use the Type value.
@@ -1488,6 +1509,18 @@
         runtimeDescMap.put(ord.getKey(), ord);
     }
 
+    private void checkForXmlListAnnotation(Annotation[] annotations) {
+    	for(Annotation annotation : annotations) {
+    		if(annotation.annotationType() == XmlList.class) {
+    			isListType = true;
+    		}
+    	}
+    }
+    
+    public boolean isListType() {
+    	return isListType;
+    }
+    
     public String toString() {
         final String newline = "\n";
         final String sameline = "; ";

Modified: webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ParameterDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ParameterDescriptionImpl.java?view=diff&rev=532615&r1=532614&r2=532615
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ParameterDescriptionImpl.java (original)
+++ webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ParameterDescriptionImpl.java Wed Apr 25 22:19:23 2007
@@ -27,6 +27,7 @@
 
 import javax.jws.WebParam;
 import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlList;
 import javax.xml.ws.Holder;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Array;
@@ -60,7 +61,10 @@
     private WebParam.Mode webParamMode;
     public static final Boolean WebParam_Header_DEFAULT = new Boolean(false);
     private Boolean webParamHeader;
-
+    
+    // This boolean indicates whether or not there was an @XMLList on the parameter
+    private boolean isListType = false;
+    
     ParameterDescriptionImpl(int parameterNumber, Class parameterType, Type parameterGenericType,
                              Annotation[] parameterAnnotations, OperationDescription parent) {
         this.parameterNumber = parameterNumber;
@@ -75,6 +79,7 @@
                     getGenericParameterActualType((ParameterizedType)parameterGenericType);
         }
         findWebParamAnnotation(parameterAnnotations);
+        findXmlListAnnotation(parameterAnnotations);
     }
 
     ParameterDescriptionImpl(int parameterNumber, ParameterDescriptionComposite pdc,
@@ -83,6 +88,7 @@
         this.parameterNumber = parameterNumber;
         this.parentOperationDescription = parent;
         webParamAnnotation = pdc.getWebParamAnnot();
+        this.isListType = pdc.isListType();
 
         //TODO: Need to build the schema map. Need to add logic to add this parameter
         //      to the schema map.
@@ -107,6 +113,18 @@
         }
     }
 
+    /**
+     * This method will search array of parameter annotations for the presence of the @XmlList
+     * annotation.
+     */
+    private void findXmlListAnnotation(Annotation[] annotations) {
+    	for (Annotation checkAnnotation:annotations) {
+            if (checkAnnotation.annotationType() == XmlList.class) {
+                isListType = true;
+            }
+        }
+    }
+    
     public OperationDescription getOperationDescription() {
         return parentOperationDescription;
     }
@@ -363,5 +381,9 @@
             return string.toString();
         }
         return string.toString();
+    }
+
+    public boolean isListType() {
+    	return isListType;
     }
 }

Modified: webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java?view=diff&rev=532615&r1=532614&r2=532615
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java (original)
+++ webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java Wed Apr 25 22:19:23 2007
@@ -30,6 +30,8 @@
 import org.apache.axis2.jaxws.description.ServiceRuntimeDescription;
 import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
 import org.apache.axis2.jaxws.description.builder.MDQConstants;
+import static org.apache.axis2.jaxws.description.builder.MDQConstants.RETURN_TYPE_FUTURE;
+import static org.apache.axis2.jaxws.description.builder.MDQConstants.RETURN_TYPE_RESPONSE;
 import org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite;
 import org.apache.axis2.jaxws.description.builder.ParameterDescriptionComposite;
 import org.apache.axis2.jaxws.i18n.Messages;
@@ -47,6 +49,7 @@
 import javax.xml.namespace.QName;
 import javax.xml.ws.soap.SOAPBinding;
 import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.net.ConnectException;
 import java.net.URL;
 import java.net.UnknownHostException;
@@ -155,7 +158,12 @@
         String serviceImplName = this.composite.getClassName();
 
         this.dbcMap = dbcMap;
-//TODO: How to we get this when called from server side, create here for now
+        //TODO: How to we get this when called from server side, create here for now
+        //REVIEW: The value being set here is used later in validation checking to
+        //        validation that should occur separately on server and client. If
+        //        at some point this constructor is ever called by the client side,
+        //        then we'll have to get smarter about how we determine server/client
+        //        validation
         this.isServerSide = true;
 
         //capture the WSDL, if there is any...to be used for later processing
@@ -252,13 +260,13 @@
                     // This guards against the case where an addPort was done previously and now a getPort is done on it.
                     // TODO: RAS & NLS
                     throw ExceptionFactory.makeWebServiceException(
-                            "ServiceDescription.updateEndpointDescription: Can not do a getPort on a port added via addPort().  PortQN: " +
-                                    portQName != null ? portQName.toString() : "not specified");
+                        "ServiceDescription.updateEndpointDescription: Can not do a getPort on a port added via addPort().  PortQN: " +
+                        (portQName != null ? portQName.toString() : "not specified"));
                 } else if (sei == null) {
                     // TODO: RAS & NLS
                     throw ExceptionFactory.makeWebServiceException(
-                            "ServiceDescription.updateEndpointDescription: Can not do a getPort with a null SEI.  PortQN: " +
-                                    portQName != null ? portQName.toString() : "not specified");
+                        "ServiceDescription.updateEndpointDescription: Can not do a getPort with a null SEI.  PortQN: " +
+                        (portQName != null ? portQName.toString() : "not specified"));
                 } else if (endpointDescription == null) {
                     // Use the SEI Class and its annotations to finish creating the Description hierachy: Endpoint, EndpointInterface, Operations, Parameters, etc.
                     // TODO: Need to create the Axis Description objects after we have all the config info (i.e. from this SEI)
@@ -315,10 +323,13 @@
 
     private Class getEndpointSEI(QName portQName) {
         Class endpointSEI = null;
-        EndpointInterfaceDescription endpointInterfaceDesc =
-                getEndpointDescription(portQName).getEndpointInterfaceDescription();
-        if (endpointInterfaceDesc != null) {
-            endpointSEI = endpointInterfaceDesc.getSEIClass();
+        EndpointDescription endpointDesc = getEndpointDescription(portQName);
+        if (endpointDesc != null) {
+            EndpointInterfaceDescription endpointInterfaceDesc = 
+                endpointDesc.getEndpointInterfaceDescription();
+            if (endpointInterfaceDesc != null ) {
+                endpointSEI = endpointInterfaceDesc.getSEIClass();
+            }
         }
         return endpointSEI;
     }
@@ -489,6 +500,9 @@
                 throw ExceptionFactory.makeWebServiceException(
                         Messages.getMessage("connectionRefused", e.getMessage()), e);
             }
+            catch(IOException e) {
+                throw ExceptionFactory.makeWebServiceException(Messages.getMessage("urlStream", e.getMessage()), e);
+            }
             catch (WSDLException e) {
                 throw ExceptionFactory.makeWebServiceException(
                         Messages.getMessage("wsdlException", e.getMessage()), e);
@@ -542,8 +556,28 @@
     * @see org.apache.axis2.jaxws.description.ServiceDescription#getServiceClient(javax.xml.namespace.QName)
     */
     public ServiceClient getServiceClient(QName portQName) {
-        // TODO: RAS if no portQName found
-        return getEndpointDescription(portQName).getServiceClient();
+        ServiceClient returnServiceClient = null;
+        if (!DescriptionUtils.isEmpty(portQName)) {
+            EndpointDescription endpointDesc = getEndpointDescription(portQName);
+            if (endpointDesc != null) {
+                returnServiceClient = endpointDesc.getServiceClient();
+            }
+            else {
+                // Couldn't find Endpoint Description for port QName
+                if (log.isDebugEnabled()) {
+                    log.debug("Could not find portQName: " + portQName 
+                            + " under ServiceDescription: " + toString());
+                }
+            }
+        }
+        else {
+            // PortQName is empty
+            if (log.isDebugEnabled()) {
+                log.debug("PortQName agrument is invalid; it can not be null or an empty string: " + portQName);
+            }
+        }
+        
+        return returnServiceClient;
     }
 
     /* (non-Javadoc)
@@ -560,7 +594,7 @@
     }
 
 
-    boolean isServerSide() {
+    public boolean isServerSide() {
         return isServerSide;
     }
 
@@ -904,7 +938,8 @@
            *	compiler will take care of everything else.
            */
 
-        HashMap compositeHashMap = new HashMap();
+        HashMap<String, MethodDescriptionComposite> compositeHashMap = 
+            new HashMap<String, MethodDescriptionComposite>();
         Iterator<MethodDescriptionComposite> compIterator =
                 composite.getMethodDescriptionsList().iterator();
         while (compIterator.hasNext()) {
@@ -914,7 +949,8 @@
         // Add methods declared in the implementation's superclass
         addSuperClassMethods(compositeHashMap, composite);
 
-        HashMap seiMethodHashMap = new HashMap();
+        HashMap<String, MethodDescriptionComposite> seiMethodHashMap = 
+            new HashMap<String, MethodDescriptionComposite>();
         Iterator<MethodDescriptionComposite> seiMethodIterator =
                 seic.getMethodDescriptionsList().iterator();
         while (seiMethodIterator.hasNext()) {
@@ -930,18 +966,181 @@
                 seiMethodHashMap.values().iterator();
         while (verifySEIIterator.hasNext()) {
             MethodDescriptionComposite mdc = verifySEIIterator.next();
-            // REVIEW:  Only the names are checked; this isn't checking signatures
-            if (compositeHashMap.get(mdc.getMethodName()) == null) {
+            // TODO: This does not take into consideration overloaded java methods!
+            MethodDescriptionComposite implMDC = compositeHashMap.get(mdc.getMethodName());
+            
+            if (implMDC == null) {
                 // TODO: RAS/NLS
                 throw ExceptionFactory.makeWebServiceException(
                         "Validation error: Implementation subclass does not implement method on specified interface.  Implementation class: "
                                 + composite.getClassName() + "; missing method name: " +
                                 mdc.getMethodName() + "; endpointInterface: " +
                                 seic.getClassName());
+            } else {
+                //At least we found it, now make sure that signatures match up
+                
+                //Check for exception and signature matching
+                validateMethodExceptions(mdc, implMDC, seic.getClassName());
+                validateMethodReturnValue(mdc, implMDC, seic.getClassName());
+                validateMethodParameters(mdc, implMDC, seic.getClassName());
             }
         }
     }
 
+    private void validateMethodParameters(MethodDescriptionComposite seiMDC,
+        MethodDescriptionComposite implMDC, String className) {
+        List<ParameterDescriptionComposite> seiPDCList = seiMDC
+            .getParameterDescriptionCompositeList();
+        List<ParameterDescriptionComposite> implPDCList = implMDC
+            .getParameterDescriptionCompositeList();
+        if ((seiPDCList == null || seiPDCList.isEmpty())
+            && (implPDCList == null || implPDCList.isEmpty())) {
+            // There are no parameters on the SEI or the impl; all is well
+        } else if ((seiPDCList == null || seiPDCList.isEmpty())
+            && !(implPDCList == null || implPDCList.isEmpty())) {
+            String message = "Validation error: SEI indicates no parameters but implementation method specifies parameters: "
+                + implPDCList
+                + "; Implementation class: "
+                + composite.getClassName()
+                + "; Method name: " + seiMDC.getMethodName() + "; Endpoint Interface: " + className;
+            throw ExceptionFactory.makeWebServiceException(message);
+        } else if ((seiPDCList != null && !seiPDCList.isEmpty())
+            && !(implPDCList != null && !implPDCList.isEmpty())) {
+            String message = "Validation error: SEI indicates parameters " + seiPDCList
+                + " but implementation method specifies no parameters; Implementation class: "
+                + composite.getClassName() + "; Method name: " + seiMDC.getMethodName()
+                + "; Endpoint Interface: " + className;
+            throw ExceptionFactory.makeWebServiceException(message);
+        } else if (seiPDCList.size() != implPDCList.size()) {
+            String message = "Validation error: The number of parameters on the SEI method ("
+                + seiPDCList.size()
+                + ") does not match the number of parameters on the implementation ( "
+                + implPDCList.size() + "); Implementation class: " + composite.getClassName()
+                + "; Method name: " + seiMDC.getMethodName() + "; Endpoint Interface: " + className;
+            throw ExceptionFactory.makeWebServiceException(message);
+
+        } else {
+            // Make sure the order and type of parameters match
+            // REVIEW: This checks for strict equality of the fully qualified
+            // type. It does not
+            // take into consideration object hierachy. For example foo(Animal)
+            // will not equal bar(Zebra)
+            boolean parametersMatch = true;
+            String failingMessage = null;
+            for (int paramNumber = 0; paramNumber < seiPDCList.size(); paramNumber++) {
+                String seiParamType = seiPDCList.get(paramNumber).getParameterType();
+                String implParamType = implPDCList.get(paramNumber).getParameterType();
+                if (!seiParamType.equals(implParamType)) {
+                    parametersMatch = false;
+                    failingMessage = "Validation error: SEI and implementation parameters do not match.  Parameter number "
+                        + paramNumber
+                        + " on the SEI is "
+                        + seiParamType
+                        + "; on the implementation it is "
+                        + implParamType
+                        + "; Implementation class: "
+                        + composite.getClassName()
+                        + "; Method name: "
+                        + seiMDC.getMethodName() + "; Endpoint Interface: " + className;
+                    break;
+                }
+            }
+            if (!parametersMatch) {
+                throw ExceptionFactory.makeWebServiceException(failingMessage);
+            }
+        }
+    }
+
+    private void validateMethodReturnValue(MethodDescriptionComposite seiMDC,
+        MethodDescriptionComposite implMDC, String className) {
+        String seiReturnValue = seiMDC.getReturnType();
+        String implReturnValue = implMDC.getReturnType();
+
+        if (seiReturnValue == null && implReturnValue == null) {
+            // Neither specify a return value; all is well
+        } else if (seiReturnValue == null && implReturnValue != null) {
+            String message = "Validation error: SEI indicates no return value but implementation method specifies return value: "
+                + implReturnValue
+                + "; Implementation class: "
+                + composite.getClassName()
+                + "; Method name: " + seiMDC.getMethodName() + "; Endpoint Interface: " + className;
+            throw ExceptionFactory.makeWebServiceException(message);
+        } else if (seiReturnValue != null && implReturnValue == null) {
+            String message = "Validation error: SEI indicates return value " + seiReturnValue
+                + " but implementation method specifies no return value; Implementation class: "
+                + composite.getClassName() + "; Method name: " + seiMDC.getMethodName()
+                + "; Endpoint Interface: " + className;
+            throw ExceptionFactory.makeWebServiceException(message);
+        } else if (!seiReturnValue.equals(implReturnValue)) {
+            String message = "Validation error: SEI return value " + seiReturnValue
+                + " does not match implementation method return value " + implReturnValue
+                + "; Implementation class: " + composite.getClassName() + "; Method name: "
+                + seiMDC.getMethodName() + "; Endpoint Interface: " + className;
+            throw ExceptionFactory.makeWebServiceException(message);
+        }
+
+    }
+
+    private void validateMethodExceptions ( MethodDescriptionComposite seiMDC, 
+        MethodDescriptionComposite implMDC,
+        String className) {
+
+        String[] seiExceptions = seiMDC.getExceptions();
+        String[] implExceptions = implMDC.getExceptions();
+
+        // An impl can choose to throw fewer checked exceptions than declared on the SEI, but not more.
+        // This is analagous to the Java rules for interfaces.
+        if (seiExceptions == null) {
+            if (implExceptions == null) {
+                return;
+            } else {
+                // SEI delcares no checked exceptions, but the implementation has checked exceptions, which is an error
+                throw ExceptionFactory.makeWebServiceException("Validation error: Implementation method signature has more checked exceptions than SEI method signature (0): Implementation class: "
+                    + composite.getClassName() 
+                    + "; method name: " + seiMDC.getMethodName() 
+                    + "; endpointInterface: " + className);
+            }
+        } else if (implExceptions == null) {
+            // Implementation throws fewer checked exceptions than SEI, which is OK.
+            return;
+        }
+        
+        // Check the list length; An implementation can not declare more exceptions than the SEI
+        if (seiExceptions.length < implExceptions.length) {
+            throw ExceptionFactory.makeWebServiceException("Validation error: Implementation method signature has more checked exceptions ("
+                + implExceptions.length + ") than SEI method signature ("
+                + seiExceptions.length + "): Implementation class: "
+                + composite.getClassName() 
+                + "; method name: " + seiMDC.getMethodName() 
+                + "; endpointInterface: " + className);
+        }
+        
+        // Make sure that each checked exception declared by the 
+        // implementation is on the SEI also
+        if (implExceptions.length > 0) {                
+            for (String implException : implExceptions) {
+                boolean foundIt = false;
+                if (seiExceptions.length > 0) {         
+                    for (String seiException : seiExceptions) {
+                        if (seiException.equals(implException)) {
+                            foundIt = true;
+                            break;
+                        }
+                    }
+                }
+                
+                if (!foundIt) {
+                    throw ExceptionFactory.makeWebServiceException("Validation error: Implementation method signature throws exception " 
+                        + implException + "which is not declared on the SEI method signature: Implementation class: "
+                        + composite.getClassName() 
+                        + "; method name: " + seiMDC.getMethodName() 
+                        + "; endpointInterface: " + className);
+                }
+            }
+        }
+
+    }
+
     /**
      * Adds any methods declared in superclasses to the HashMap.  The hierachy starting with the DBC
      * will be walked up recursively, adding methods from each parent DBC encountered.
@@ -1046,7 +1245,7 @@
 
         //This will perform validation for all methods, regardless of WebMethod annotations
         //It is called for the SEI, and an impl. class that does not specify an endpointInterface
-        validateMethods();
+        validateMethods(seic.getMethodDescriptionsList());
     }
 
     /** @return Returns TRUE if we find just one WebMethod Annotation */
@@ -1077,10 +1276,21 @@
     }
 
 
-    /**
-     */
-    private void validateMethods() {
-        //TODO: Fill this out to validate all MethodDescriptionComposite (and their inclusive
+    private void validateMethods(List<MethodDescriptionComposite> mdcList) {
+        if (mdcList != null && !mdcList.isEmpty()) {
+            for (MethodDescriptionComposite mdc : mdcList) {
+                String returnType = mdc.getReturnType();
+                if (returnType != null
+                                && (returnType.equals(RETURN_TYPE_FUTURE) || returnType
+                                                .equals(RETURN_TYPE_RESPONSE))) {
+                    throw ExceptionFactory.makeWebServiceException(Messages
+                                    .getMessage("serverSideAsync", mdc.getDeclaringClass(), mdc
+                                                    .getMethodName()));
+                }
+            }
+        }
+        // TODO: Fill this out to validate all MethodDescriptionComposite (and
+        // their inclusive
         //      annotations on this SEI (SEI is assumed here)
         //check oneway
         //
@@ -1173,8 +1383,8 @@
         // Go through the list of Endpoints that have been created and add any
         // not already in the list.  This will include ports added to the Service
         // via getPort(...) and addPort(...)
-        EndpointDescription[] endpointDescArray = getEndpointDescriptions();
-        for (EndpointDescription endpointDesc : endpointDescArray) {
+        Collection<EndpointDescription> endpointDescs = getEndpointDescriptions_AsCollection();
+        for (EndpointDescription endpointDesc : endpointDescs) {
             QName endpointPortQName = endpointDesc.getPortQName();
             if (!portList.contains(endpointPortQName)) {
                 portList.add(endpointPortQName);
@@ -1272,11 +1482,12 @@
             // string.append("ConfigurationContext: " + getAxisConfigContext());
             // EndpointDescriptions
             string.append(newline);
-            EndpointDescription[] endpointDescs = getEndpointDescriptions();
+            Collection<EndpointDescription> endpointDescs = getEndpointDescriptions_AsCollection();
             if (endpointDescs == null) {
                 string.append("EndpointDescription array is null");
-            } else {
-                string.append("Number of EndpointDescrptions: " + endpointDescs.length);
+            }
+            else {
+                string.append("Number of EndpointDescrptions: " + endpointDescs.size());
                 string.append(newline);
                 for (EndpointDescription endpointDesc : endpointDescs) {
                     string.append(endpointDesc.toString());

Modified: webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/URIResolverImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/URIResolverImpl.java?view=diff&rev=532615&r1=532614&r2=532615
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/URIResolverImpl.java (original)
+++ webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/impl/URIResolverImpl.java Wed Apr 25 22:19:23 2007
@@ -20,6 +20,8 @@
 
 import org.apache.axis2.jaxws.ExceptionFactory;
 import org.apache.axis2.jaxws.i18n.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.ws.commons.schema.resolver.URIResolver;
 import org.xml.sax.InputSource;
 
@@ -38,7 +40,11 @@
 
     private final String FILE_PROTOCOL = "file";
 
+    private final String JAR_PROTOCOL = "jar";
+
     private ClassLoader classLoader;
+    
+    private static final Log log = LogFactory.getLog(URIResolverImpl.class);
 
     public URIResolverImpl() {
     }
@@ -49,35 +55,61 @@
 
     public InputSource resolveEntity(String namespace, String schemaLocation,
                                      String baseUri) {
-
+        //TODO: Temporary, please change the following log.info to log.debug
+        log.info("resolveEntity: ["+ namespace + "]["+ schemaLocation + "][ " + baseUri+ "]");
+        
         InputStream is = null;
         URI pathURI = null;
+        String pathURIStr = null;
+        if(log.isDebugEnabled()) {
+            log.debug("Import location: " + schemaLocation + " parent document: " + 
+                    baseUri);
+        }
         if (baseUri != null) {
             try {
                 // if the location is an absolute path, build a URL directly
                 // from it
 
                 if (isAbsolute(schemaLocation)) {
+                    if(log.isDebugEnabled()) {
+                        log.debug("Retrieving input stream for absolute schema location: "
+                                + schemaLocation);
+                    }
                     is = getInputStreamForURI(schemaLocation);
                 }
 
-                // Try baseURI + relavtive schema path combo
                 else {
                     pathURI = new URI(baseUri);
-                    String pathURIStr = schemaLocation;
+                    pathURIStr = schemaLocation;
                     // If this is absolute we need to resolve the path without the 
                     // scheme information
                     if (pathURI.isAbsolute()) {
+                        if(log.isDebugEnabled()) {
+                            log.debug("Parent document is at absolute location: " + 
+                                    pathURI.toString());
+                        }
                         URL url = new URL(baseUri);
                         if (url != null) {
                             URI tempURI = new URI(url.getPath());
                             URI resolvedURI = tempURI.resolve(schemaLocation);
                             // Add back the scheme to the resolved path
                             pathURIStr = constructPath(url, resolvedURI);
+                            if(log.isDebugEnabled()) {
+                                log.debug("Resolved this path to imported document: " + 
+                                        pathURIStr);
+                            }
                         }
                     } else {
+                        if(log.isDebugEnabled()) {
+                            log.debug("Parent document is at relative location: " + 
+                                    pathURI.toString());
+                        }
                         pathURI = pathURI.resolve(schemaLocation);
                         pathURIStr = pathURI.toString();
+                        if(log.isDebugEnabled()) {
+                            log.debug("Resolved this path to imported document: " + 
+                                    pathURIStr);
+                        }
                     }
                     // If path is absolute, build URL directly from it
                     if (isAbsolute(pathURIStr)) {
@@ -95,10 +127,32 @@
                     }
                 }
             } catch (Exception e) {
-
+                if(log.isDebugEnabled()) {
+                    log.debug(e);
+                }
+            }
+        }
+        if(is == null) {
+            if(log.isDebugEnabled()) {
+                log.debug("XSD input stream is null after resolving import for: " + 
+                        schemaLocation + " from parent document: " + baseUri);
+            }
+        }
+        else {
+            if(log.isDebugEnabled()) {
+                log.debug("XSD input stream is not null after resolving import for: " + 
+                        schemaLocation + " from parent document: " + baseUri);
             }
         }
-        return new InputSource(is);
+
+        InputSource returnInputSource = new InputSource(is);
+        // We need to set the systemId.  XmlSchema will use this value to maintain a collection of
+        // imported XSDs that have been read.  If this value is null, then circular XSDs will 
+        // cause infinite recursive reads.
+        returnInputSource.setSystemId(pathURIStr != null ? pathURIStr : schemaLocation);
+        //TODO: Temporary, please change the following log.info to log.debug
+        log.info("returnInputSource :" + returnInputSource.getSystemId());
+        return returnInputSource;
     }
 
     /**
@@ -169,10 +223,21 @@
                     HTTP_PROTOCOL) || baseURL.getProtocol().equals(HTTPS_PROTOCOL))) {
                 url = new URL(baseURL.getProtocol(), baseURL.getHost(), baseURL.getPort(),
                               resolvedURI.toString());
+                importLocation = url.toString();
             }
             // Check for file
             else if (baseURL.getProtocol() != null && baseURL.getProtocol().equals(FILE_PROTOCOL)) {
                 url = new URL(baseURL.getProtocol(), baseURL.getHost(), resolvedURI.toString());
+                importLocation = url.toString();
+            }
+            // Check for jar
+            else if (baseURL.getProtocol() != null && baseURL.getProtocol().equals(JAR_PROTOCOL)) {
+                importLocation = resolvedURI.toString();  
+                if(importLocation.startsWith(":")){
+                  importLocation = "jar" + importLocation; 
+                } else {
+                  importLocation = "jar:" + importLocation; 
+                }
             }
         }
         catch (MalformedURLException e) {
@@ -181,12 +246,11 @@
                                                                                baseURL.toString()),
                                                            e);
         }
-        if (url == null) {
+        if (importLocation == null) {
             throw ExceptionFactory.makeWebServiceException(Messages.getMessage("schemaImportError",
                                                                                resolvedURI.toString(),
                                                                                baseURL.toString()));
         }
-        importLocation = url.toString();
         return importLocation;
     }
 

Modified: webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java?view=diff&rev=532615&r1=532614&r2=532615
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java (original)
+++ webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java Wed Apr 25 22:19:23 2007
@@ -48,12 +48,15 @@
             return VALID;
         }
 
-        if (!validateWSDLPort()) {
-            return INVALID;
-        }
-
-        if (!validateWSDLBindingType()) {
-            return INVALID;
+        //The following phase II validation can only happen on the server side
+        if (endpointDesc.getServiceDescription().isServerSide()) {
+            if (!validateWSDLPort()) {
+                return INVALID;
+            }
+            
+            if (!validateWSDLBindingType()) {
+                return INVALID;
+            }
         }
 
         if (!validateEndpointInterface()) {

Modified: webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointInterfaceDescriptionValidator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointInterfaceDescriptionValidator.java?view=diff&rev=532615&r1=532614&r2=532615
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointInterfaceDescriptionValidator.java (original)
+++ webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointInterfaceDescriptionValidator.java Wed Apr 25 22:19:23 2007
@@ -66,9 +66,11 @@
         if (portType != null) {
             // TODO: Need more validation here, including: operation name, parameters, faults
             List wsdlOperationList = portType.getOperations();
-            OperationDescription[] opDescArray = epInterfaceDesc.getOperations();
 
-            if (wsdlOperationList.size() != opDescArray.length) {
+            OperationDescription[] dispatchableOpDescArray = 
+                epInterfaceDesc.getDispatchableOperations();
+    
+            if (wsdlOperationList.size() != dispatchableOpDescArray.length) {
                 addValidationFailure(this, "The number of operations in the WSDL " +
                         "portType does not match the number of methods in the SEI or " +
                         "Web service implementation class.");
@@ -76,8 +78,7 @@
             }
 
             // If they are the same size, let's check to see if the operation names match
-
-            if (!checkOperationsMatchMethods(wsdlOperationList, opDescArray)) {
+            if (!checkOperationsMatchMethods(wsdlOperationList, dispatchableOpDescArray)) {
                 addValidationFailure(this, "The operation names in the WSDL portType " +
                         "do not match the method names in the SEI or Web service i" +
                         "mplementation class.");

Modified: webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/validator/ServiceDescriptionValidator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/validator/ServiceDescriptionValidator.java?view=diff&rev=532615&r1=532614&r2=532615
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/validator/ServiceDescriptionValidator.java (original)
+++ webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/validator/ServiceDescriptionValidator.java Wed Apr 25 22:19:23 2007
@@ -18,6 +18,8 @@
  */
 package org.apache.axis2.jaxws.description.validator;
 
+import java.util.Collection;
+
 import org.apache.axis2.jaxws.description.EndpointDescription;
 import org.apache.axis2.jaxws.description.ServiceDescription;
 import org.apache.axis2.jaxws.description.ServiceDescriptionJava;
@@ -60,10 +62,10 @@
     private boolean validateEndpointDescriptions() {
         boolean areAllValid = true;
         // Validate all the Endpoints that were created under this Service Description
-        EndpointDescription[] endpointDescArray = serviceDesc.getEndpointDescriptions();
-        for (EndpointDescription endpointDesc : endpointDescArray) {
-            EndpointDescriptionValidator endpointValidator =
-                    new EndpointDescriptionValidator(endpointDesc);
+        Collection<EndpointDescription> endpointDescs = serviceDesc.getEndpointDescriptions_AsCollection();
+        for (EndpointDescription endpointDesc:endpointDescs) {
+            EndpointDescriptionValidator endpointValidator = new EndpointDescriptionValidator(endpointDesc);
+
             boolean isEndpointValid = endpointValidator.validate();
             if (!isEndpointValid) {
                 addValidationFailure(endpointValidator, "Endpoint failed validation");

Modified: webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/xml/handler/HandlerChainType.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/xml/handler/HandlerChainType.java?view=diff&rev=532615&r1=532614&r2=532615
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/xml/handler/HandlerChainType.java (original)
+++ webservices/axis2/branches/java/1_2/modules/metadata/src/org/apache/axis2/jaxws/description/xml/handler/HandlerChainType.java Wed Apr 25 22:19:23 2007
@@ -19,6 +19,7 @@
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import java.util.ArrayList;
 import java.util.List;
+import javax.xml.namespace.QName;
 
 
 /**
@@ -41,8 +42,8 @@
  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  *       &lt;sequence>
  *         &lt;choice minOccurs="0">
- *           &lt;element name="service-name-pattern" type="{http://java.sun.com/xml/ns/javaee}qname-pattern"/>
- *           &lt;element name="port-name-pattern" type="{http://java.sun.com/xml/ns/javaee}qname-pattern"/>
+ *           &lt;element name="service-name-pattern" type="{http://www.w3.org/2001/XMLSchema}QName"/>
+ *           &lt;element name="port-name-pattern" type="{http://www.w3.org/2001/XMLSchema}QName"/>
  *           &lt;element name="protocol-bindings" type="{http://java.sun.com/xml/ns/javaee}protocol-bindingListType"/>
  *         &lt;/choice>
  *         &lt;element name="handler" type="{http://java.sun.com/xml/ns/javaee}handlerType"
@@ -64,11 +65,9 @@
 public class HandlerChainType {
 
     @XmlElement(name = "service-name-pattern", namespace = "http://java.sun.com/xml/ns/javaee")
-    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
-    protected java.lang.String serviceNamePattern;
+    protected QName serviceNamePattern;
     @XmlElement(name = "port-name-pattern", namespace = "http://java.sun.com/xml/ns/javaee")
-    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
-    protected java.lang.String portNamePattern;
+    protected QName portNamePattern;
     @XmlList
     @XmlElement(name = "protocol-bindings", namespace = "http://java.sun.com/xml/ns/javaee")
     protected List<java.lang.String> protocolBindings;
@@ -84,7 +83,7 @@
      *
      * @return possible object is {@link java.lang.String }
      */
-    public java.lang.String getServiceNamePattern() {
+    public QName getServiceNamePattern() {
         return serviceNamePattern;
     }
 
@@ -93,7 +92,7 @@
      *
      * @param value allowed object is {@link java.lang.String }
      */
-    public void setServiceNamePattern(java.lang.String value) {
+    public void setServiceNamePattern(QName value) {
         this.serviceNamePattern = value;
     }
 
@@ -102,7 +101,7 @@
      *
      * @return possible object is {@link java.lang.String }
      */
-    public java.lang.String getPortNamePattern() {
+    public QName getPortNamePattern() {
         return portNamePattern;
     }
 
@@ -111,7 +110,7 @@
      *
      * @param value allowed object is {@link java.lang.String }
      */
-    public void setPortNamePattern(java.lang.String value) {
+    public void setPortNamePattern(QName value) {
         this.portNamePattern = value;
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org