axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ngalla...@apache.org
Subject svn commit: r431786 - in /webservices/axis2/trunk/java/modules/jaxws: ./ src/org/apache/axis2/jaxws/core/ src/org/apache/axis2/jaxws/i18n/ src/org/apache/axis2/jaxws/server/ src/org/apache/axis2/jaxws/server/dispatcher/ test/org/apache/axis2/jaxws/fram...
Date Wed, 16 Aug 2006 03:18:28 GMT
Author: ngallardo
Date: Tue Aug 15 20:18:27 2006
New Revision: 431786

URL: http://svn.apache.org/viewvc?rev=431786&view=rev
Log:
AXIS2-1034

This the first pass at adding support for dispatching to JAX-WS based Java beans.

Added:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/EndpointDispatcher.java
      - copied, changed from r431362, webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointDispatcher.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaDispatcher.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java
      - copied, changed from r431362, webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/ProviderDispatcher.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/AddressBookTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddEntry.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddEntryResponse.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBook.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBookEntry.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBookImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/META-INF/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/META-INF/AddressBookService.wsdl
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/META-INF/services.xml
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/ObjectFactory.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/package-info.java
Removed:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointDispatcher.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/ProviderDispatcher.java
Modified:
    webservices/axis2/trunk/java/modules/jaxws/maven.xml
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/MessageContext.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java

Modified: webservices/axis2/trunk/java/modules/jaxws/maven.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/maven.xml?rev=431786&r1=431785&r2=431786&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/jaxws/maven.xml Tue Aug 15 20:18:27 2006
@@ -162,6 +162,19 @@
                 <ant:include name="org/apache/axis2/jaxws/server/**"/>
 			</ant:fileset>
 		</ant:copy>
+		
+        <!-- ================================================================ -->
+        <!--- Java Bean Endpoint Samples -->
+        <!-- ================================================================ -->
+		<ant:copy toDir="target/test-classes/services/AddressBookService/">
+		  <ant:fileset dir="target/test-classes">
+		    <ant:include name="org/apache/axis2/jaxws/sample/addressbook/**"/>
+		  </ant:fileset>
+		  <ant:fileset dir="test/org/apache/axis2/jaxws/sample/addressbook">
+		    <ant:include name="META-INF/**"/>
+		  </ant:fileset>
+		</ant:copy>
+		
 	</preGoal>
 
     <!-- Create the API and Impl jars --> 

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/MessageContext.java?rev=431786&r1=431785&r2=431786&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/MessageContext.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/MessageContext.java Tue Aug 15 20:18:27 2006
@@ -19,10 +19,17 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.xml.namespace.QName;
 import javax.xml.ws.Service.Mode;
 
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.jaxws.ExceptionFactory;
+import org.apache.axis2.jaxws.description.OperationDescription;
 import org.apache.axis2.jaxws.description.ServiceDescription;
 import org.apache.axis2.jaxws.message.Message;
