You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by pr...@apache.org on 2007/12/01 15:43:54 UTC

svn commit: r600141 [7/10] - in /webservices/axis2/branches/java/jaxws21/modules: adb-codegen/ adb-codegen/src/org/apache/axis2/schema/ adb-codegen/src/org/apache/axis2/schema/template/ adb-codegen/src/org/apache/axis2/schema/util/ adb-codegen/src/org/...

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/utility/XMLRootElementUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/utility/XMLRootElementUtil.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/utility/XMLRootElementUtil.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/utility/XMLRootElementUtil.java Sat Dec  1 06:43:28 2007
@@ -31,6 +31,8 @@
 import java.beans.IntrospectionException;
 import java.beans.Introspector;
 import java.beans.PropertyDescriptor;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Field;
 import java.security.PrivilegedAction;
 import java.util.ArrayList;
@@ -75,7 +77,8 @@
     public static QName getXmlRootElementQName(Class clazz) {
 
         // See if the object represents a root element
-        XmlRootElement root = (XmlRootElement)clazz.getAnnotation(XmlRootElement.class);
+        XmlRootElement root = (XmlRootElement)
+            getAnnotation(clazz,XmlRootElement.class);
         if (root == null) {
             return null;
         }
@@ -91,7 +94,8 @@
         // The namespace may need to be defaulted
         if (namespace == null || namespace.length() == 0 || namespace.equals("##default")) {
             Package pkg = clazz.getPackage();
-            XmlSchema schema = (XmlSchema)pkg.getAnnotation(XmlSchema.class);
+            XmlSchema schema = (XmlSchema)
+                getAnnotation(pkg, XmlSchema.class);
             if (schema != null) {
                 namespace = schema.namespace();
             } else {
@@ -114,7 +118,7 @@
 			
 			f.setAccessible(true);
 			
-			XmlEnumValue xev = f.getAnnotation(XmlEnumValue.class);
+			XmlEnumValue xev = (XmlEnumValue) getAnnotation(f, XmlEnumValue.class);
 			if (xev == null){
 				value = f.getName();
 			} else {
@@ -296,7 +300,8 @@
      */
     private static String getXmlElementName(Class jaxbClass, Field field)
             throws NoSuchFieldException {
-        XmlElement xmlElement = field.getAnnotation(XmlElement.class);
+        XmlElement xmlElement = (XmlElement)
+            getAnnotation(field,XmlElement.class);
 
         // If XmlElement does not exist, default to using the field name
         if (xmlElement == null ||
@@ -307,5 +312,17 @@
 
     }
 
-
+    /**
+     * Get an annotation.  This is wrappered to avoid a Java2Security violation.
+     * @param cls Class that contains annotation 
+     * @param annotation Class of requrested Annotation
+     * @return annotation or null
+     */
+    private static Annotation getAnnotation(final AnnotatedElement element, final Class annotation) {
+        return (Annotation) AccessController.doPrivileged(new PrivilegedAction() {
+            public Object run() {
+                return element.getAnnotation(annotation);
+            }
+        });
+    }
 }

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/test-resources/wsdl/AddNumbersHandler.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/test-resources/wsdl/AddNumbersHandler.wsdl?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/test-resources/wsdl/AddNumbersHandler.wsdl (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/test-resources/wsdl/AddNumbersHandler.wsdl Sat Dec  1 06:43:28 2007
@@ -28,6 +28,8 @@
 	<types>
 		<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
 			elementFormDefault="qualified" targetNamespace="http://org/test/addnumbershandler">
+			<element name="myHeader" type="xsd:string" />
+			
 			<element name="addNumbersHandlerResponse">
 				<complexType>
 					<sequence>

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java Sat Dec  1 06:43:28 2007
@@ -90,6 +90,7 @@
 import org.apache.axis2.jaxws.sample.WrapTests;
 import org.apache.axis2.jaxws.security.BasicAuthSecurityTests;
 import org.apache.axis2.jaxws.spi.BindingProviderTests;
+import org.apache.axis2.jaxws.spi.handler.HandlerResolverTests;
 import org.apache.axis2.jaxws.wsdl.schemareader.SchemaReaderTests;
 import org.apache.axis2.jaxws.xmlhttp.clientTests.dispatch.datasource.DispatchXMessageDataSource;
 import org.apache.axis2.jaxws.xmlhttp.clientTests.dispatch.jaxb.DispatchXPayloadJAXB;
@@ -136,7 +137,7 @@
         suite.addTestSuite(BindingToProtocolTests.class);
         
         // ------ Addressing Tests ------
-        suite.addTestSuite(EndpointReferenceUtilsTests.class);
+        //suite.addTestSuite(EndpointReferenceUtilsTests.class);
         
         // ------ Metadata Tests ------
         suite.addTestSuite(WSDLTests.class);
@@ -150,6 +151,7 @@
         suite.addTestSuite(LogicalMessageContextTests.class);
         suite.addTestSuite(CompositeMessageContextTests.class);
         suite.addTestSuite(HandlerChainProcessorTests.class);
+        suite.addTestSuite(HandlerResolverTests.class);
         
         // ------ Message Tests ------
         suite.addTestSuite(JaxwsMessageBundleTests.class);

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java Sat Dec  1 06:43:28 2007
@@ -41,6 +41,9 @@
 import javax.xml.ws.handler.PortInfo;
 import javax.xml.ws.soap.SOAPFaultException;
 
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
 import java.io.StringReader;
 import java.io.StringWriter;
 import junit.framework.TestCase;
@@ -62,8 +65,14 @@
 public class AddNumbersHandlerTests extends TestCase {
 	
     String axisEndpoint = "http://localhost:8080/axis2/services/AddNumbersHandlerService";
-
-
+    File requestFile = null;
+    
+    public void setUp() throws Exception {
+        String resourceDir = System.getProperty("basedir",".")+
+            File.separator+"test-resources"+File.separator+"xml";
+        requestFile = new File(resourceDir+File.separator+"addnumberstest.xml");
+        
+    }
     /**
      * Client app sends 10, 10 as params to sum.  No client-side handlers are configured
      * for this scenario.  The server-side AddNumbersLogicalHandler is instantiated with a
@@ -109,7 +118,8 @@
 
             Service myService = Service.create(serviceName);
             myService.addPort(portName, null, axisEndpoint);
-            Dispatch<Source> myDispatch = myService.createDispatch(portName, Source.class, Service.Mode.PAYLOAD);
+            Dispatch<Source> myDispatch = myService.createDispatch(portName, Source.class, 
+                                                                   Service.Mode.MESSAGE);
 
             // set handler chain for binding provider
             Binding binding = ((BindingProvider) myDispatch).getBinding();
@@ -540,19 +550,9 @@
     /**
      * Create a Source request to be used by Dispatch<Source>
      */
-    private Source createRequestSource() {
-
-        String reqString = null;
-
-        String ns = "http://org/test/addnumbershandler";
-        String operation = "addNumbersHandler";
-
-        reqString = "<" + operation + 
-                    " xmlns=\"" + ns + "\">" +
-                    "<arg0>10</arg0><arg1>10</arg1>" +
-                    "</" + operation + ">";
-
-        return new StreamSource(new StringReader(reqString));
+    private Source createRequestSource() throws IOException {
+        FileInputStream fis = new FileInputStream(requestFile);
+        return new StreamSource(fis);
     }
     
     public void testAddNumbersHandlerHandlerResolver() {

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/MtomSampleTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/MtomSampleTests.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/MtomSampleTests.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/MtomSampleTests.java Sat Dec  1 06:43:28 2007
@@ -54,7 +54,7 @@
      * -- setMTOMEnabled([true|false])
      * Using SOAP11
      */
-    public void testSendImageAttachmentAPI11() throws Exception {
+    public void _testSendImageAttachmentAPI11() throws Exception {
         TestLogger.logger.debug("----------------------------------");
         TestLogger.logger.debug("test: " + getName());
         
@@ -98,7 +98,7 @@
      * Enable attachment optimization using the SOAP11 binding
      * property for MTOM.
      */
-    public void testSendImageAttachmentProperty11() throws Exception {
+    public void _testSendImageAttachmentProperty11() throws Exception {
         TestLogger.logger.debug("----------------------------------");
         TestLogger.logger.debug("test: " + getName());
         
@@ -139,7 +139,7 @@
      * Enable attachment optimization using both the SOAP11 binding
      * property for MTOM and the Binding API
      */
-    public void testSendImageAttachmentAPIProperty11() throws Exception {
+    public void _testSendImageAttachmentAPIProperty11() throws Exception {
         TestLogger.logger.debug("----------------------------------");
         TestLogger.logger.debug("test: " + getName());
         

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbershandler/AddNumbersClientLogicalHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbershandler/AddNumbersClientLogicalHandler.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbershandler/AddNumbersClientLogicalHandler.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbershandler/AddNumbersClientLogicalHandler.java Sat Dec  1 06:43:28 2007
@@ -136,9 +136,9 @@
             s = msg.getPayload();
             
             String st = getStringFromSourcePayload(msg.getPayload());
-            if (st.contains("<arg0>99</arg0>")) {
+            if (st.contains(">99</arg0>")) {
                 throw new ProtocolException("I don't like the value 99");
-            } else if (st.contains("<arg0>999</arg0>")) {
+            } else if (st.contains(">999</arg0>")) {
                 XMLFault xmlFault = MethodMarshallerUtils.createXMLFaultFromSystemException(new RuntimeException("I don't like the value 999"));
                 try {
                     javax.xml.soap.MessageFactory mf = SAAJFactory.createMessageFactory(SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE);

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbershandler/AddNumbersProtocolHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbershandler/AddNumbersProtocolHandler.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbershandler/AddNumbersProtocolHandler.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbershandler/AddNumbersProtocolHandler.java Sat Dec  1 06:43:28 2007
@@ -20,7 +20,10 @@
 
 import java.util.Set;
 
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
 import javax.xml.namespace.QName;
+import javax.xml.ws.WebServiceException;
 import javax.xml.ws.handler.MessageContext;
 import javax.xml.ws.handler.soap.SOAPMessageContext;
 
@@ -43,6 +46,39 @@
     }
 
     public boolean handleMessage(SOAPMessageContext messagecontext) {
+        // Ensure that the expected headers are present
+        JAXBContext context;
+        try {
+            context = JAXBContext.newInstance("org.test.addnumbershandler");
+        } catch (Exception e) {
+            throw new WebServiceException(e);
+        }
+        QName qName= new QName("http://org/test/addnumbershandler","myHeader");
+
+        try {
+            Object[] values = messagecontext.getHeaders(qName, context, true);
+
+            if (values.length > 0) {
+                if (values.length !=3 ||
+                        !((JAXBElement)values[0]).getValue().equals("Good1") ||
+                        !((JAXBElement)values[1]).getValue().equals("Good2") ||
+                        !((JAXBElement)values[2]).getValue().equals("Bad")) {
+                    throw new WebServiceException("Failed getting all of the headers:" + values);
+                }
+
+                values = messagecontext.getHeaders(qName, context, false);
+                if (values.length !=2 ||
+                        !((JAXBElement)values[0]).getValue().equals("Good1") ||
+                        !((JAXBElement)values[1]).getValue().equals("Good2")) {
+                    throw new WebServiceException("Failed getting the expected headers:" + values);
+                }
+            }
+        } catch(Exception e) {
+            e.printStackTrace();
+            throw new WebServiceException(e);
+        }
+
+
         tracker.handleMessage(messagecontext);
         return true;
     }

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbershandler/META-INF/AddNumbersHandler.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbershandler/META-INF/AddNumbersHandler.wsdl?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbershandler/META-INF/AddNumbersHandler.wsdl (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbershandler/META-INF/AddNumbersHandler.wsdl Sat Dec  1 06:43:28 2007
@@ -28,6 +28,8 @@
 	<types>
 		<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
 			elementFormDefault="qualified" targetNamespace="http://org/test/addnumbershandler">
+			<element name="myHeader" type="xsd:string" />
+			
 			<element name="addNumbersHandlerResponse">
 				<complexType>
 					<sequence>

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/test/server/EchoString.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/test/server/EchoString.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/test/server/EchoString.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/test/server/EchoString.java Sat Dec  1 06:43:28 2007
@@ -26,19 +26,27 @@
             */
 
             package server;
+
+            import org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter;
+            import org.apache.axis2.databinding.ADBException;
+            import org.apache.axiom.om.OMFactory;
+
+            import javax.xml.namespace.QName;
+            import javax.xml.stream.XMLStreamException;
+
             /**
             *  EchoString bean class
             */
-        
-        public  class EchoString
+
+            public  class EchoString
         implements org.apache.axis2.databinding.ADBBean{
-        
+
                 public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
                 "http://test",
                 "echoString",
                 "ns1");
 
-            
+
 
 
             /**
@@ -46,8 +54,8 @@
             */
 
             protected java.lang.String localInput ;
-           
-           
+
+
 
            /**
            * Auto generated getter method
@@ -59,17 +67,17 @@
                return localInput;
            }
 
-           
-            
+
+
                     /**
                    * Auto generated setter method
                    * @param param Input
                    */
                    public void setInput(java.lang.String param){
-                    
+
                    this.localInput=param;
                    }
-                
+
 
         /**
         * databinding method to get an XML representation of this object
@@ -78,33 +86,48 @@
         public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName){
 
 
-        
+
                  java.util.ArrayList elementList = new java.util.ArrayList();
                  java.util.ArrayList attribList = new java.util.ArrayList();
 
-                
+
                              elementList.add(new javax.xml.namespace.QName("http://test",
                                                                       "input"));
-                            
+
                                     elementList.add(localInput==null?null:
                                      org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localInput));
-                                
+
 
                 return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
-            
-            
+
+
 
         }
 
+                public void serialize(final QName parentQName,
+                                      final OMFactory factory,
+                                      MTOMAwareXMLStreamWriter xmlWriter)
+                        throws XMLStreamException, ADBException {
+                    serialize(parentQName, factory, xmlWriter, false);
+                }
+
+                public void serialize(final QName parentQName,
+                                      final OMFactory factory,
+                                      MTOMAwareXMLStreamWriter xmlWriter,
+                                      boolean serializeType)
+                        throws XMLStreamException, ADBException {
+                    throw new UnsupportedOperationException("Un implemented method");
+                }
+
+
 
 
 
-    
 
         /**
              *  Factory class that keeps the parse method
              */
-           public static class Factory{
+        public static class Factory{
 
                /**
                * static method to create the object
@@ -119,11 +142,11 @@
                    event = reader.next();
                }
 
-               
+
                if (!MY_QNAME.equals(reader.getName())){
                            throw new Exception("Wrong QName");
                }
-               
+
                        org.apache.axis2.databinding.utils.SimpleElementReaderStateMachine stateMachine1
                          = new org.apache.axis2.databinding.utils.SimpleElementReaderStateMachine();
                        javax.xml.namespace.QName startQname1 = new javax.xml.namespace.QName(
@@ -136,7 +159,7 @@
                          stateMachine1.getText()==null?null:
                                     org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
                                   stateMachine1.getText()));
-                             
+
                } catch (javax.xml.stream.XMLStreamException e) {
                     throw new java.lang.Exception(e);
                }
@@ -146,9 +169,9 @@
                }//end of factory class
 
 
-     
 
-        
+
+
         }
            
           

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/test/server/EchoStringResponse.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/test/server/EchoStringResponse.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/test/server/EchoStringResponse.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/test/server/EchoStringResponse.java Sat Dec  1 06:43:28 2007
@@ -25,11 +25,17 @@
  */
 package server;
 
+import org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter;
+import org.apache.axis2.databinding.ADBException;
+import org.apache.axiom.om.OMFactory;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
 /**
  *  EchoStringResponse bean class
  */
 public  class EchoStringResponse implements org.apache.axis2.databinding.ADBBean{
-    
+
     public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
             "http://test",
             "echoStringResponse",
@@ -79,6 +85,21 @@
 
     }
 
+    public void serialize(final QName parentQName,
+                          final OMFactory factory,
+                          MTOMAwareXMLStreamWriter xmlWriter)
+            throws XMLStreamException, ADBException {
+        serialize(parentQName, factory, xmlWriter, false);
+    }
+
+    public void serialize(final QName parentQName,
+                          final OMFactory factory,
+                          MTOMAwareXMLStreamWriter xmlWriter,
+                          boolean serializeType)
+            throws XMLStreamException, ADBException {
+        throw new UnsupportedOperationException("Un implemented method");
+    }
+
     /**
      *  Factory class that keeps the parse method
      */
@@ -87,8 +108,8 @@
         /**
          * static method to create the object
          */
-        
-    	public static EchoStringResponse parse(
+
+        public static EchoStringResponse parse(
                 javax.xml.stream.XMLStreamReader reader)
                 throws java.lang.Exception {
             EchoStringResponse object = new EchoStringResponse();
@@ -122,7 +143,7 @@
 
             return object;
         }
-        
+
     }//end of factory class
 
 }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/conf/axis2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/conf/axis2.xml?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/conf/axis2.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/conf/axis2.xml Sat Dec  1 06:43:28 2007
@@ -84,7 +84,7 @@
 
     <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
     <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
-    <deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>
+    <!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
     
 
     <!-- Following parameter will set the host name for the epr-->
@@ -130,6 +130,10 @@
                          class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
         <messageFormatter contentType="application/xml"
                          class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
     </messageFormatters>
 
     <!-- ================================================= -->

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/resources/services.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/resources/services.xsd?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/resources/services.xsd (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/resources/services.xsd Sat Dec  1 06:43:28 2007
@@ -53,7 +53,7 @@
     <xs:element name="excludeOperations">
         <xs:complexType>
             <xs:sequence>
-                <xs:element ref="operation"/>
+               <xs:element name="operation" type="xs:string" />  
             </xs:sequence>
         </xs:complexType>
     </xs:element>

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/Constants.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/Constants.java Sat Dec  1 06:43:28 2007
@@ -250,8 +250,15 @@
      */
     public static final String INBOUND_FAULT_OVERRIDE = "inboundFaultOverride";
 
+    /** SOAP Role Configuration */
+    public static final String SOAP_ROLE_CONFIGURATION_ELEMENT = "SOAPRoleConfiguration";
+    public static final String SOAP_ROLE_IS_ULTIMATE_RECEIVER_ATTRIBUTE = "isUltimateReceiver";
+    public static final String SOAP_ROLE_ELEMENT = "role";
+    public static final String SOAP_ROLE_PLAYER_PARAMETER = "rolePlayer";
+    
     public static interface Configuration {
         public static final String ENABLE_REST = "enableREST";
+        public static final String ENABLE_HTTP_CONTENT_NEGOTIATION = "httpContentNegotiation";
         public static final String ENABLE_REST_THROUGH_GET = "restThroughGet";
 
         public static final String ARTIFACTS_TEMP_DIR = "artifactsDIR";

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java Sat Dec  1 06:43:28 2007
@@ -122,8 +122,8 @@
                 "http://www.w3.org/2005/08/addressing";
         static final String WSAW_NAMESPACE =
             "http://www.w3.org/2006/05/addressing/wsdl";
-        static final String WSAM_NAMESPACE =
-            "http://www.w3.org/2007/02/addressing/metadata";
+        static final String WSAM_NAMESPACE = 
+        	"http://www.w3.org/2007/05/addressing/metadata";
         /**
          * @deprecated use {@link #WSA_DEFAULT_RELATIONSHIP_TYPE} instead.
          */

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11ActionHelper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11ActionHelper.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11ActionHelper.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11ActionHelper.java Sat Dec  1 06:43:28 2007
@@ -47,6 +47,8 @@
             new QName(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.WSA_ACTION);
     private static final QName finalWSAWNS =
             new QName(AddressingConstants.Final.WSAW_NAMESPACE, AddressingConstants.WSA_ACTION);
+    private static final QName finalWSAMNS =
+        new QName(AddressingConstants.Final.WSAM_NAMESPACE, AddressingConstants.WSA_ACTION);
 
     /**
      * getActionFromInputElement
@@ -111,7 +113,12 @@
     private static String getWSAWActionExtensionAttribute(AttributeExtensible ae) {
         // Search first for a wsaw:Action using the submission namespace
         Object attribute = ae.getExtensionAttribute(submissionWSAWNS);
-        // Then if that did not exist one using the w3c namespace
+        // Then if that did not exist one using the w3c WSAM namespace
+        if (attribute == null) {
+            attribute = ae.getExtensionAttribute(finalWSAMNS);
+        }
+        // Then if that did not exist one using the w3c WSAW namespace
+        // (for backwards compat reasons)
         if (attribute == null) {
             attribute = ae.getExtensionAttribute(finalWSAWNS);
         }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java Sat Dec  1 06:43:28 2007
@@ -45,18 +45,20 @@
 import org.apache.axis2.description.AxisMessage;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.Parameter;
+import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.util.MultipleEntryHashMap;
 import org.apache.axis2.wsdl.WSDLConstants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.commons.schema.XmlSchemaAll;
 import org.apache.ws.commons.schema.XmlSchemaComplexType;
 import org.apache.ws.commons.schema.XmlSchemaElement;
+import org.apache.ws.commons.schema.XmlSchemaGroupBase;
 import org.apache.ws.commons.schema.XmlSchemaParticle;
 import org.apache.ws.commons.schema.XmlSchemaSequence;
 import org.apache.ws.commons.schema.XmlSchemaType;
-import org.apache.ws.commons.schema.XmlSchemaAll;
-import org.apache.ws.commons.schema.XmlSchemaGroupBase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import javax.xml.namespace.QName;
 import javax.xml.parsers.FactoryConfigurationError;
@@ -639,12 +641,43 @@
     public static Builder getBuilderFromSelector(String type, MessageContext msgContext)
             throws AxisFault {
 
-        Builder builder = msgContext.getConfigurationContext().getAxisConfiguration()
+        AxisConfiguration configuration =
+                msgContext.getConfigurationContext().getAxisConfiguration();
+        Builder builder = configuration
                 .getMessageBuilder(type);
         if (builder != null) {
+            // Check whether the request has a Accept header if so use that as the response
+            // message type.
+            // If thats not present,
             // Setting the received content-type as the messageType to make
             // sure that we respond using the received message serialisation
             // format.
+
+            Object contentNegotiation = configuration
+                    .getParameterValue(Constants.Configuration.ENABLE_HTTP_CONTENT_NEGOTIATION);
+            if (JavaUtils.isTrueExplicitly(contentNegotiation)) {
+                Map transportHeaders = (Map) msgContext.getProperty(MessageContext.TRANSPORT_HEADERS);
+                if (transportHeaders != null) {
+                    String acceptHeader = (String) transportHeaders.get(HTTPConstants.HEADER_ACCEPT);
+                    if (acceptHeader != null) {
+                        int index = acceptHeader.indexOf(";");
+                        if (index > 0) {
+                            acceptHeader = acceptHeader.substring(0, index);
+                        }
+                        String[] strings = acceptHeader.split(",");
+                        for (int i = 0; i < strings.length; i++) {
+                            String accept = strings[i].trim();
+                            // We dont want dynamic content negotoatin to work on text.xml as its
+                            // ambiguos as to whether the user requests SOAP 1.1 or POX response
+                            if (!HTTPConstants.MEDIA_TYPE_TEXT_XML.equals(accept) && configuration.getMessageFormatter(accept) != null) {
+                                type = strings[i];
+                                break;
+                            }
+                        }
+                    }
+                }
+            }
+
             msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);
         }
         return builder;

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java Sat Dec  1 06:43:28 2007
@@ -307,7 +307,10 @@
     }
 
     private SOAPFactory getSOAPFactory(String nsURI) throws AxisFault {
-        if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
+        if (nsURI == null) {
+            return OMAbstractFactory.getSOAP12Factory();
+        }
+        else if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
             return OMAbstractFactory.getSOAP12Factory();
         } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
             return OMAbstractFactory.getSOAP11Factory();

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/client/Options.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/client/Options.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/client/Options.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/client/Options.java Sat Dec  1 06:43:28 2007
@@ -101,6 +101,11 @@
     // current revision level of this object
     private static final int revisionID = REVISION_2;
 
+    //I am going to set a reply to as customer reply To address ,
+    // so that Axis2 does not need to wait for the reply
+    public static String  CUSTOM_REPLYTO_ADDRESS = "CUSTOM_REPLYTO_ADDRESS";
+    public static String  CUSTOM_REPLYTO_ADDRESS_TRUE = "true";
+
 
     /**
      * Default blocking timeout value.
@@ -882,6 +887,8 @@
                                                     senderTransport));
         }
     }
+
+
 
     /**
      * Set the SOAP version to be used.

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/clustering/ClusteringConstants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/clustering/ClusteringConstants.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/clustering/ClusteringConstants.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/clustering/ClusteringConstants.java Sat Dec  1 06:43:28 2007
@@ -32,4 +32,5 @@
     public static final String CLUSTER_INITIALIZED = "local_cluster.initialized";
     public static final String TIME_TO_SEND = "local_cluster.time.to.send";
     public static final String BLOCK_ALL_REQUESTS = "local_wso2wsas.block.requests";
+    public static final String LOCAL_IP_ADDRESS = "local.ip.address";
 }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/AbstractContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/AbstractContext.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/AbstractContext.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/AbstractContext.java Sat Dec  1 06:43:28 2007
@@ -153,15 +153,21 @@
         addPropertyDifference(key);
     }
 
-    private synchronized void addPropertyDifference(String key) {
+    private void addPropertyDifference(String key) {
         ConfigurationContext cc = getRootContext();
-        if (cc == null) return;
-
+        if (cc == null) {
+            return;
+        }
         // Add the property differences only if Context replication is enabled,
         // and there are members in the cluster
         ClusterManager clusterManager = cc.getAxisConfiguration().getClusterManager();
-        if (clusterManager != null &&
-            clusterManager.getContextManager() != null) {
+        if (clusterManager == null ||
+            clusterManager.getContextManager() == null) {
+            return;
+        }
+        // Narrowed the synchronization so that we only wait
+        // if a property difference is added.
+        synchronized(this) {
             propertyDifferences.put(key, new PropertyDifference(key, false));
         }
     }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/MessageContext.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/MessageContext.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/MessageContext.java Sat Dec  1 06:43:28 2007
@@ -861,12 +861,15 @@
 
     /**
      * Retrieves a property value. The order of search is as follows: search in
-     * my own options and then look locally. Does not search up the hierarchy.
+     * my own map and then look at my options. Does not search up the hierarchy.
      *
      * @param name name of the property to search for
      * @return the value of the property, or null if the property is not found
      */
     public Object getLocalProperty(String name) {
+        return getLocalProperty(name, true);
+    }
+    public Object getLocalProperty(String name, boolean searchOptions) {
         if (LoggingControl.debugLoggingAllowed) {
             checkActivateWarning("getProperty");
         }
@@ -877,9 +880,11 @@
             return obj;
         }
 
-        obj = options.getProperty(name);
-        if (obj != null) {
-            return obj;
+        if (searchOptions) {
+            obj = options.getProperty(name);
+            if (obj != null) {
+                return obj;
+            }
         }
 
         // tough
@@ -888,9 +893,10 @@
     
     /**
      * Retrieves a property value. The order of search is as follows: search in
-     * my own options and then look in my context hierarchy. Since its possible
+     * my own map and then look in my context hierarchy, and then in options. 
+     * Since its possible
      * that the entire hierarchy is not present, I will start at whatever level
-     * has been set and start there.
+     * has been set.
      *
      * @param name name of the property to search for
      * @return the value of the property, or null if the property is not found

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dataretrieval/WSDLDataLocator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dataretrieval/WSDLDataLocator.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dataretrieval/WSDLDataLocator.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dataretrieval/WSDLDataLocator.java Sat Dec  1 06:43:28 2007
@@ -23,7 +23,6 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.AxisService2WSDL11;
-import org.apache.axis2.AxisFault;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dataretrieval/client/MexClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dataretrieval/client/MexClient.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dataretrieval/client/MexClient.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/dataretrieval/client/MexClient.java Sat Dec  1 06:43:28 2007
@@ -69,22 +69,19 @@
 
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
-        OMNamespace omNs = fac.createOMNamespace(
-                DRConstants.SPEC.NS_URI, DRConstants.SPEC.NS_PREFIX);
+        OMNamespace omNs = fac.createOMNamespace(DRConstants.SPEC.NS_URI,
+                                                 DRConstants.SPEC.NS_PREFIX);
 
-        OMElement method = fac.createOMElement(DRConstants.SPEC.GET_METADATA,
-                                               omNs);
+        OMElement method = fac.createOMElement(DRConstants.SPEC.GET_METADATA, omNs);
         if (dialect != null) {
-            OMElement dialect_Elem = fac.createOMElement(
-                    DRConstants.SPEC.DIALET, omNs);
+            OMElement dialectElem = fac.createOMElement(DRConstants.SPEC.DIALET, omNs);
 
-            dialect_Elem.setText(dialect);
-            method.addChild(dialect_Elem);
+            dialectElem.setText(dialect);
+            method.addChild(dialectElem);
         }
         // create Identifier element
         if (identifier != null) {
-            OMElement id_Elem = fac.createOMElement(
-                    DRConstants.SPEC.IDENTIFIER, omNs);
+            OMElement id_Elem = fac.createOMElement(DRConstants.SPEC.IDENTIFIER, omNs);
             id_Elem.setText(identifier);
             method.addChild(id_Elem);
         }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java Sat Dec  1 06:43:28 2007
@@ -22,7 +22,9 @@
 
 import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMElement;
+import org.apache.axiom.soap.RolePlayer;
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
 import org.apache.axis2.builder.ApplicationXMLBuilder;
 import org.apache.axis2.builder.Builder;
 import org.apache.axis2.builder.MIMEBuilder;
@@ -47,11 +49,14 @@
 import org.apache.axis2.transport.MessageFormatter;
 import org.apache.axis2.transport.TransportListener;
 import org.apache.axis2.transport.TransportSender;
+import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.util.Loader;
 import org.apache.axis2.util.TargetResolver;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import edu.emory.mathcs.backport.java.util.Collections;
+
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
 import java.io.InputStream;
@@ -200,6 +205,15 @@
             if (dataLocatorElement != null) {
                 processDataLocatorConfig(dataLocatorElement);
             }
+            
+            // process roleplayer configuration
+            OMElement rolePlayerElement =
+                    config_element
+                            .getFirstChildWithName(new QName(Constants.SOAP_ROLE_CONFIGURATION_ELEMENT));
+
+            if (rolePlayerElement != null) {
+                processSOAPRoleConfig(axisConfig, rolePlayerElement);
+            }
 
             // process MessageFormatters
             OMElement messageFormattersElement =
@@ -246,6 +260,36 @@
         }
     }
 
+    private void processSOAPRoleConfig(AxisConfiguration axisConfig, OMElement soaproleconfigElement) {
+    	if (soaproleconfigElement != null) {
+    		final boolean isUltimateReceiever = JavaUtils.isTrue(soaproleconfigElement.getAttributeValue(new QName(Constants.SOAP_ROLE_IS_ULTIMATE_RECEIVER_ATTRIBUTE)), true);
+    		ArrayList roles = new ArrayList();
+    		Iterator iterator = soaproleconfigElement.getChildrenWithName(new QName(Constants.SOAP_ROLE_ELEMENT));
+    		while (iterator.hasNext()) {
+    			OMElement roleElement = (OMElement) iterator.next();
+    			roles.add(roleElement.getText());
+    		}
+    		final List unmodifiableRoles = Collections.unmodifiableList(roles);
+    		try{
+    			RolePlayer rolePlayer = new RolePlayer(){
+    				public List getRoles() {
+    					return unmodifiableRoles;
+    				}
+    				public boolean isUltimateDestination() {
+    					return isUltimateReceiever;
+    				}
+    			};
+    			axisConfig.addParameter("rolePlayer", rolePlayer);
+    		} catch (AxisFault e) {
+    			if (log.isTraceEnabled()) {
+    				log.trace(
+    						"processTargetResolvers: Exception thrown initialising TargetResolver: " +
+    						e.getMessage());
+    			}
+    		}
+    	}
+    }
+    
     private void processDeployers(Iterator deployerItr) {
         HashMap directoryToExtensionMappingMap = new HashMap();
         HashMap extensionToDeployerMappingMap = new HashMap();

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java Sat Dec  1 06:43:28 2007
@@ -74,8 +74,8 @@
                 File parentFile = file.getParentFile();
                 if (file != null) {
                     ClassLoader classLoader =
-                           Utils.getClassLoader(configCtx.getAxisConfiguration().
-                                   getSystemClassLoader(), parentFile);
+                            Utils.getClassLoader(configCtx.getAxisConfiguration().
+                                    getSystemClassLoader(), parentFile);
 
                     Thread.currentThread().setContextClassLoader(classLoader);
                     String className = file.getName();
@@ -86,10 +86,10 @@
                                                  deploymentFileData.getFile().getAbsolutePath()));
 
                     JamServiceFactory factory = JamServiceFactory.getInstance();
-                    JamServiceParams jam_service_parms = factory.createServiceParams();
-                    jam_service_parms.addClassLoader(classLoader);
-                    jam_service_parms.includeClass(className);
-                    JamService service = factory.createService(jam_service_parms);
+                    JamServiceParams jamServiceParams = factory.createServiceParams();
+                    jamServiceParams.addClassLoader(classLoader);
+                    jamServiceParams.includeClass(className);
+                    JamService service = factory.createService(jamServiceParams);
                     JamClassIterator jClassIter = service.getClasses();
                     while (jClassIter.hasNext()) {
                         JClass jclass = (JClass) jClassIter.next();
@@ -108,13 +108,16 @@
                                 // try to see whether JAX-WS jars in the class path , if so use them
                                 // to process annotated pojo else use annogen to process the pojo class
                                 AxisService axisService;
-                                axisService = createAxisService(classLoader,
-                                                                className,deploymentFileData.getFile().toURL());
+                                axisService =
+                                        createAxisService(classLoader,
+                                                          className,
+                                                          deploymentFileData.getFile().toURL());
                                 configCtx.getAxisConfiguration().addService(axisService);
                             } else {
-                                AxisService axisService = createAxisServiceUsingAnnogen(className, 
-                                                                                        classLoader,
-                                                                                        deploymentFileData.getFile().toURL());
+                                AxisService axisService =
+                                        createAxisServiceUsingAnnogen(className,
+                                                                      classLoader,
+                                                                      deploymentFileData.getFile().toURL());
                                 configCtx.getAxisConfiguration().addService(axisService);
                             }
                         }
@@ -155,22 +158,22 @@
                             new URL[]{deploymentFileData.getFile().toURL()},
                             configCtx.getAxisConfiguration().getSystemClassLoader(),
                             true,
-                            (File)configCtx.getAxisConfiguration().
+                            (File) configCtx.getAxisConfiguration().
                                     getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR));
                     Thread.currentThread().setContextClassLoader(classLoader);
                     className = className.replaceAll(".class", "");
                     className = className.replaceAll("/", ".");
                     JamServiceFactory factory = JamServiceFactory.getInstance();
-                    JamServiceParams jam_service_parms = factory.createServiceParams();
-                    jam_service_parms.addClassLoader(classLoader);
-                    jam_service_parms.includeClass(className);
-                    JamService service = factory.createService(jam_service_parms);
+                    JamServiceParams jamServiceParams = factory.createServiceParams();
+                    jamServiceParams.addClassLoader(classLoader);
+                    jamServiceParams.includeClass(className);
+                    JamService service = factory.createService(jamServiceParams);
                     JamClassIterator jClassIter = service.getClasses();
                     while (jClassIter.hasNext()) {
                         JClass jclass = (JClass) jClassIter.next();
                         if (jclass.getQualifiedName().equals(className)) {
                             /**
-                             * Schema genertaion done in two stage 1. Load all the methods and
+                             * Schema generation done in two stage 1. Load all the methods and
                              * create type for methods parameters (if the parameters are Bean
                              * then it will create Complex types for those , and if the
                              * parameters are simple type which decribe in SimpleTypeTable
@@ -181,14 +184,16 @@
                                     jclass.getAnnotation(AnnotationConstants.WEB_SERVICE);
                             if (annotation != null) {
                                 AxisService axisService;
-                                axisService = createAxisService(classLoader,
-                                                                className,deploymentFileData.getFile().toURL());
+                                axisService =
+                                        createAxisService(classLoader,
+                                                          className,
+                                                          deploymentFileData.getFile().toURL());
                                 axisServiceList.add(axisService);
                             }
                         }
                     }
                 }
-                if (axisServiceList.size() >0 ) {
+                if (axisServiceList.size() > 0) {
                     AxisServiceGroup serviceGroup = new AxisServiceGroup();
                     serviceGroup.setServiceGroupName(deploymentFileData.getName());
                     for (int i = 0; i < axisServiceList.size(); i++) {
@@ -197,25 +202,18 @@
                     }
                     configCtx.getAxisConfiguration().addServiceGroup(serviceGroup);
                 } else {
-                    log.info("No annotated class found in the jar: "  + deploymentFileData.getFile().getName());
+                    String msg = "Error:\n No annotated classes found in the jar: " +
+                                 deploymentFileData.getFile().getName() +
+                                 ". Service deployment failed.";
+                    log.error(msg);
+                    configCtx.getAxisConfiguration().getFaultyServices().
+                            put(deploymentFileData.getFile().getAbsolutePath(), msg);
                 }
             }
         } catch (Exception e) {
-            StringWriter errorWriter = new StringWriter();
-            PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
-            e.printStackTrace(error_ptintWriter);
-            String serviceStatus = "Error:\n" + errorWriter.toString();
-            configCtx.getAxisConfiguration().getFaultyServices().put(
-                    deploymentFileData.getFile().getAbsolutePath(),
-                    serviceStatus);
-        }catch (Throwable t) {
-            StringWriter errorWriter = new StringWriter();
-            PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
-            t.printStackTrace(error_ptintWriter);
-            String serviceStatus = "Error:\n" + errorWriter.toString();
-            configCtx.getAxisConfiguration().getFaultyServices().put(
-                    deploymentFileData.getFile().getAbsolutePath(),
-                    serviceStatus);
+            storeFaultyService(deploymentFileData, e);
+        } catch (Throwable t) {
+            storeFaultyService(deploymentFileData, t);
         } finally {
             if (threadClassLoader != null) {
                 Thread.currentThread().setContextClassLoader(threadClassLoader);
@@ -223,12 +221,21 @@
         }
     }
 
+    private void storeFaultyService(DeploymentFileData deploymentFileData, Throwable t) {
+        StringWriter errorWriter = new StringWriter();
+        PrintWriter ptintWriter = new PrintWriter(errorWriter);
+        t.printStackTrace(ptintWriter);
+        String error = "Error:\n" + errorWriter.toString();
+        configCtx.getAxisConfiguration().getFaultyServices().
+                put(deploymentFileData.getFile().getAbsolutePath(), error);
+    }
+
     private AxisService createAxisService(ClassLoader classLoader,
                                           String className,
                                           URL serviceLocation) throws ClassNotFoundException,
-            InstantiationException,
-            IllegalAccessException,
-            AxisFault {
+                                                                      InstantiationException,
+                                                                      IllegalAccessException,
+                                                                      AxisFault {
         AxisService axisService;
         try {
             Class claxx = Class.forName(
@@ -239,10 +246,29 @@
             Class pojoClass = Loader.loadClass(classLoader, className);
             axisService =
                     (AxisService) mthod.invoke(claxx, new Object[]{pojoClass});
+            if (axisService != null) {
+                Iterator operations = axisService.getOperations();
+                while (operations.hasNext()) {
+                    AxisOperation axisOperation = (AxisOperation) operations.next();
+                    if (axisOperation.getMessageReceiver() == null) {
+                        try {
+                            Class jaxwsMR = Loader.loadClass(
+                                    "org.apache.axis2.jaxws.server.JAXWSMessageReceiver");
+                            MessageReceiver jaxwsMRInstance =
+                                    (MessageReceiver) jaxwsMR.newInstance();
+                            axisOperation.setMessageReceiver(jaxwsMRInstance);
+                        } catch (Exception e) {
+                            log.debug("Error occurde while loading JAXWSMessageReceiver for "
+                                    + className );
+                        }
+                    }
+                }
+            }
+            axisService.setElementFormDefault(false);
             Utils.fillAxisService(axisService,
-                    configCtx.getAxisConfiguration(),
-                    new ArrayList(),
-                    new ArrayList());
+                                  configCtx.getAxisConfiguration(),
+                                  new ArrayList(),
+                                  new ArrayList());
             setMessageReceivers(axisService);
 
         } catch (Exception e) {
@@ -257,24 +283,24 @@
                                                       ClassLoader classLoader,
                                                       URL serviceLocation)
             throws ClassNotFoundException,
-            InstantiationException,
-            IllegalAccessException,
-            AxisFault {
+                   InstantiationException,
+                   IllegalAccessException,
+                   AxisFault {
         HashMap messageReciverMap = new HashMap();
         Class inOnlyMessageReceiver = Loader.loadClass(
                 "org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver");
         MessageReceiver messageReceiver =
                 (MessageReceiver) inOnlyMessageReceiver.newInstance();
-        messageReciverMap.put( WSDL2Constants.MEP_URI_IN_ONLY,
-                                        messageReceiver);
+        messageReciverMap.put(WSDL2Constants.MEP_URI_IN_ONLY,
+                              messageReceiver);
         Class inoutMessageReceiver = Loader.loadClass(
                 "org.apache.axis2.rpc.receivers.RPCMessageReceiver");
         MessageReceiver inOutmessageReceiver =
                 (MessageReceiver) inoutMessageReceiver.newInstance();
         messageReciverMap.put(WSDL2Constants.MEP_URI_IN_OUT,
-                                        inOutmessageReceiver);
+                              inOutmessageReceiver);
         messageReciverMap.put(WSDL2Constants.MEP_URI_ROBUST_IN_ONLY,
-                                                      inOutmessageReceiver);
+                              inOutmessageReceiver);
         AxisService axisService =
                 AxisService.createService(className,
                                           configCtx.getAxisConfiguration(),
@@ -293,8 +319,8 @@
             if (MEP != null) {
                 try {
                     if (WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_ONLY.equals(MEP)
-                            || WSDLConstants.WSDL20_2004_Constants.MEP_URI_IN_ONLY.equals(MEP)
-                            || WSDL2Constants.MEP_URI_IN_ONLY.equals(MEP)) {
+                        || WSDLConstants.WSDL20_2004_Constants.MEP_URI_IN_ONLY.equals(MEP)
+                        || WSDL2Constants.MEP_URI_IN_ONLY.equals(MEP)) {
                         Class inOnlyMessageReceiver = Loader.loadClass(
                                 "org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver");
                         MessageReceiver messageReceiver =
@@ -325,30 +351,30 @@
     }
 
     public void unDeploy(String fileName) {
-        if(fileName.endsWith(".class")){
+        if (fileName.endsWith(".class")) {
             String className = fileName.replaceAll(".class", "");
             try {
                 AxisServiceGroup serviceGroup =
                         configCtx.getAxisConfiguration().removeServiceGroup(className);
                 configCtx.removeServiceGroupContext(serviceGroup);
                 log.info(Messages.getMessage(DeploymentErrorMsgs.SERVICE_REMOVED,
-                        fileName));
+                                             fileName));
             } catch (AxisFault axisFault) {
                 //May be a faulty service
                 configCtx.getAxisConfiguration().removeFaultyService(fileName);
             }
-        } else if (fileName.endsWith(".jar")){
+        } else if (fileName.endsWith(".jar")) {
             try {
                 AxisServiceGroup serviceGroup =
                         configCtx.getAxisConfiguration().removeServiceGroup(fileName);
                 configCtx.removeServiceGroupContext(serviceGroup);
                 log.info(Messages.getMessage(DeploymentErrorMsgs.SERVICE_REMOVED,
-                        fileName));
+                                             fileName));
             } catch (AxisFault axisFault) {
                 //May be a faulty service
                 configCtx.getAxisConfiguration().removeFaultyService(fileName);
             }
         }
-     }
+    }
 }
 

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java Sat Dec  1 06:43:28 2007
@@ -30,7 +30,11 @@
 
 import java.io.File;
 import java.io.UnsupportedEncodingException;
-import java.net.*;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.net.URLDecoder;
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -51,7 +55,8 @@
      * then creates a WSInfoList to store information about available modules and services.
      *
      * @param deploymentEngine reference to engine registry for updates
-     * @param isClasspath true if this RepositoryListener should scan the classpath for Modules
+     * @param isClasspath      true if this RepositoryListener should scan the classpath for
+     *                         Modules
      */
     public RepositoryListener(DeploymentEngine deploymentEngine, boolean isClasspath) {
         this.deploymentEngine = deploymentEngine;
@@ -79,11 +84,13 @@
                 }
                 if (!file.isDirectory()) {
                     if (DeploymentFileData.isModuleArchiveFile(file.getName())) {
-                        addFileToDeploy(file, deploymentEngine.getModuleDeployer() , WSInfo.TYPE_MODULE);
+                        addFileToDeploy(file, deploymentEngine.getModuleDeployer(),
+                                        WSInfo.TYPE_MODULE);
                     }
                 } else {
                     if (!"lib".equalsIgnoreCase(file.getName())) {
-                        addFileToDeploy(file, deploymentEngine.getModuleDeployer() ,WSInfo.TYPE_MODULE);
+                        addFileToDeploy(file, deploymentEngine.getModuleDeployer(),
+                                        WSInfo.TYPE_MODULE);
                     }
                 }
             }
@@ -115,15 +122,16 @@
                     URL url = (URL)moduleURLs.nextElement();
                     String fileName = url.toString();
                     if (fileName.startsWith("jar")) {
-                        url = ((java.net.JarURLConnection) url.openConnection()).getJarFileURL();
+                        url = ((java.net.JarURLConnection)url.openConnection()).getJarFileURL();
                         fileName = url.toString();
-                         File f = new File(new URI(fileName));
-                        addFileToDeploy(f, deployer ,WSInfo.TYPE_MODULE);
                     } else if (fileName.startsWith("file")) {
-                        fileName = fileName.substring(0, fileName.lastIndexOf("/META-INF/module.xml"));
-                        File f = new File(new URI(fileName));
-                        addFileToDeploy(f, deployer ,WSInfo.TYPE_MODULE);
-                    } 
+                        fileName =
+                                fileName.substring(0, fileName.lastIndexOf("/META-INF/module.xml"));
+                    } else continue;
+
+                    log.debug("Deploying module from classpath at '" + fileName + "'");
+                    File f = new File(new URI(fileName));
+                    addFileToDeploy(f, deployer, WSInfo.TYPE_MODULE);
 
                 } catch (URISyntaxException e) {
                     log.info(e);
@@ -161,7 +169,7 @@
         ClassLoader cl = deploymentEngine.getAxisConfig().getModuleClassLoader();
         while (cl != null) {
             if (cl instanceof URLClassLoader) {
-                URL[] urls = ((URLClassLoader) cl).getURLs();
+                URL[] urls = ((URLClassLoader)cl).getURLs();
                 for (int i = 0; (urls != null) && i < urls.length; i++) {
                     String path = urls[i].getPath();
                     //If it is a drive letter, adjust accordingly.
@@ -177,7 +185,7 @@
                     if (file.isFile()) {
                         if (DeploymentFileData.isModuleArchiveFile(file.getName())) {
                             //adding modules in the class path
-                            addFileToDeploy(file, deployer,WSInfo.TYPE_MODULE);
+                            addFileToDeploy(file, deployer, WSInfo.TYPE_MODULE);
                         }
                     }
                 }
@@ -199,7 +207,7 @@
             java.net.URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
             String location = url.toString();
             if (location.startsWith("jar")) {
-                url = ((java.net.JarURLConnection) url.openConnection()).getJarFileURL();
+                url = ((java.net.JarURLConnection)url.openConnection()).getJarFileURL();
                 location = url.toString();
             }
             if (location.startsWith("file")) {
@@ -237,10 +245,10 @@
         if (directoryToExtensionMappingMap.size() > 0) {
             Iterator keys = directoryToExtensionMappingMap.keySet().iterator();
             while (keys.hasNext()) {
-                String s = (String) keys.next();
-                ArrayList list = (ArrayList) directoryToExtensionMappingMap.get(s);
+                String s = (String)keys.next();
+                ArrayList list = (ArrayList)directoryToExtensionMappingMap.get(s);
                 for (int i = 0; i < list.size(); i++) {
-                    String extension = (String) list.get(i);
+                    String extension = (String)list.get(i);
                     findFileForGivenDirectory(s, extension);
                 }
 
@@ -259,8 +267,8 @@
                         if (isSourceControlDir(file)) {
                             continue;
                         }
-                        if (!file.isDirectory() && extension.equals(
-                                DeploymentFileData.getFileExtension(file.getName()))) {
+                        if (!file.isDirectory() && extension
+                                .equals(DeploymentFileData.getFileExtension(file.getName()))) {
                             addFileToDeploy(file,
                                             deploymentEngine.getDeployerForExtension(extension),
                                             WSInfo.TYPE_CUSTOM);
@@ -323,7 +331,7 @@
         update();
     }
 
-    public void addFileToDeploy(File file, Deployer deployer , int type) {
-        wsInfoList.addWSInfoItem(file, deployer ,type);
+    public void addFileToDeploy(File file, Deployer deployer, int type) {
+        wsInfoList.addWSInfoItem(file, deployer, type);
     }
 }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java Sat Dec  1 06:43:28 2007
@@ -130,11 +130,7 @@
             if (descriptionElement != null) {
                 OMElement descriptionValue = descriptionElement.getFirstElement();
                 if (descriptionValue != null) {
-                    StringWriter writer = new StringWriter();
-                    descriptionValue.build();
-                    descriptionValue.serialize(writer);
-                    writer.flush();
-                    service.setDocumentation(writer.toString());
+                    service.setDocumentation(descriptionValue);
                 } else {
                     service.setDocumentation(descriptionElement.getText());
                 }
@@ -383,8 +379,6 @@
                 processDataLocatorConfig(dataLocatorElement, service);
             }
 
-        } catch (XMLStreamException e) {
-            throw new DeploymentException(e);
         } catch (AxisFault axisFault) {
             throw new DeploymentException(axisFault);
         }
@@ -667,8 +661,18 @@
             }
 
             String opname = op_name_att.getAttributeValue();
-            AxisOperation op_descrip;
-            op_descrip = service.getOperation(new QName(opname));
+            AxisOperation op_descrip = null;
+
+            // getting the namesapce from the attribute.
+            OMAttribute operationNamespace = operation.getAttribute(new QName(ATTRIBUTE_NAMESPACE));
+            if (operationNamespace != null){
+                String namespace = operationNamespace.getAttributeValue();
+                op_descrip = service.getOperation(new QName(namespace,opname));
+            }
+            if (op_descrip == null){
+                op_descrip = service.getOperation(new QName(opname));
+            }
+
             if(op_descrip==null){
                 op_descrip = service.getOperation(new QName(service.getTargetNamespace(),opname));
             }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/axis2_default.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/axis2_default.xml?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/axis2_default.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/axis2_default.xml Sat Dec  1 06:43:28 2007
@@ -24,6 +24,10 @@
     <parameter name="hotupdate">false</parameter>
     <parameter name="enableMTOM">false</parameter>
 
+    <!--If turned on with use the Accept header of the request to determine the contentType of the
+    response-->
+    <parameter name="httpContentNegotiation">false</parameter>
+
     <!--During a fault, stacktrace can be sent with the fault message. The following flag will control -->
     <!--that behaviour.-->
     <parameter name="sendStacktraceDetailsWithFaults">true</parameter>
@@ -96,6 +100,10 @@
                          class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
         <messageFormatter contentType="application/xml"
                          class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
     </messageFormatters>
 
     <!-- ================================================= -->
@@ -167,6 +175,20 @@
     </transportSender>
     <!--<transportSender name="java"-->
                      <!--class="org.apache.axis2.transport.java.JavaTransportSender"/>-->
+
+
+    <!-- ================================================= -->
+    <!--  SOAP Role Configuration                          -->
+    <!-- ================================================= -->
+    <!-- Use the following pattern to configure this axis2
+         instance to act in particular roles. Note that in
+         the absence of any configuration, Axis2 will act 
+         only in the ultimate receiver role -->
+    <!--
+    <SOAPRoleConfiguration isUltimateReceiver="true">
+    	<role>http://my/custom/role</role>
+    </SOAPRoleConfiguration>
+	-->
 
     <!-- ================================================= -->
     <!-- Phases  -->

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/repository/util/DeploymentFileData.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/repository/util/DeploymentFileData.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/repository/util/DeploymentFileData.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/repository/util/DeploymentFileData.java Sat Dec  1 06:43:28 2007
@@ -40,7 +40,6 @@
     private Deployer deployer;
 
     public DeploymentFileData(File file) {
-        if (file == null) throw new IllegalArgumentException("Filename must not be null");
         this.file = file;
     }
 
@@ -113,7 +112,7 @@
                                                                 this.file.getAbsolutePath()));
                     }
                     urlsToLoadFrom = new URL[]{this.file.toURL()};
-                    classLoader = Utils.createClassLoader(urlsToLoadFrom, parent, true, file);
+                    classLoader = Utils.createClassLoader(urlsToLoadFrom, parent, false, file);
                 } catch (Exception e) {
                     throw AxisFault.makeFault(e);
                 }

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/repository/util/WSInfoList.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/repository/util/WSInfoList.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/repository/util/WSInfoList.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/repository/util/WSInfoList.java Sat Dec  1 06:43:28 2007
@@ -64,7 +64,7 @@
      * @param file actual jar files for either Module or service
      */
     public synchronized void addWSInfoItem(File file, Deployer deployer , int type) {
-        WSInfo info = (WSInfo) currentJars.get(file.getName());
+        WSInfo info = (WSInfo) currentJars.get(file.getAbsolutePath());
         if (info != null) {
             if (deploymentEngine.isHotUpdate() && isModified(file, info)) {
 //            info.setLastModifiedDate(file.lastModified());
@@ -74,8 +74,8 @@
                 deploymentEngine.addWSToDeploy(deploymentFileData);    // add entry to deploylist
             }
         } else {
-            info = getFileItem(file,deployer,type);
-            setLastModifiedDate(file,info);
+            info = getFileItem(file, deployer, type);
+            setLastModifiedDate(file, info);
         }
 
         jarList.add(info.getFileName());

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/resolver/AARFileBasedURIResolver.java Sat Dec  1 06:43:28 2007
@@ -80,7 +80,10 @@
                             out.write(buf, 0, read);
                         }
                         ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
-                        return new InputSource(in);
+                        InputSource inputSoruce = new InputSource(in);
+                        inputSoruce.setSystemId(lastImportLocation.getPath());
+                        inputSoruce.setPublicId(targetNamespace);
+                        return inputSoruce;
                     }
                 }
 

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java Sat Dec  1 06:43:28 2007
@@ -364,11 +364,11 @@
 
         for (int i = 0; i < method.length; i++) {
             JMethod jmethod = method[i];
-            String opName = jmethod.getSimpleName();
+            String opName = getSimpleName(jmethod);
             AxisOperation operation = axisService.getOperation(new QName(opName));
             // if the operation there in services.xml then try to set it schema element name
             if (operation == null) {
-                operation = axisService.getOperation(new QName(jmethod.getSimpleName()));
+                operation = axisService.getOperation(new QName(getSimpleName(jmethod)));
             }
             MessageReceiver mr = axisService.getMessageReceiver(
                     operation.getMessageExchangePattern());
@@ -401,7 +401,7 @@
             operation = AxisOperationFactory.getAxisOperation(
                     WSDLConstants.MEP_CONSTANT_IN_OUT);
         }
-        String opName = jmethod.getSimpleName();
+        String opName = getSimpleName(jmethod);
         operation.setName(new QName(opName));
         JAnnotation methodAnnon = jmethod.getAnnotation(AnnotationConstants.WEB_METHOD);
         if (methodAnnon != null) {
@@ -412,6 +412,17 @@
         }
         return operation;
     }
+
+    public static String getSimpleName(JMethod method) {
+        JAnnotation methodAnnon = method.getAnnotation(AnnotationConstants.WEB_METHOD);
+        if (methodAnnon != null) {
+            if (methodAnnon.getValue(AnnotationConstants.OPERATION_NAME) !=null) {
+                return methodAnnon.getValue(AnnotationConstants.OPERATION_NAME).asString();
+            }
+        }
+        return method.getSimpleName();
+    }
+
 
     public static OMElement getParameter(String name, String value, boolean locked) {
         OMFactory fac = OMAbstractFactory.getOMFactory();

Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisDescription.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisDescription.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisDescription.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisDescription.java Sat Dec  1 06:43:28 2007
@@ -16,23 +16,29 @@
 
 package org.apache.axis2.description;
 
+import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNode;
+import org.apache.axiom.om.OMText;
 import org.apache.axis2.AxisFault;
-import org.apache.axis2.util.Utils;
-import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.modules.Module;
+import org.apache.axis2.util.JavaUtils;
+import org.apache.axis2.util.Utils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.neethi.Assertion;
 import org.apache.neethi.Policy;
 
+import javax.xml.stream.XMLStreamException;
+import java.io.StringWriter;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Collection;
 import java.util.Map;
 
 public abstract class AxisDescription implements ParameterInclude,
@@ -48,8 +54,10 @@
 
     protected Map engagedModules;
 
+    private OMFactory omFactory = OMAbstractFactory.getOMFactory();
+
     // Holds the documentation details for each element
-    private String documentation;
+    private OMNode documentation;
 
     // creating a logger instance
     private Log log = LogFactory.getLog(this.getClass());
@@ -137,11 +145,36 @@
     }
 
     public String getDocumentation() {
+        if (documentation != null) {
+            if (documentation.getType() == OMNode.TEXT_NODE) {
+                return ((OMText)documentation).getText();
+            } else {
+                StringWriter writer = new StringWriter();
+                documentation.build();
+                try {
+                    documentation.serialize(writer);
+                } catch (XMLStreamException e) {
+                    log.error(e);
+                }
+                writer.flush();
+                return writer.toString();
+            }
+        }
+        return null;
+    }
+
+    public OMNode getDocumentationNode() {
         return documentation;
     }
 
-    public void setDocumentation(String documentation) {
+    public void setDocumentation(OMNode documentation) {
         this.documentation = documentation;
+    }
+
+    public void setDocumentation(String documentation) {
+        if (!"".equals(documentation)) {
+            this.documentation = omFactory.createOMText(documentation);
+        }
     }
 
     public void setParent(AxisDescription parent) {



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