axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From barre...@apache.org
Subject svn commit: r476249 - in /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description: builder/MDQConstants.java builder/WsdlComposite.java builder/WsdlGenerator.java impl/EndpointDescriptionImpl.java
Date Fri, 17 Nov 2006 18:55:42 GMT
Author: barrettj
Date: Fri Nov 17 10:55:41 2006
New Revision: 476249

URL: http://svn.apache.org/viewvc?view=rev&rev=476249
Log:
AXIS2-1731
Patch contributed by Roy Wood Jr.

Added:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/WsdlComposite.java
Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/MDQConstants.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/WsdlGenerator.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/MDQConstants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/MDQConstants.java?view=diff&rev=476249&r1=476248&r2=476249
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/MDQConstants.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/MDQConstants.java
Fri Nov 17 10:55:41 2006
@@ -36,4 +36,8 @@
     public static final String PROVIDER_SOURCE = "Provider<Source>";
     public static final String PROVIDER_SOAP = "Provider<SOAPMessage>";
     public static final String PROVIDER_DATASOURCE = "Provider<javax.activation.DataSource>";
+
+    public static final String WSDL_FILE_NAME = "WSDL_FILE_NAME";
+    public static final String SCHEMA_DOCS = "SCHEMA_DOCS";
+    public static final String WSDL_COMPOSITE = "WSDL_COMPOSITE";
 }

Added: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/WsdlComposite.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/WsdlComposite.java?view=auto&rev=476249
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/WsdlComposite.java
(added)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/WsdlComposite.java
Fri Nov 17 10:55:41 2006
@@ -0,0 +1,63 @@
+package org.apache.axis2.jaxws.description.builder;
+
+import java.util.HashMap;
+import javax.wsdl.Definition;
+import org.apache.axiom.om.OMDocument;
+
+public class WsdlComposite {
+
+	Definition wsdlDefinition;
+	
+	HashMap <String, OMDocument> schemaMap;
+	
+	String wsdlFileName;
+
+	public WsdlComposite() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @return Returns the schemaMap.
+	 */
+	public HashMap<String, OMDocument> getSchemaMap() {
+		return schemaMap;
+	}
+
+	/**
+	 * @return Returns the wsdlDefinition.
+	 */
+	public Definition getWsdlDefinition() {
+		return wsdlDefinition;
+	}
+
+	/**
+	 * @return Returns the wsdlFileName.
+	 */
+	public String getWsdlFileName() {
+		return wsdlFileName;
+	}
+
+	/**
+	 * @param schemaMap The schemaMap to set.
+	 */
+	public void setSchemaMap(HashMap<String, OMDocument> schemaMap) {
+		this.schemaMap = schemaMap;
+	}
+
+	/**
+	 * @param wsdlDefinition The wsdlDefinition to set.
+	 */
+	public void setWsdlDefinition(Definition wsdlDefinition) {
+		this.wsdlDefinition = wsdlDefinition;
+	}
+
+	/**
+	 * @param wsdlFileName The wsdlFileName to set.
+	 */
+	public void setWsdlFileName(String wsdlFileName) {
+		this.wsdlFileName = wsdlFileName;
+	}
+	
+	
+}

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/WsdlGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/WsdlGenerator.java?view=diff&rev=476249&r1=476248&r2=476249
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/WsdlGenerator.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/builder/WsdlGenerator.java
Fri Nov 17 10:55:41 2006
@@ -1,8 +1,8 @@
 package org.apache.axis2.jaxws.description.builder;
 
-import javax.wsdl.Definition;
+import javax.xml.ws.WebServiceException;
 
 public interface WsdlGenerator {
 
-	public Definition generateWsdl(Class implClass);
+	public WsdlComposite generateWsdl(String implClass)throws WebServiceException;
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java?view=diff&rev=476249&r1=476248&r2=476249
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
Fri Nov 17 10:55:41 2006
@@ -55,6 +55,7 @@
 import org.apache.axis2.jaxws.description.ServiceDescriptionWSDL;
 import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
 import org.apache.axis2.jaxws.description.builder.MDQConstants;
+import org.apache.axis2.jaxws.description.builder.WsdlComposite;
 import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.axis2.jaxws.util.WSDL4JWrapper;
 import org.apache.commons.logging.Log;
@@ -241,17 +242,24 @@
         
         buildDescriptionHierachy();
         
-        //Invoke the callback for generating the wsdl
+    	WsdlComposite wsdlComposite = null;
+        
+    	//Invoke the callback for generating the wsdl
         if (composite.getCustomWsdlGenerator() != null) {
-        	Definition wsdlDef = 
-        		composite.getCustomWsdlGenerator().generateWsdl((Class)axisService.getParameterValue(MDQConstants.SERVICE_CLASS));
+        	wsdlComposite = 
+        		composite.getCustomWsdlGenerator().generateWsdl((String)axisService.getParameterValue(MDQConstants.SERVICE_CLASS));
    					
+        	Definition wsdlDef = wsdlComposite.getWsdlDefinition();
+        	
         	try {
     			WSDL4JWrapper wsdl4jWrapper = new WSDL4JWrapper(composite.getWsdlURL(), wsdlDef);
     			getServiceDescriptionImpl().setGeneratedWsdlWrapper(wsdl4jWrapper);
             } catch (Exception e) {
                 throw ExceptionFactory.makeWebServiceException("EndpointDescriptionImpl:
WSDLException thrown when attempting to instantiate WSDL4JWrapper ");
             }
+        } else {
+        	//TODO:Determine if we should always throw an exception on this, or at this point
+            //throw ExceptionFactory.makeWebServiceException("EndpointDescriptionImpl: Unable
to find custom WSDL generator");
         }
 
         //Save the WSDL Definition
@@ -276,9 +284,33 @@
         wsdlLocationParameter.setName(MDQConstants.WSDL_LOCATION);
         wsdlLocationParameter.setValue(getAnnoWebServiceWSDLLocation());
 
+        //Save the WSDL File Name
+        //REVIEW: is it possible this won't always be set
+        Parameter wsdlFileName = new Parameter();
+        wsdlFileName.setName(MDQConstants.WSDL_FILE_NAME);
+        
+        //Save the Schema Doc
+        //REVIEW: is it possible this won't always be set
+        Parameter schemaDocs = new Parameter();
+        schemaDocs.setName(MDQConstants.SCHEMA_DOCS);
+        
+        //Save the WSDL Composite
+        //REVIEW: is it possible this won't always be set
+        Parameter wsdlCompositeParameter = new Parameter();
+        wsdlCompositeParameter.setName(MDQConstants.WSDL_COMPOSITE);
+        wsdlCompositeParameter.setValue(wsdlComposite);
+        
+        if (wsdlComposite != null) {
+        	wsdlFileName.setValue(wsdlComposite.getWsdlFileName());
+        	schemaDocs.setValue(wsdlComposite.getSchemaMap());
+        }
+        
         try {
         	axisService.addParameter(wsdlDefParameter);
         	axisService.addParameter(wsdlLocationParameter);                        
+        	axisService.addParameter(wsdlFileName);
+        	axisService.addParameter(schemaDocs); 
+        	axisService.addParameter(wsdlCompositeParameter);
         } catch (Exception e) {
         	throw ExceptionFactory.makeWebServiceException("EndpointDescription: Unable to add
parms. to AxisService");
         }



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


Mime
View raw message