+import org.apache.axis2.jaxws.message.factory.MessageFactory;
+import org.apache.axis2.jaxws.registry.FactoryRegistry;
 
 /**
  * The <code>org.apache.axis2.jaxws.core.MessageContext</code> is
@@ -41,6 +48,8 @@
     private org.apache.axis2.context.MessageContext axisMsgCtx;
     private Map<String, Object> properties;
     private ServiceDescription serviceDesc;
+    private OperationDescription operationDesc;
+    private QName operationName;    //FIXME: This should become the OperationDescription
     private Message message;
     private Mode mode;
         
@@ -52,6 +61,21 @@
     public MessageContext(org.apache.axis2.context.MessageContext mc) {
         axisMsgCtx = mc;
         properties = new HashMap<String, Object>();
+        
+        //If the Axis2 MessageContext that was passed in already had a SOAPEnvelope
+        //set on it, grab that and create a JAX-WS Message out of it.
+        SOAPEnvelope soapEnv = mc.getEnvelope();
+        if (soapEnv != null) {
+            MessageFactory msgFactory = (MessageFactory) FactoryRegistry.getFactory(MessageFactory.class);
+            Message newMessage = null;
+            try {
+                newMessage = msgFactory.createFrom(soapEnv);
+            } catch (Exception e) {
+                throw ExceptionFactory.makeWebServiceException("Could not create new Message");
+            }
+            
+            message = newMessage;
+        }
     }
     
     public Map<String, Object> getProperties() {   
@@ -66,6 +90,14 @@
         serviceDesc = sd;
     }
     
+    public OperationDescription getOperationDescription() {
+        return operationDesc;
+    }
+    
+    public void setOperationDescription(OperationDescription od) {
+        operationDesc = od;
+    }
+    
     public Mode getMode() {
         return mode;
     }
@@ -74,8 +106,14 @@
         mode = m;
     }
     
-    public String getOperationName() {
-        return null;
+    //FIXME: This should become the OperationDescription
+    public QName getOperationName() {
+        return operationName;
+    }
+    
+    //FIXME: This should become the OperationDescription
+    public void setOperationName(QName op) {
+        operationName = op;
     }
     
     public void setMessage(Message msg) {
@@ -88,5 +126,13 @@
     
     public org.apache.axis2.context.MessageContext getAxisMessageContext() {
         return axisMsgCtx;
+    }
+    
+    public ClassLoader getClassLoader() {
+        AxisService svc = axisMsgCtx.getAxisService();
+        if (svc != null)
+            return svc.getClassLoader();
+        else
+            return null;
     }
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties?rev=431786&r1=431785&r2=431786&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties Tue Aug 15 20:18:27 2006
@@ -59,9 +59,7 @@
 ICCreateOpClientErr2=Cannot create OperationClient.  Operation qname is null.
 proxyErr1=An attempt was made to invoke method {0}, but this method is not available on the javax.xml.ws.BindingProvider or {1} class.
 JAXWSMessageReceiverNoServiceClass=No service class was found for this AxisService.
-EndpointControllerErr1=The EndpointController received a null SOAPEnvelope.  Processing cannot contine.
 EndpointControllerErr2=No Service class is configured for this endpoint.  Processing cannot continue.
-EndpointControllerErr3=Error loading provider implementation. The service implementation class {0} must implement javax.xml.ws.Provider.
 EndpointControllerErr4=Error loading the provider implementation class {0}.  Processing cannot continue.
 BlockImplErr1=Internal Error.  The block for {0} is already consumed.  Processing cannot continue.
 XMLPartImplErr1=Internal Error.  The XML part is already consumed.  Processing cannot continue.
@@ -94,3 +92,5 @@
 JAXBSourceNamespaceErr=The DOMSource must be Namespace Aware.
 AttachmentsNotSupported=SAAJ Attachments are not supported yet.
 protoNotFound00=An associated Protocol was not found for the binding {0}.
+JavaDispErr1=No service implementation class was found.
+JavaDispErr2=Unable to load service implementation class {0}.

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java?rev=431786&r1=431785&r2=431786&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java Tue Aug 15 20:18:27 2006
@@ -18,16 +18,17 @@
 
 import javax.xml.ws.Provider;
 
-import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.jaxws.ExceptionFactory;
 import org.apache.axis2.jaxws.core.InvocationContext;
 import org.apache.axis2.jaxws.core.MessageContext;
+import org.apache.axis2.jaxws.description.DescriptionFactory;
+import org.apache.axis2.jaxws.description.ServiceDescription;
 import org.apache.axis2.jaxws.i18n.Messages;
-import org.apache.axis2.jaxws.message.Message;
-import org.apache.axis2.jaxws.message.factory.MessageFactory;
-import org.apache.axis2.jaxws.registry.FactoryRegistry;
+import org.apache.axis2.jaxws.server.dispatcher.EndpointDispatcher;
+import org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher;
+import org.apache.axis2.jaxws.server.dispatcher.ProviderDispatcher;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -58,25 +59,13 @@
     public InvocationContext invoke(InvocationContext ic) {
         try {
             MessageContext requestMsgCtx = ic.getRequestMessageContext();
-            org.apache.axis2.context.MessageContext axisRequestMsgCtx = 
-                requestMsgCtx.getAxisMessageContext();
-            
-            // As the request comes in, the SOAP message will first exist only
-            // on the Axis2 MessageContext.  We need to get it from there and 
-            // wrap it with the JAX-WS Message model abstraction.  This will 
-            // allow us to get the params out in a number of forms later on.
-            SOAPEnvelope soapEnv = axisRequestMsgCtx.getEnvelope();
-            if (soapEnv == null) {
-                throw ExceptionFactory.makeWebServiceException(Messages.getMessage("EndpointControllerErr1"));
-            }
+
+            String implClassName = getServiceImplClassName(requestMsgCtx);
             
-            MessageFactory msgFactory = (MessageFactory) FactoryRegistry.getFactory(MessageFactory.class);
-            Message requestMsg = msgFactory.createFrom(soapEnv);
-            requestMsgCtx.setMessage(requestMsg);
+            Class implClass = loadServiceImplClass(implClassName, 
+                    requestMsgCtx.getClassLoader());
             
-            // Get the appropriate EndpointDispatcher instance based on the 
-            // information availabe in the MessageContext.
-            EndpointDispatcher dispatcher = getDispatcher(axisRequestMsgCtx);
+            EndpointDispatcher dispatcher = getEndpointDispatcher(implClass);
             
             MessageContext responseMsgContext = dispatcher.invoke(requestMsgCtx);
             
@@ -90,62 +79,52 @@
     }
     
     /*
-	 * Get the appropriate dispatcher for a given service endpoint.  If the 
-     * target endpoint implements the javax.xml.ws.Provider<T> interface, then
-     * the ProviderDispatcher should be returned.  Other wise, it should be
-     * the JavaBeanDispatcher.
+	 * Get the appropriate EndpointDispatcher for a given service endpoint.
 	 */
-	private EndpointDispatcher getDispatcher(org.apache.axis2.context.MessageContext msgContext) throws Exception {
-		EndpointDispatcher dispatcherInstance = null;
-    	
-        // The PARAM_SERVICE_CLASS property that is set on the AxisService
-        // will tell us what the implementation
-        AxisService as = msgContext.getAxisService();
-    	Parameter asp = as.getParameter(PARAM_SERVICE_CLASS);
-    	
-        // If there was no implementation class, we should not go any further
-        if (asp == null) {
-            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("EndpointControllerErr2"));
-        }
-        
-        // Load the service implementation class  
-    	Class cls = getImplClass(as.getClassLoader(), asp);
-        
-        // Check to see whether the class that was specified is an instance
-        // of the javax.xml.ws.Provider.  If not, stop processing.
-    	if(cls.getSuperclass().isInstance(Provider.class)) {
-    		ProviderDispatcher pd = new ProviderDispatcher(cls);
-    		dispatcherInstance = pd;
+	private EndpointDispatcher getEndpointDispatcher(Class serviceImplClass) 
+        throws Exception {
+        if(Provider.class.isAssignableFrom(serviceImplClass)) {
+    		return new ProviderDispatcher(serviceImplClass);
     	}
         else {
-            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("EndpointControllerErr3", cls.getName()));
+            return new JavaBeanDispatcher(serviceImplClass);
         }
-    	
-    	return dispatcherInstance;
     }
 	
 	/*
      * Tries to load the implementation class that was specified for the
-     * target endpoint using the supplied ClassLoader.  
+     * target endpoint
 	 */
-	private Class getImplClass(ClassLoader cl, Parameter param){
-		Class _class = null;
+	private Class loadServiceImplClass(String className, ClassLoader cl) {
+        if (log.isDebugEnabled()) {
+            log.debug("Attempting to load service impl class: " + className);
+        }    
         
-        // TODO: What should be done if the supplied ClassLoader is null?
-		String className = null;
-		try{
-			className = ((String) param.getValue()).trim();
-			
-            if (log.isDebugEnabled()) {
-                log.debug("Attempting to load service impl class: " + className);
-            }
-            
-            _class = Class.forName(className, true, cl);
-		}catch(java.lang.ClassNotFoundException cnf ){
-			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("EndpointControllerErr4", className));
+        try {
+		    //TODO: What should be done if the supplied ClassLoader is null?
+            Class _class = Class.forName(className, true, cl);
+            return _class;
+		} catch(ClassNotFoundException cnf ){
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage(
+                    "EndpointControllerErr4", className));
 		}
-		
-		return _class;
 	}
+    
+    private String getServiceImplClassName(MessageContext mc) {
+        // The PARAM_SERVICE_CLASS property that is set on the AxisService
+        // will tell us what the service implementation class is.
+        org.apache.axis2.context.MessageContext axisMsgContext = mc.getAxisMessageContext();
+        AxisService as = axisMsgContext.getAxisService();
+        Parameter param = as.getParameter(PARAM_SERVICE_CLASS);
+        
+        // If there was no implementation class, we should not go any further
+        if (param == null) {
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage(
+                    "EndpointControllerErr2"));
+        }
+        
+        String className = ((String) param.getValue()).trim();
+        return className;
+    }
 	
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java?rev=431786&r1=431785&r2=431786&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java Tue Aug 15 20:18:27 2006
@@ -28,6 +28,7 @@
 import org.apache.axis2.jaxws.core.InvocationContext;
 import org.apache.axis2.jaxws.core.InvocationContextImpl;
 import org.apache.axis2.jaxws.core.MessageContext;
+import org.apache.axis2.jaxws.description.ServiceDescription;
 import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.axis2.jaxws.message.Message;
 import org.apache.axis2.jaxws.util.Constants;
@@ -78,13 +79,19 @@
             //This assumes that we are on the ultimate execution thread
             ThreadContextMigratorUtil.performMigrationToThread(Constants.THREAD_CONTEXT_MIGRATOR_LIST_ID, axisRequestMsgCtx);
             
-            //Get the appropriate endpoint dispatcher for this service
+            //We'll need an instance of the EndpointController to actually
+            //drive the invocation.
+            //TODO: More work needed to determine the lifecycle of this thing
         	EndpointController endpointCtlr = new EndpointController();
           	
             InvocationContext ic = new InvocationContextImpl();
             MessageContext requestMsgCtx = new MessageContext(axisRequestMsgCtx);
             ic.setRequestMessageContext(requestMsgCtx);
             
+            //TODO:Once we the JAX-WS MessageContext one of the next things that
+            //needs to be done here is setting up all of the javax.xml.ws.* 
+            //properties for the MessageContext.
+            
             if (isMepInOnly(mep)) {
             	endpointCtlr.invoke(ic);
             }
@@ -128,6 +135,11 @@
     }
     
     private boolean isMepInOnly(String mep){
-    	return mep.equals(WSDL20_2004Constants.MEP_URI_ROBUST_IN_ONLY) || mep.equals(WSDL20_2004Constants.MEP_URI_IN_ONLY) || mep.equals(WSDL20_2004Constants.MEP_CONSTANT_ROBUST_IN_ONLY) || mep.equals(WSDL20_2004Constants.MEP_CONSTANT_IN_ONLY);
+    	boolean inOnly = mep.equals(WSDL20_2004Constants.MEP_URI_ROBUST_IN_ONLY) || 
+            mep.equals(WSDL20_2004Constants.MEP_URI_IN_ONLY) || 
+            mep.equals(WSDL20_2004Constants.MEP_CONSTANT_ROBUST_IN_ONLY) || 
+            mep.equals(WSDL20_2004Constants.MEP_CONSTANT_IN_ONLY);
+        return inOnly;
     }
+
 }

Copied: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/EndpointDispatcher.java (from r431362, webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointDispatcher.java)
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/EndpointDispatcher.java?p2=webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/EndpointDispatcher.java&p1=webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointDispatcher.java&r1=431362&r2=431786&rev=431786&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/EndpointDispatcher.java Tue Aug 15 20:18:27 2006
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.axis2.jaxws.server;
+package org.apache.axis2.jaxws.server.dispatcher;
 
 import org.apache.axis2.jaxws.core.MessageContext;
 
@@ -23,15 +23,15 @@
  * The EndpointDispatcher is an abstraction for the object that will be doing
  * the invocation of an endpoints target Java object.  
  */
-public abstract class EndpointDispatcher {
+public interface EndpointDispatcher {
 
     /**
      * Invoke the target endpoint synchronously 
      * 
      * @param mc
      * @return
-     * @throws Exception
      */
-    public abstract MessageContext invoke(MessageContext mc) throws Exception;
+    public MessageContext invoke(MessageContext mc)
+        throws Exception;
 
 }

Added: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java?rev=431786&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java Tue Aug 15 20:18:27 2006
@@ -0,0 +1,260 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * Copyright 2006 International Business Machines Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.jaxws.server.dispatcher;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.namespace.QName;
+import javax.xml.ws.RequestWrapper;
+
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.jaxws.ExceptionFactory;
+import org.apache.axis2.jaxws.core.MessageContext;
+import org.apache.axis2.jaxws.core.util.MessageContextUtils;
+import org.apache.axis2.jaxws.description.DescriptionFactory;
+import org.apache.axis2.jaxws.description.EndpointDescription;
+import org.apache.axis2.jaxws.description.EndpointInterfaceDescription;
+import org.apache.axis2.jaxws.description.OperationDescription;
+import org.apache.axis2.jaxws.description.ServiceDescription;
+import org.apache.axis2.jaxws.message.Block;
+import org.apache.axis2.jaxws.message.Message;
+import org.apache.axis2.jaxws.message.factory.BlockFactory;
+import org.apache.axis2.jaxws.message.factory.JAXBBlockFactory;
+import org.apache.axis2.jaxws.message.factory.MessageFactory;
+import org.apache.axis2.jaxws.registry.FactoryRegistry;
+import org.apache.axis2.jaxws.wrapper.JAXBWrapperTool;
+import org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperToolImpl;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * The JavaBeanDispatcher is used to manage creating an instance of a 
+ * JAX-WS service implementation bean and dispatching the inbound 
+ * request to that instance.
+ */
+public class JavaBeanDispatcher extends JavaDispatcher {
+
+    private static final Log log = LogFactory.getLog(JavaBeanDispatcher.class);
+    
+    private Object serviceInstance;
+    
+    public JavaBeanDispatcher(Class implClass) {
+        super(implClass);
+    }
+    
+    /*
+     * (non-Javadoc)
+     * @see org.apache.axis2.jaxws.server.EndpointDispatcher#invoke(org.apache.axis2.jaxws.core.MessageContext)
+     */
+    public MessageContext invoke(MessageContext mc) throws Exception {
+        if (log.isDebugEnabled()) {
+            log.debug("Preparing to invoke service endpoint implementation " +
+                    "class: " + serviceImplClass.getName());
+        }
+
+        //FIXME: This block should be in the EndpointController.  We'll hold off on that
+        //though until this is up and running.
+        ServiceDescription serviceDesc = getServiceDescription(mc, serviceImplClass);
+        mc.setServiceDescription(serviceDesc);
+        mc.setOperationName(mc.getAxisMessageContext().getAxisOperation().getName());
+        OperationDescription opDesc = getOperationDescription(mc);
+        mc.setOperationDescription(opDesc);
+        
+        Method target = resolveJavaMethodForOperation(mc);
+        Object[] params = getParameterData(target, mc);
+
+        //At this point, we have the method that is going to be invoked and
+        //the parameter data to invoke it with, so create an instance and 
+        //do the invoke.
+        serviceInstance = createServiceInstance();
+        Object response = target.invoke(serviceInstance, params);
+        
+        Block responseBlock = createResponseWrapper(response, opDesc);
+
+        //Create the Message for the response
+        MessageFactory factory = (MessageFactory) FactoryRegistry.getFactory(
+                MessageFactory.class);
+        Message message = factory.create(mc.getMessage().getProtocol());
+        message.setBodyBlock(0, responseBlock);
+
+        MessageContext responseMsgCtx = MessageContextUtils.createMessageMessageContext(mc);
+        responseMsgCtx.setMessage(message);
+        
+        return responseMsgCtx;
+    }
+    
+    /*
+     * Find the Java method that corresponds to the WSDL operation that was 
+     * targeted by the Axis2 Dispatchers.
+     */
+    private Method resolveJavaMethodForOperation(MessageContext mc) {
+        QName opName = mc.getOperationName();
+        if (opName == null)
+            throw ExceptionFactory.makeWebServiceException("Operation name was not set");
+        
+        String localPart = opName.getLocalPart();
+        Method[] methods = serviceImplClass.getMethods();
+        for (int i = 0; i < methods.length; ++i) {
+            if (localPart.equals(methods[i].getName()))
+                return methods[i];
+        }
+        
+        if (log.isDebugEnabled()) {
+            log.debug("No Java method found for the operation");
+        }
+        
+        throw ExceptionFactory.makeWebServiceException("No Java method was found for the operation");
+    }
+    
+    /*
+     * Takes the contents of the message and uses that to prepare the parameters
+     * for the method that will be invoked.
+     */
+    private Object[] getParameterData(Method method, MessageContext mc) {
+        Class[] params = method.getParameterTypes();
+        
+        // If there are no params, we don't need to do anything.
+        if (params.length == 0)
+            return null;
+
+        try {
+            OperationDescription opDesc = mc.getOperationDescription();
+            
+            JAXBContext jbc = createJAXBContext(opDesc);
+            BlockFactory factory = (BlockFactory) FactoryRegistry.getFactory(JAXBBlockFactory.class);
+            
+            Message msg = mc.getMessage();
+            Block wrapper = msg.getBodyBlock(0, jbc, factory);
+            
+            JAXBWrapperTool wrapperTool = new JAXBWrapperToolImpl();
+            
+            WebParam[] webParams = opDesc.getWebParam();
+            ArrayList<String> elements = new ArrayList<String>();
+            for (int i = 0; i < webParams.length; ++i) {
+                elements.add(webParams[i].name());
+            }
+            
+            Object param = wrapper.getBusinessObject(true);
+            Object[] contents = wrapperTool.unWrap(param, elements);
+            return contents;
+        } catch (Exception e) {
+            throw ExceptionFactory.makeWebServiceException(e);
+        }
+    }
+    
+    /*
+     * Gets the ServiceDescription associated with the request that is currently
+     * being processed. 
+     */
+    //FIXME: This method should be in the EndpointController
+    private ServiceDescription getServiceDescription(MessageContext mc, Class implClass) {
+        AxisService axisSvc = mc.getAxisMessageContext().getAxisService();
+        
+        //Check to see if we've already created a ServiceDescription for this
+        //service before trying to create a new one. 
+        if (axisSvc.getParameter("JAXWS_SERVICE_DESCRIPTION") != null) {
+            Parameter param = axisSvc.getParameter("JAXWS_SERVICE_DESCRIPTION");
+            ServiceDescription sd = (ServiceDescription) param.getValue();
+            return sd;
+        }
+        else {
+            ServiceDescription sd = DescriptionFactory.
+                createServiceDescriptionFromServiceImpl(implClass, axisSvc);
+            return sd;
+        }
+    }
+    
+    /*
+     * Gets the OperationDescription associated with the request that is currently
+     * being processed. 
+     */
+    //FIXME: This method should be in the EndpointController
+    private OperationDescription getOperationDescription(MessageContext mc) {
+        ServiceDescription sd = mc.getServiceDescription();
+        EndpointDescription[] eds = sd.getEndpointDescriptions();
+        EndpointDescription ed = eds[0];
+        EndpointInterfaceDescription eid = ed.getEndpointInterfaceDescription();
+        
+        OperationDescription[] ops = eid.getOperation(mc.getOperationName());
+        OperationDescription op = ops[0];
+        
+        if (log.isDebugEnabled()) {
+            log.debug("wsdl operation: " + op.getName());
+            log.debug("   java method: " + op.getJavaMethodName());
+        }
+        
+        return op;        
+    }
+    
+    private JAXBContext createJAXBContext(OperationDescription opDesc) {
+        // This will only support Doc/Lit Wrapped params for now.
+        try {
+            RequestWrapper wrapper = opDesc.getRequestWrapper();
+            if (wrapper != null) {
+                String wrapperClass = wrapper.className();
+                String wrapperPkg = wrapperClass.substring(0, wrapperClass.lastIndexOf("."));
+                JAXBContext jbc = JAXBContext.newInstance(wrapperPkg);
+                return jbc;
+            }
+            else {
+                throw ExceptionFactory.makeWebServiceException("");
+            }
+        } catch (JAXBException e) {
+            throw ExceptionFactory.makeWebServiceException(e);
+        }
+    }
+    
+    private Block createResponseWrapper(Object response, OperationDescription opDesc) {
+        try {
+            //We'll need a JAXBContext to marshall the response object(s).
+            JAXBContext jbc = createJAXBContext(opDesc);
+            BlockFactory bfactory = (BlockFactory) FactoryRegistry.getFactory(
+                    JAXBBlockFactory.class);
+            
+            String responseWrapper = opDesc.getResponseWrapper().className();
+            Class responseWrapperClass = Class.forName(responseWrapper);
+            JAXBWrapperTool wrapperTool = new JAXBWrapperToolImpl();
+
+            WebResult webResult = opDesc.getWebResult();
+            ArrayList<String> responseParams = new ArrayList<String>();
+            responseParams.add(webResult.name());
+ 
+            ArrayList<String> elements = new ArrayList<String>();
+            elements.add(webResult.name());
+            
+            Map<String, Object> responseParamValues = new HashMap<String, Object>();
+            responseParamValues.put(webResult.name(), response);
+            
+            Object wrapper = wrapperTool.wrap(responseWrapperClass, 
+                    responseWrapper, responseParams, responseParamValues);
+            
+            Block block = bfactory.createFrom(wrapper ,jbc, null);
+            return block;
+        } catch (Exception e) {
+            throw ExceptionFactory.makeWebServiceException(e);
+        }
+    }
+    
+}

Added: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaDispatcher.java?rev=431786&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaDispatcher.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaDispatcher.java Tue Aug 15 20:18:27 2006
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * Copyright 2006 International Business Machines Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.jaxws.server.dispatcher;
+
+import org.apache.axis2.jaxws.ExceptionFactory;
+import org.apache.axis2.jaxws.core.MessageContext;
+import org.apache.axis2.jaxws.i18n.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * JavaDispatcher is an abstract class that can be extended to implement
+ * an EndpointDispatcher to a Java object.  
+ */
+public abstract class JavaDispatcher implements EndpointDispatcher {
+
+    private static final Log log = LogFactory.getLog(JavaDispatcher.class);
+    
+    protected Class serviceImplClass;
+    
+    protected JavaDispatcher(Class impl) {
+        serviceImplClass = impl;
+    }
+    
+    public abstract MessageContext invoke(MessageContext mc)
+        throws Exception;
+    
+    public Class getServiceImplementationClass() {
+        return serviceImplClass;
+    }
+    
+    protected Object createServiceInstance() {
+        if (log.isDebugEnabled()) {
+            log.debug("Creating new instance of service endpoint");
+        }
+        
+        if (serviceImplClass == null) {
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage(
+                    "JavaDispErr1"));
+        }
+        
+        Object instance = null;
+        try {
+            instance = serviceImplClass.newInstance();
+        } catch (IllegalAccessException e) {
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage(
+                    "JavaDispErr2", serviceImplClass.getName()));
+        } catch (InstantiationException e) {
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage(
+                    "JavaDispErr2", serviceImplClass.getName()));
+        }
+        
+        return instance;
+    }
+
+}

Copied: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java (from r431362, webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/ProviderDispatcher.java)
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java?p2=webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java&p1=webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/ProviderDispatcher.java&r1=431362&r2=431786&rev=431786&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/ProviderDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java Tue Aug 15 20:18:27 2006
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.axis2.jaxws.server;
+package org.apache.axis2.jaxws.server.dispatcher;
 
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
@@ -54,12 +54,11 @@
  * javax.xml.transform.Source
  *
  */
-public class ProviderDispatcher extends EndpointDispatcher{
+public class ProviderDispatcher extends JavaDispatcher{
 	
     private static Log log = LogFactory.getLog(ProviderDispatcher.class);
     
     private BlockFactory blockFactory = null;
-    private Class svcImplClass = null;
 	private Class providerType = null;
     private Provider providerInstance = null;
     private Message message = null;
@@ -71,7 +70,7 @@
 	 * @param _class
 	 */
 	public ProviderDispatcher(Class _class) {
-		this.svcImplClass = _class;
+		super(_class);
 	}
     
     /* (non-Javadoc)
@@ -204,16 +203,16 @@
         
         Provider provider = null;
     	if(clazz == String.class){
-    		provider = (Provider<String>) this.svcImplClass.newInstance();
+    		provider = (Provider<String>) serviceImplClass.newInstance();
     	}
         else if(clazz == Source.class){
-    		provider = (Provider<Source>) this.svcImplClass.newInstance();
+    		provider = (Provider<Source>) serviceImplClass.newInstance();
     	}
         else if(clazz == SOAPMessage.class){
-    		provider = (Provider<SOAPMessage>) this.svcImplClass.newInstance();
+    		provider = (Provider<SOAPMessage>) serviceImplClass.newInstance();
     	}
         else if(clazz == JAXBContext.class){
-    		provider = (Provider<JAXBContext>)this.svcImplClass.newInstance();
+    		provider = (Provider<JAXBContext>) serviceImplClass.newInstance();
     	}
     	
         if (provider == null) {
@@ -231,7 +230,7 @@
 
     	Class providerType = null;
     	
-    	Type[] giTypes = this.svcImplClass.getGenericInterfaces();
+    	Type[] giTypes = serviceImplClass.getGenericInterfaces();
     	for(Type giType : giTypes){
     		ParameterizedType paramType = null;
     		try{

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java?rev=431786&r1=431785&r2=431786&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java Tue Aug 15 20:18:27 2006
@@ -37,6 +37,7 @@
 import org.apache.axis2.jaxws.message.SOAP12Tests;
 import org.apache.axis2.jaxws.message.XMLStreamReaderSplitterTests;
 import org.apache.axis2.jaxws.provider.*;
+import org.apache.axis2.jaxws.sample.AddressBookTests;
 import org.apache.axis2.proxy.ProxyTests;
 
 public class JAXWSTest extends TestCase {
@@ -73,6 +74,8 @@
         
         suite.addTestSuite(ExceptionFactoryTests.class);
 
+        suite.addTestSuite(AddressBookTests.class);
+        
         // Start (and stop) the server only once for all the tests
         TestSetup testSetup = new TestSetup(suite) {
             public void setUp() {

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/AddressBookTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/AddressBookTests.java?rev=431786&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/AddressBookTests.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/AddressBookTests.java Tue Aug 15 20:18:27 2006
@@ -0,0 +1,51 @@
+package org.apache.axis2.jaxws.sample;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.Service.Mode;
+import javax.xml.ws.soap.SOAPBinding;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.jaxws.sample.addressbook.AddEntry;
+import org.apache.axis2.jaxws.sample.addressbook.AddEntryResponse;
+import org.apache.axis2.jaxws.sample.addressbook.AddressBookEntry;
+import org.apache.axis2.jaxws.sample.addressbook.ObjectFactory;
+
+public class AddressBookTests extends TestCase {
+
+    private static final String NAMESPACE = "http://org/apache/axis2/jaxws/sample/addressbook";
+    private static final QName QNAME_SERVICE = new QName(
+            NAMESPACE, "AddressBookService");
+    private static final QName QNAME_PORT = new QName(
+            NAMESPACE, "AddressBook");
+    private static final String URL_ENDPOINT = "http://localhost:8080/axis2/services/AddressBookService";
+    
+    public void testAddressBookEndpoint() throws Exception {
+        JAXBContext jbc = JAXBContext.newInstance("org.apache.axis2.jaxws.sample.addressbook");
+        
+        // Create the JAX-WS client needed to send the request
+        Service service = Service.create(QNAME_SERVICE);
+        service.addPort(QNAME_PORT, SOAPBinding.SOAP12HTTP_BINDING, URL_ENDPOINT);
+        Dispatch<Object> dispatch = service.createDispatch(
+                QNAME_PORT, jbc, Mode.PAYLOAD);
+                
+        ObjectFactory factory = new ObjectFactory();
+        AddEntry request = factory.createAddEntry();
+        AddressBookEntry content = factory.createAddressBookEntry();
+        
+        content.setFirstName("Ron");
+        content.setLastName("Testerson");
+        content.setPhone("512-459-2222");
+        
+        request.setEntry(content);
+        
+        AddEntryResponse response = (AddEntryResponse) dispatch.invoke(request);
+        
+        assertNotNull(response);
+        
+        System.out.println(">> RESPONSE RECEIVED!!! " + response.isStatus());
+    }
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddEntry.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddEntry.java?rev=431786&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddEntry.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddEntry.java Tue Aug 15 20:18:27 2006
@@ -0,0 +1,66 @@
+
+package org.apache.axis2.jaxws.sample.addressbook;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for addEntry element declaration.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;element name="addEntry">
+ *   &lt;complexType>
+ *     &lt;complexContent>
+ *       &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *         &lt;sequence>
+ *           &lt;element name="entry" type="{http://org/apache/axis2/jaxws/sample/addressbook}AddressBookEntry"/>
+ *         &lt;/sequence>
+ *       &lt;/restriction>
+ *     &lt;/complexContent>
+ *   &lt;/complexType>
+ * &lt;/element>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "entry"
+})
+@XmlRootElement(name = "addEntry")
+public class AddEntry {
+
+    @XmlElement(namespace = "http://org/apache/axis2/jaxws/sample/addressbook", required = true, nillable = true)
+    protected AddressBookEntry entry;
+
+    /**
+     * Gets the value of the entry property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link AddressBookEntry }
+     *     
+     */
+    public AddressBookEntry getEntry() {
+        return entry;
+    }
+
+    /**
+     * Sets the value of the entry property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link AddressBookEntry }
+     *     
+     */
+    public void setEntry(AddressBookEntry value) {
+        this.entry = value;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddEntryResponse.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddEntryResponse.java?rev=431786&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddEntryResponse.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddEntryResponse.java Tue Aug 15 20:18:27 2006
@@ -0,0 +1,66 @@
+
+package org.apache.axis2.jaxws.sample.addressbook;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for addEntryResponse element declaration.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;element name="addEntryResponse">
+ *   &lt;complexType>
+ *     &lt;complexContent>
+ *       &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *         &lt;sequence>
+ *           &lt;element name="status" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;/sequence>
+ *       &lt;/restriction>
+ *     &lt;/complexContent>
+ *   &lt;/complexType>
+ * &lt;/element>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "status"
+})
+@XmlRootElement(name = "addEntryResponse")
+public class AddEntryResponse {
+
+    @XmlElement(namespace = "http://org/apache/axis2/jaxws/sample/addressbook", required = true, type = Boolean.class, nillable = true)
+    protected Boolean status;
+
+    /**
+     * Gets the value of the status property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isStatus() {
+        return status;
+    }
+
+    /**
+     * Sets the value of the status property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setStatus(Boolean value) {
+        this.status = value;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBook.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBook.java?rev=431786&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBook.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBook.java Tue Aug 15 20:18:27 2006
@@ -0,0 +1,36 @@
+
+package org.apache.axis2.jaxws.sample.addressbook;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0-b26-ea3
+ * Generated source version: 2.0
+ * 
+ */
+@WebService(name = "AddressBook", targetNamespace = "http://org/apache/axis2/jaxws/sample/addressbook", wsdlLocation = "C:\\work\\apps\\eclipse\\workspace\\axis2\\modules\\jaxws\\test\\org\\apache\\axis2\\jaxws\\sample\\addressbook\\META-INF\\AddressBook.wsdl")
+public interface AddressBook {
+
+
+    /**
+     * 
+     * @param entry
+     * @return
+     *     returns java.lang.Boolean
+     */
+    @WebMethod
+    @WebResult(name = "status", targetNamespace = "http://org/apache/axis2/jaxws/sample/addressbook")
+    @RequestWrapper(localName = "addEntry", targetNamespace = "http://org/apache/axis2/jaxws/sample/addressbook", className = "org.apache.axis2.jaxws.sample.addressbook.AddEntry")
+    @ResponseWrapper(localName = "addEntryResponse", targetNamespace = "http://org/apache/axis2/jaxws/sample/addressbook", className = "org.apache.axis2.jaxws.sample.addressbook.AddEntryResponse")
+    public Boolean addEntry(
+        @WebParam(name = "entry", targetNamespace = "http://org/apache/axis2/jaxws/sample/addressbook")
+        AddressBookEntry entry);
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBookEntry.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBookEntry.java?rev=431786&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBookEntry.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBookEntry.java Tue Aug 15 20:18:27 2006
@@ -0,0 +1,118 @@
+
+package org.apache.axis2.jaxws.sample.addressbook;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for AddressBookEntry complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="AddressBookEntry">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="firstName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="lastName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="phone" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AddressBookEntry", propOrder = {
+    "firstName",
+    "lastName",
+    "phone"
+})
+public class AddressBookEntry {
+
+    @XmlElement(namespace = "http://org/apache/axis2/jaxws/sample/addressbook", required = true)
+    protected String firstName;
+    @XmlElement(namespace = "http://org/apache/axis2/jaxws/sample/addressbook", required = true)
+    protected String lastName;
+    @XmlElement(namespace = "http://org/apache/axis2/jaxws/sample/addressbook", required = true, nillable = true)
+    protected String phone;
+
+    /**
+     * Gets the value of the firstName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getFirstName() {
+        return firstName;
+    }
+
+    /**
+     * Sets the value of the firstName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setFirstName(String value) {
+        this.firstName = value;
+    }
+
+    /**
+     * Gets the value of the lastName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getLastName() {
+        return lastName;
+    }
+
+    /**
+     * Sets the value of the lastName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setLastName(String value) {
+        this.lastName = value;
+    }
+
+    /**
+     * Gets the value of the phone property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getPhone() {
+        return phone;
+    }
+
+    /**
+     * Sets the value of the phone property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setPhone(String value) {
+        this.phone = value;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBookImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBookImpl.java?rev=431786&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBookImpl.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/AddressBookImpl.java Tue Aug 15 20:18:27 2006
@@ -0,0 +1,20 @@
+package org.apache.axis2.jaxws.sample.addressbook;
+
+import javax.jws.WebService;
+
+@WebService(endpointInterface="org.apache.axis2.jaxws.sample.addressbook.AddressBook")
+public class AddressBookImpl implements AddressBook {
+
+    public Boolean addEntry(AddressBookEntry entry) {
+        if (entry != null) {
+            System.out.println("New AddressBookEntry received");
+            System.out.println("[name]  " + entry.getLastName() + ", " + entry.getFirstName());
+            System.out.println("[phone] " + entry.getPhone());
+            return true;
+        }
+        else {
+            return false;
+        }
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/META-INF/AddressBookService.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/META-INF/AddressBookService.wsdl?rev=431786&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/META-INF/AddressBookService.wsdl (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/META-INF/AddressBookService.wsdl Tue Aug 15 20:18:27 2006
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="http://org/apache/axis2/jaxws/sample/addressbook" 
+    xmlns:impl="http://org/apache/axis2/jaxws/sample/addressbook" 
+    xmlns:intf="http://org/apache/axis2/jaxws/sample/addressbook" 
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <wsdl:types>
+     <schema elementFormDefault="qualified" targetNamespace="http://org/apache/axis2/jaxws/sample/addressbook" 
+         xmlns="http://www.w3.org/2001/XMLSchema" 
+         xmlns:impl="http://org/apache/axis2/jaxws/sample/addressbook" 
+         xmlns:intf="http://org/apache/axis2/jaxws/sample/addressbook" 
+         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+         xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+       <complexType name="AddressBookEntry">
+         <sequence>
+           <element name="firstName" nillable="false" type="xsd:string"/>
+           <element name="lastName" nillable="false" type="xsd:string"/>
+           <element name="phone" nillable="true" type="xsd:string"/>
+         </sequence>
+       </complexType>
+    
+       <element name="addEntry">
+         <complexType>
+           <sequence>
+             <element name="entry" nillable="true" type="impl:AddressBookEntry"/>
+           </sequence>
+         </complexType>
+       </element>
+    
+       <element name="addEntryResponse">
+         <complexType>
+           <sequence>
+             <element name="status" nillable="true" type="xsd:boolean"/>
+           </sequence>
+         </complexType>
+       </element>
+
+     </schema>
+   </wsdl:types>
+ 
+ <wsdl:message name="addEntryRequest">
+    <wsdl:part element="impl:addEntry" name="parameters"/>
+  </wsdl:message>
+ 
+  <wsdl:message name="addEntryResponse">
+    <wsdl:part element="impl:addEntryResponse" name="parameters"/>
+  </wsdl:message>
+
+  <wsdl:portType name="AddressBook">
+    <wsdl:operation name="addEntry">
+      <wsdl:input message="impl:addEntryRequest" name="addEntryRequest"/>
+      <wsdl:output message="impl:addEntryResponse" name="addEntryResponse"/>
+    </wsdl:operation>
+  </wsdl:portType>
+
+  <wsdl:binding name="AddressBookSoap" type="impl:AddressBook">
+    <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+    <wsdl:operation name="addEntry">
+      <wsdlsoap:operation soapAction=""/>
+
+      <wsdl:input name="addEntryRequest">
+        <wsdlsoap:body use="literal"/>
+      </wsdl:input>
+
+      <wsdl:output name="addEntryResponse">
+        <wsdlsoap:body use="literal"/>
+      </wsdl:output>
+
+    </wsdl:operation>
+  </wsdl:binding>
+
+  <wsdl:service name="AddressBookService">
+    <wsdl:port binding="impl:AddressBookSoap" name="AddressBook">
+      <wsdlsoap:address location="http://localhost:8080/axis2/services/AddressBookService"/>
+    </wsdl:port>
+  </wsdl:service>
+
+</wsdl:definitions>

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/META-INF/services.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/META-INF/services.xml?rev=431786&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/META-INF/services.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/META-INF/services.xml Tue Aug 15 20:18:27 2006
@@ -0,0 +1,11 @@
+<serviceGroup>
+ <service name="AddressBookService">
+  <messageReceivers>
+   <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.jaxws.server.JAXWSMessageReceiver"/>
+  </messageReceivers>
+  <parameter locked="false" name="ServiceClass">org.apache.axis2.jaxws.sample.addressbook.AddressBookImpl</parameter>
+  <operation name="addEntry" mep="http://www.w3.org/2004/08/wsdl/in-out">
+    <actionMapping/>
+  </operation>
+ </service>
+</serviceGroup>
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/ObjectFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/ObjectFactory.java?rev=431786&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/ObjectFactory.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/ObjectFactory.java Tue Aug 15 20:18:27 2006
@@ -0,0 +1,56 @@
+
+package org.apache.axis2.jaxws.sample.addressbook;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.apache.axis2.jaxws.sample.addressbook package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.apache.axis2.jaxws.sample.addressbook
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link AddEntryResponse }
+     * 
+     */
+    public AddEntryResponse createAddEntryResponse() {
+        return new AddEntryResponse();
+    }
+
+    /**
+     * Create an instance of {@link AddEntry }
+     * 
+     */
+    public AddEntry createAddEntry() {
+        return new AddEntry();
+    }
+
+    /**
+     * Create an instance of {@link AddressBookEntry }
+     * 
+     */
+    public AddressBookEntry createAddressBookEntry() {
+        return new AddressBookEntry();
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/package-info.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/package-info.java?rev=431786&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/package-info.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/addressbook/package-info.java Tue Aug 15 20:18:27 2006
@@ -0,0 +1,2 @@
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://org/apache/axis2/jaxws/sample/addressbook")
+package org.apache.axis2.jaxws.sample.addressbook;



---------------------------------------------------------------------
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