cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dand...@apache.org
Subject svn commit: r450267 [1/2] - in /incubator/cxf/trunk: ./ api/src/main/java/org/apache/cxf/databinding/ common/common/src/main/java/org/apache/cxf/common/util/ rt/ rt/core/src/main/java/org/apache/cxf/service/ rt/core/src/main/java/org/apache/cxf/service...
Date Wed, 27 Sep 2006 00:31:20 GMT
Author: dandiep
Date: Tue Sep 26 17:31:18 2006
New Revision: 450267

URL: http://svn.apache.org/viewvc?view=rev&rev=450267
Log:
o Add a simple frontend which contains the ability to build services without
  jax-ws annotations. 
o Add an AbstracTBindingInfoFactory class which can create BindingInfos from 
  the service class/model.
o Rename JaxwsFoo to JaxWs foo so things are consistent
o Add ParamReader/ClassReader classes for reading in parameter names
o Switch check style to allow comments on the same line as code because 
  not doing so really impairs the readability of ParamReader/ClassReader.
  Also allow control variables to be modified as I don't think there is
  really anything wrong with that, and it makes for more readable code
  in the ClassReader.
o Add a DataBinding.initialize(ServiceInfo) method which allows databindings
  to set up the type information for MessagePartInfos.

Added:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ClassReader.java   (with props)
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ParamReader.java   (with props)
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java   (with props)
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBServiceModelInitializer.java   (with props)
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java
    incubator/cxf/trunk/rt/frontend/simple/
    incubator/cxf/trunk/rt/frontend/simple/.checkstyle
    incubator/cxf/trunk/rt/frontend/simple/.pmd
    incubator/cxf/trunk/rt/frontend/simple/.ruleset
    incubator/cxf/trunk/rt/frontend/simple/pom.xml   (with props)
    incubator/cxf/trunk/rt/frontend/simple/src/
    incubator/cxf/trunk/rt/frontend/simple/src/main/
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/AbstractBindingInfoFactoryBean.java   (with props)
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/AbstractServiceConfiguration.java   (with props)
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java   (with props)
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java   (with props)
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SoapBindingInfoFactoryBean.java   (with props)
    incubator/cxf/trunk/rt/frontend/simple/src/main/resources/
    incubator/cxf/trunk/rt/frontend/simple/src/main/resources/META-INF/
    incubator/cxf/trunk/rt/frontend/simple/src/main/resources/META-INF/DISCLAIMER
    incubator/cxf/trunk/rt/frontend/simple/src/main/resources/META-INF/LICENSE   (with props)
    incubator/cxf/trunk/rt/frontend/simple/src/main/resources/META-INF/NOTICE   (with props)
    incubator/cxf/trunk/rt/frontend/simple/src/test/
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/HelloService.java   (with props)
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java   (with props)
Removed:
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceConfiguration.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxwsEndpointImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxwsImplementorInfo.java
Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataBinding.java
    incubator/cxf/trunk/checkstyle.xml
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Messages.properties
    incubator/cxf/trunk/rt/frontend/jaxws/pom.xml
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ProviderChainObserver.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebContextResourceResolver.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/CXFServlet.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletDestination.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ProviderServiceFactoryBean.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/WebServiceProviderConfiguration.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ConfiguredEndpointTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptorTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/StreamHandlerInterceptorTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/ProviderServiceFactoryBeanTest.java
    incubator/cxf/trunk/rt/pom.xml

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataBinding.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataBinding.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataBinding.java Tue Sep 26 17:31:18 2006
@@ -31,5 +31,12 @@
     DataWriterFactory getDataWriterFactory();
     
     Map<String, SchemaInfo> getSchemas(ServiceInfo serviceInfo);
-        
+
+    /**
+     * Initialize the service info (i.e. type & element names) with 
+     * information from the databinding.
+     * @param serviceInfo
+     */
+    void initialize(ServiceInfo serviceInfo);
+
 }

Modified: incubator/cxf/trunk/checkstyle.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/checkstyle.xml?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/checkstyle.xml (original)
+++ incubator/cxf/trunk/checkstyle.xml Tue Sep 26 17:31:18 2006
@@ -177,7 +177,7 @@
         <module name="InnerAssignment"/>
         <!--<module name="MagicNumber"/>-->
         <module name="MissingSwitchDefault"/>
-        <module name="ModifiedControlVariable"/>
+        <!--module name="ModifiedControlVariable"/-->
         <module name="SimplifyBooleanExpression"/>
         <module name="SimplifyBooleanReturn"/>
         <module name="StringLiteralEquality"/>
@@ -277,7 +277,7 @@
 		</module>
  
         <!--<module name="UncommentedMain"/>-->
-        <module name="TrailingComment"/>
+        <!--module name="TrailingComment"/-->
         <module name="Indentation">
             <property name="caseIndent" value="0"/>
         </module>

Added: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ClassReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ClassReader.java?view=auto&rev=450267
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ClassReader.java (added)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ClassReader.java Tue Sep 26 17:31:18 2006
@@ -0,0 +1,441 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.cxf.common.util;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * This is the class file reader for obtaining the parameter names for declared
+ * methods in a class. The class must have debugging attributes for us to obtain
+ * this information.
+ * <p>
+ * This does not work for inherited methods. To obtain parameter names for
+ * inherited methods, you must use a paramReader for the class that originally
+ * declared the method.
+ * <p>
+ * don't get tricky, it's the bare minimum. Instances of this class are not
+ * threadsafe -- don't share them.
+ * <p>
+ * 
+ * @author Edwin Smith, Macromedia
+ */
+public class ClassReader extends ByteArrayInputStream {
+    // constants values that appear in java class files,
+    // from jvm spec 2nd ed, section 4.4, pp 103
+    private static final int CONSTANT_CLASS = 7;
+    private static final int CONSTANT_FIELDREF = 9;
+    private static final int CONSTANT_METHODREF = 10;
+    private static final int CONSTANT_INTERFACE_METHOD_REF = 11;
+    private static final int CONSTANT_STRING = 8;
+    private static final int CONSTANT_INTEGER = 3;
+    private static final int CONSTANT_FLOAT = 4;
+    private static final int CONSTANT_LONG = 5;
+    private static final int CONSTANT_DOUBLE = 6;
+    private static final int CONSTANT_NAME_AND_TYPE = 12;
+    private static final int CONSTANT_UTF_8 = 1;
+    /**
+     * the constant pool. constant pool indices in the class file directly index
+     * into this array. The value stored in this array is the position in the
+     * class file where that constant begins.
+     */
+    private int[] cpoolIndex;
+    private Object[] cpool;
+
+    private Map<String, Method> attrMethods;
+
+    protected ClassReader(byte buf[], Map<String, Method> attrMethods) {
+        super(buf);
+
+        this.attrMethods = attrMethods;
+    }
+    
+    /**
+     * load the bytecode for a given class, by using the class's defining
+     * classloader and assuming that for a class named P.C, the bytecodes are in
+     * a resource named /P/C.class.
+     * 
+     * @param c the class of interest
+     * @return a byte array containing the bytecode
+     * @throws IOException
+     */
+    protected static byte[] getBytes(Class c) throws IOException {
+        InputStream fin = c.getResourceAsStream('/' + c.getName().replace('.', '/') + ".class");
+        if (fin == null) {
+            throw new IOException();
+        }
+        try {
+            ByteArrayOutputStream out = new ByteArrayOutputStream();
+            byte[] buf = new byte[1024];
+            int actual;
+            do {
+                actual = fin.read(buf);
+                if (actual > 0) {
+                    out.write(buf, 0, actual);
+                }
+            } while (actual > 0);
+            return out.toByteArray();
+        } finally {
+            fin.close();
+        }
+    }
+
+    static String classDescriptorToName(String desc) {
+        return desc.replace('/', '.');
+    }
+
+    protected static Map<String, Method> findAttributeReaders(Class c) {
+        Map<String, Method> map = new HashMap<String, Method>();
+        Method[] methods = c.getMethods();
+
+        for (int i = 0; i < methods.length; i++) {
+            String name = methods[i].getName();
+            if (name.startsWith("read") && methods[i].getReturnType() == void.class) {
+                map.put(name.substring(4), methods[i]);
+            }
+        }
+
+        return map;
+    }
+
+    protected static String getSignature(Member method, Class[] paramTypes) {
+        // compute the method descriptor
+
+        StringBuffer b = new StringBuffer((method instanceof Method) ? method.getName() : "<init>");
+        b.append('(');
+
+        for (int i = 0; i < paramTypes.length; i++) {
+            addDescriptor(b, paramTypes[i]);
+        }
+
+        b.append(')');
+        if (method instanceof Method) {
+            addDescriptor(b, ((Method)method).getReturnType());
+        } else if (method instanceof Constructor) {
+            addDescriptor(b, void.class);
+        }
+
+        return b.toString();
+    }
+
+    private static void addDescriptor(StringBuffer b, Class c) {
+        if (c.isPrimitive()) {
+            if (c == void.class) {
+                b.append('V');
+            } else if (c == int.class) {
+                b.append('I');
+            } else if (c == boolean.class) {
+                b.append('Z');
+            } else if (c == byte.class) {
+                b.append('B');
+            } else if (c == short.class) {
+                b.append('S');
+            } else if (c == long.class) {
+                b.append('J');
+            } else if (c == char.class) {
+                b.append('C');
+            } else if (c == float.class) {
+                b.append('F');
+            } else if (c == double.class) {
+                b.append('D');
+            }
+        } else if (c.isArray()) {
+            b.append('[');
+            addDescriptor(b, c.getComponentType());
+        } else {
+            b.append('L').append(c.getName().replace('.', '/')).append(';');
+        }
+    }
+
+    /**
+     * @return the next unsigned 16 bit value
+     */
+    protected final int readShort() {
+        return (read() << 8) | read();
+    }
+
+    /**
+     * @return the next signed 32 bit value
+     */
+    protected final int readInt() {
+        return (read() << 24) | (read() << 16) | (read() << 8) | read();
+    }
+
+    /**
+     * skip n bytes in the input stream.
+     */
+    protected void skipFully(int n) throws IOException {
+        while (n > 0) {
+            int c = (int)skip(n);
+            if (c <= 0) {
+                throw new EOFException();
+            }
+
+            n -= c;
+        }
+    }
+
+    protected final Member resolveMethod(int index) throws IOException, ClassNotFoundException,
+        NoSuchMethodException {
+        int oldPos = pos;
+        try {
+            Member m = (Member)cpool[index];
+            if (m == null) {
+                pos = cpoolIndex[index];
+                Class owner = resolveClass(readShort());
+                NameAndType nt = resolveNameAndType(readShort());
+                String signature = nt.name + nt.type;
+                if ("<init>".equals(nt.name)) {
+                    Constructor[] ctors = owner.getConstructors();
+                    for (int i = 0; i < ctors.length; i++) {
+                        String sig = getSignature(ctors[i], ctors[i].getParameterTypes());
+                        if (sig.equals(signature)) {
+                            cpool[index] = ctors[i];
+                            m = ctors[i];
+                            return m;
+                        }
+                    }
+                } else {
+                    Method[] methods = owner.getDeclaredMethods();
+                    for (int i = 0; i < methods.length; i++) {
+                        String sig = getSignature(methods[i], methods[i].getParameterTypes());
+                        if (sig.equals(signature)) {
+                            cpool[index] = methods[i];
+                            m = methods[i];
+                            return m;
+                        }
+                    }
+                }
+                throw new NoSuchMethodException(signature);
+            }
+            return m;
+        } finally {
+            pos = oldPos;
+        }
+
+    }
+
+    protected final Field resolveField(int i) throws IOException, ClassNotFoundException,
+        NoSuchFieldException {
+        int oldPos = pos;
+        try {
+            Field f = (Field)cpool[i];
+            if (f == null) {
+                pos = cpoolIndex[i];
+                Class owner = resolveClass(readShort());
+                NameAndType nt = resolveNameAndType(readShort());
+                cpool[i] = owner.getDeclaredField(nt.name);
+                f = owner.getDeclaredField(nt.name);
+            }
+            return f;
+        } finally {
+            pos = oldPos;
+        }
+    }
+
+    protected final NameAndType resolveNameAndType(int i) throws IOException {
+        int oldPos = pos;
+        try {
+            NameAndType nt = (NameAndType)cpool[i];
+            if (nt == null) {
+                pos = cpoolIndex[i];
+                String name = resolveUtf8(readShort());
+                String type = resolveUtf8(readShort());
+                cpool[i] = new NameAndType(name, type);
+                nt = new NameAndType(name, type);
+            }
+            return nt;
+        } finally {
+            pos = oldPos;
+        }
+    }
+
+    protected final Class resolveClass(int i) throws IOException, ClassNotFoundException {
+        int oldPos = pos;
+        try {
+            Class c = (Class)cpool[i];
+            if (c == null) {
+                pos = cpoolIndex[i];
+                String name = resolveUtf8(readShort());
+                cpool[i] = Class.forName(classDescriptorToName(name));
+                c = Class.forName(classDescriptorToName(name));
+            }
+            return c;
+        } finally {
+            pos = oldPos;
+        }
+    }
+
+    protected final String resolveUtf8(int i) throws IOException {
+        int oldPos = pos;
+        try {
+            String s = (String)cpool[i];
+            if (s == null) {
+                pos = cpoolIndex[i];
+                int len = readShort();
+                skipFully(len);
+                cpool[i] = new String(buf, pos - len, len, "utf-8");
+                s = new String(buf, pos - len, len, "utf-8");
+            }
+            return s;
+        } finally {
+            pos = oldPos;
+        }
+    }
+
+    protected final void readCpool() throws IOException {
+        int count = readShort(); // cpool count
+        cpoolIndex = new int[count];
+        cpool = new Object[count];
+        for (int i = 1; i < count; i++) {
+            int c = read();
+            cpoolIndex[i] = super.pos;
+            // constant pool tag
+            switch (c) {
+            case CONSTANT_FIELDREF:
+            case CONSTANT_METHODREF:
+            case CONSTANT_INTERFACE_METHOD_REF:
+            case CONSTANT_NAME_AND_TYPE:
+
+                readShort(); // class index or (12) name index
+                // fall through
+
+            case CONSTANT_CLASS:
+            case CONSTANT_STRING:
+
+                readShort(); // string index or class index
+                break;
+
+            case CONSTANT_LONG:
+            case CONSTANT_DOUBLE:
+
+                readInt(); // hi-value
+
+                // see jvm spec section 4.4.5 - double and long cpool
+                // entries occupy two "slots" in the cpool table.
+                i++;
+                // fall through
+
+            case CONSTANT_INTEGER:
+            case CONSTANT_FLOAT:
+
+                readInt(); // value
+                break;
+
+            case CONSTANT_UTF_8:
+
+                int len = readShort();
+                skipFully(len);
+                break;
+
+            default:
+                // corrupt class file
+                throw new IllegalStateException();
+            }
+        }
+    }
+
+    protected final void skipAttributes() throws IOException {
+        int count = readShort();
+        for (int i = 0; i < count; i++) {
+            readShort(); // name index
+            skipFully(readInt());
+        }
+    }
+
+    /**
+     * read an attributes array. the elements of a class file that can contain
+     * attributes are: fields, methods, the class itself, and some other types
+     * of attributes.
+     */
+    protected final void readAttributes() throws IOException {
+        int count = readShort();
+        for (int i = 0; i < count; i++) {
+            int nameIndex = readShort(); // name index
+            int attrLen = readInt();
+            int curPos = pos;
+
+            String attrName = resolveUtf8(nameIndex);
+
+            Method m = attrMethods.get(attrName);
+
+            if (m != null) {
+                try {
+                    m.invoke(this, new Object[] {});
+                } catch (IllegalAccessException e) {
+                    pos = curPos;
+                    skipFully(attrLen);
+                } catch (InvocationTargetException e) {
+                    try {
+                        throw e.getTargetException();
+                    } catch (Error ex) {
+                        throw ex;
+                    } catch (RuntimeException ex) {
+                        throw ex;
+                    } catch (IOException ex) {
+                        throw ex;
+                    } catch (Throwable ex) {
+                        pos = curPos;
+                        skipFully(attrLen);
+                    }
+                }
+            } else {
+                // don't care what attribute this is
+                skipFully(attrLen);
+            }
+        }
+    }
+
+    /**
+     * read a code attribute
+     * 
+     * @throws IOException
+     */
+    public void readCode() throws IOException {
+        readShort(); // max stack
+        readShort(); // max locals
+        skipFully(readInt()); // code
+        skipFully(8 * readShort()); // exception table
+
+        // read the code attributes (recursive). This is where
+        // we will find the LocalVariableTable attribute.
+        readAttributes();
+    }
+
+    private static class NameAndType {
+        String name;
+        String type;
+
+        public NameAndType(String name, String type) {
+            this.name = name;
+            this.type = type;
+        }
+    }
+}

Propchange: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ClassReader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ClassReader.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ClassReader.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ParamReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ParamReader.java?view=auto&rev=450267
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ParamReader.java (added)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ParamReader.java Tue Sep 26 17:31:18 2006
@@ -0,0 +1,259 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.cxf.common.util;
+
+// import org.apache.axis.utils.Messages;
+
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.Proxy;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * This is the class file reader for obtaining the parameter names for declared
+ * methods in a class. The class must have debugging attributes for us to obtain
+ * this information.
+ * <p>
+ * This does not work for inherited methods. To obtain parameter names for
+ * inherited methods, you must use a paramReader for the class that originally
+ * declared the method.
+ * <p>
+ * don't get tricky, it's the bare minimum. Instances of this class are not
+ * threadsafe -- don't share them.
+ * <p>
+ * 
+ * @author Edwin Smith, Macromedia
+ */
+public class ParamReader extends ClassReader {
+    private String methodName;
+    private Map<String, MethodInfo> methods = new HashMap<String, MethodInfo>();
+    private Class[] paramTypes;
+
+    /**
+     * process a class file, given it's class. We'll use the defining
+     * classloader to locate the bytecode.
+     * 
+     * @param c
+     * @throws IOException
+     */
+    public ParamReader(Class c) throws IOException {
+        this(getBytes(c));
+    }
+
+    /**
+     * process the given class bytes directly.
+     * 
+     * @param b
+     * @throws IOException
+     */
+    public ParamReader(byte[] b) throws IOException {
+        super(b, findAttributeReaders(ParamReader.class));
+
+        // check the magic number
+        if (readInt() != 0xCAFEBABE) {
+            // not a class file!
+            throw new IOException();
+        }
+
+        readShort(); // minor version
+        readShort(); // major version
+
+        readCpool(); // slurp in the constant pool
+
+        readShort(); // access flags
+        readShort(); // this class name
+        readShort(); // super class name
+
+        int count = readShort(); // ifaces count
+        for (int i = 0; i < count; i++) {
+            readShort(); // interface index
+        }
+
+        count = readShort(); // fields count
+        for (int i = 0; i < count; i++) {
+            readShort(); // access flags
+            readShort(); // name index
+            readShort(); // descriptor index
+            skipAttributes(); // field attributes
+        }
+
+        count = readShort(); // methods count
+        for (int i = 0; i < count; i++) {
+            readShort(); // access flags
+            int m = readShort(); // name index
+            String name = resolveUtf8(m);
+            int d = readShort(); // descriptor index
+            this.methodName = name + resolveUtf8(d);
+            readAttributes(); // method attributes
+        }
+
+    }
+
+    /**
+     * Retrieve a list of function parameter names from a method Returns null if
+     * unable to read parameter names (i.e. bytecode not built with debug).
+     */
+    public static String[] getParameterNamesFromDebugInfo(Method method) {
+        // Don't worry about it if there are no params.
+        int numParams = method.getParameterTypes().length;
+        if (numParams == 0) {
+            return null;
+        }
+        
+        // get declaring class
+        Class c = method.getDeclaringClass();
+
+        // Don't worry about it if the class is a Java dynamic proxy
+        if (Proxy.isProxyClass(c)) {
+            return null;
+        }
+
+        try {
+            // get a parameter reader
+            ParamReader pr = new ParamReader(c);
+            // get the paramter names
+            return pr.getParameterNames(method);
+        } catch (IOException e) {
+            // log it and leave
+            // log.info(Messages.getMessage("error00") + ":" + e);
+            return null;
+        }
+    }
+
+    public void readCode() throws IOException {
+        readShort(); // max stack
+        int maxLocals = readShort(); // max locals
+
+        MethodInfo info = new MethodInfo(maxLocals);
+        if (methods != null && methodName != null) {
+            methods.put(methodName, info);
+        }
+
+        skipFully(readInt()); // code
+        skipFully(8 * readShort()); // exception table
+        // read the code attributes (recursive). This is where
+        // we will find the LocalVariableTable attribute.
+        readAttributes();
+    }
+
+    /**
+     * return the names of the declared parameters for the given constructor. If
+     * we cannot determine the names, return null. The returned array will have
+     * one name per parameter. The length of the array will be the same as the
+     * length of the Class[] array returned by Constructor.getParameterTypes().
+     * 
+     * @param ctor
+     * @return String[] array of names, one per parameter, or null
+     */
+    public String[] getParameterNames(Constructor ctor) {
+        paramTypes = ctor.getParameterTypes();
+        return getParameterNames(ctor, paramTypes);
+    }
+
+    /**
+     * return the names of the declared parameters for the given method. If we
+     * cannot determine the names, return null. The returned array will have one
+     * name per parameter. The length of the array will be the same as the
+     * length of the Class[] array returned by Method.getParameterTypes().
+     * 
+     * @param method
+     * @return String[] array of names, one per parameter, or null
+     */
+    public String[] getParameterNames(Method method) {
+        paramTypes = method.getParameterTypes();
+        return getParameterNames(method, paramTypes);
+    }
+
+    protected String[] getParameterNames(Member member, Class[] pTypes) {
+        // look up the names for this method
+        MethodInfo info = (MethodInfo)methods.get(getSignature(member, pTypes));
+
+        // we know all the local variable names, but we only need to return
+        // the names of the parameters.
+
+        if (info != null) {
+            String[] paramNames = new String[pTypes.length];
+            int j = Modifier.isStatic(member.getModifiers()) ? 0 : 1;
+
+            boolean found = false; // did we find any non-null names
+            for (int i = 0; i < paramNames.length; i++) {
+                if (info.names[j] != null) {
+                    found = true;
+                    paramNames[i] = info.names[j];
+                }
+                j++;
+                if (pTypes[i] == double.class || pTypes[i] == long.class) {
+                    // skip a slot for 64bit params
+                    j++;
+                }
+            }
+
+            if (found) {
+                return paramNames;
+            } else {
+                return null;
+            }
+        } else {
+            return null;
+        }
+    }
+
+    private static class MethodInfo {
+        String[] names;
+        int maxLocals;
+
+        public MethodInfo(int maxLocals) {
+            this.maxLocals = maxLocals;
+            names = new String[maxLocals];
+        }
+    }
+
+    private MethodInfo getMethodInfo() {
+        MethodInfo info = null;
+        if (methods != null && methodName != null) {
+            info = (MethodInfo)methods.get(methodName);
+        }
+        return info;
+    }
+
+    /**
+     * this is invoked when a LocalVariableTable attribute is encountered.
+     * 
+     * @throws IOException
+     */
+    public void readLocalVariableTable() throws IOException {
+        int len = readShort(); // table length
+        MethodInfo info = getMethodInfo();
+        for (int j = 0; j < len; j++) {
+            readShort(); // start pc
+            readShort(); // length
+            int nameIndex = readShort(); // name_index
+            readShort(); // descriptor_index
+            int index = readShort(); // local index
+            if (info != null) {
+                info.names[index] = resolveUtf8(nameIndex);
+            }
+        }
+    }
+}

Propchange: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ParamReader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ParamReader.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/ParamReader.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java?view=auto&rev=450267
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java (added)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java Tue Sep 26 17:31:18 2006
@@ -0,0 +1,111 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.cxf.service;
+
+import org.apache.cxf.service.model.FaultInfo;
+import org.apache.cxf.service.model.InterfaceInfo;
+import org.apache.cxf.service.model.MessageInfo;
+import org.apache.cxf.service.model.MessagePartInfo;
+import org.apache.cxf.service.model.OperationInfo;
+import org.apache.cxf.service.model.ServiceInfo;
+
+/**
+ * Implements the Visitor pattern for the Service model.
+ *
+ */
+public class ServiceModelVisitor {
+    private ServiceInfo serviceInfo;
+    
+    public ServiceModelVisitor(ServiceInfo serviceInfo) {
+        super();
+        this.serviceInfo = serviceInfo;
+    }
+    
+    public void walk() {
+        begin(serviceInfo);
+        begin(serviceInfo.getInterface());
+        
+        for (OperationInfo o : serviceInfo.getInterface().getOperations()) {
+            begin(o);
+            
+            MessageInfo in = o.getInput();
+            if (in != null) {
+                begin(in);
+                
+                for (MessagePartInfo part : in.getMessageParts()) {
+                    begin(part);
+                    end(part);
+                }
+                
+                end(in);
+            }
+            
+            MessageInfo out = o.getOutput();
+            if (out != null) {
+                begin(out);
+                
+                for (MessagePartInfo part : out.getMessageParts()) {
+                    begin(part);
+                    end(part);
+                }
+                
+                end(out);
+            }
+            
+            for (FaultInfo f : o.getFaults()) {
+                begin(f);
+                
+                for (MessagePartInfo part : f.getMessageParts()) {
+                    begin(part);
+                    end(part);
+                }
+                
+                end(f);
+            }
+            end(o);
+        }
+        
+        end(serviceInfo);
+    }
+    
+    public void begin(ServiceInfo service) {
+    }
+    public void begin(InterfaceInfo intf) {
+    }
+    public void begin(OperationInfo op) {
+    }
+    public void begin(MessageInfo msg) {
+    }
+    public void begin(MessagePartInfo part) {
+    }
+    public void begin(FaultInfo fault) {
+    }
+    public void end(ServiceInfo service) {
+    }
+    public void end(InterfaceInfo intf) {
+    }
+    public void end(OperationInfo op) {
+    }
+    public void end(MessageInfo msg) {
+    }
+    public void end(MessagePartInfo part) {
+    }
+    public void end(FaultInfo fault) {
+    }
+}

Propchange: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java Tue Sep 26 17:31:18 2006
@@ -33,6 +33,7 @@
 import javax.xml.parsers.ParserConfigurationException;
 
 import org.w3c.dom.Document;
+
 import org.xml.sax.SAXException;
 
 import org.apache.cxf.common.i18n.BundleUtils;
@@ -151,5 +152,10 @@
         }
     }
 
-
+    public void initialize(ServiceInfo serviceInfo) {
+        JAXBServiceModelInitializer initializer = new JAXBServiceModelInitializer(serviceInfo);
+        initializer.walk();
+    }
+    
+    
 }

Added: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBServiceModelInitializer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBServiceModelInitializer.java?view=auto&rev=450267
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBServiceModelInitializer.java (added)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBServiceModelInitializer.java Tue Sep 26 17:31:18 2006
@@ -0,0 +1,118 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.cxf.jaxb;
+
+import java.lang.reflect.AnnotatedElement;
+import java.util.ResourceBundle;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.common.classloader.ClassLoaderUtils;
+import org.apache.cxf.common.i18n.BundleUtils;
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.i18n.UncheckedException;
+import org.apache.cxf.service.ServiceModelVisitor;
+import org.apache.cxf.service.model.MessagePartInfo;
+import org.apache.cxf.service.model.ServiceInfo;
+
+/**
+ * Walks the service model and sets up the element/type names.
+ */
+class JAXBServiceModelInitializer extends ServiceModelVisitor {
+
+    private static final ResourceBundle BUNDLE = BundleUtils.getBundle(JAXBServiceModelInitializer.class);
+
+    public JAXBServiceModelInitializer(ServiceInfo serviceInfo) {
+        super(serviceInfo);
+    }
+
+    @Override
+    public void begin(MessagePartInfo part) {
+        Class<?> clazz = (Class<?>)part.getProperty(Class.class.getName());
+
+        XmlRootElement root = (XmlRootElement)clazz.getAnnotation(XmlRootElement.class);
+        XmlType type = (XmlType)clazz.getAnnotation(XmlType.class);
+        String local = null;
+        String nsUri = null;
+        boolean isElement = false;
+
+        if (root != null) {
+            isElement = false;
+            local = root.name();
+            nsUri = root.namespace();
+        } else if (type != null) {
+            isElement = true;
+            local = type.name();
+            nsUri = type.namespace();
+        } else if (clazz.isAnnotationPresent(XmlEnum.class)) {
+            isElement = true;
+            local = clazz.getSimpleName();
+            nsUri = "##default";
+        } else {
+            // we've got a non JAXB bean - i.e. String, etc
+            return;
+        }
+
+        if ("##default".equals(local)) {
+            local = clazz.getSimpleName();
+        }
+
+        if ("##default".equals(nsUri)) {
+            nsUri = getPackageNs(clazz);
+        }
+
+        part.setIsElement(isElement);
+        if (isElement) {
+            part.setElementQName(new QName(nsUri, local));
+        } else {
+            part.setTypeQName(new QName(nsUri, local));
+        }
+    }
+
+    public static String getPackageNs(Class clazz) {
+        AnnotatedElement pack = clazz.getPackage();
+        // getPackage isn't guaranteed to return a package
+        if (pack == null) {
+            try {
+                pack = ClassLoaderUtils.loadClass(
+                    clazz.getName().substring(0, clazz.getName().lastIndexOf('.')) + ".package-info", clazz);
+            } catch (Exception ex) {
+                // do nothing
+            }
+        }
+
+        if (pack == null) {
+            throw new UncheckedException(new Message("UNKNOWN_PACKAGE_NS", BUNDLE, clazz));
+        }
+
+        javax.xml.bind.annotation.XmlSchema schema = pack
+            .getAnnotation(javax.xml.bind.annotation.XmlSchema.class);
+        String namespace = null;
+        if (schema != null) {
+            namespace = schema.namespace();
+        } else {
+            namespace = "";
+        }
+        return namespace;
+    }
+}

Propchange: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBServiceModelInitializer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBServiceModelInitializer.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBServiceModelInitializer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Messages.properties?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Messages.properties (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Messages.properties Tue Sep 26 17:31:18 2006
@@ -1,4 +1,6 @@
 INIT_OBJ_CONTEXT_FAILED = ObjectMessageContext Intialisation Failed.
 SCHEMA_NOT_RESOLVED = Could not resolve URI: {0}
-UNKNOWN_SOURCE = Marshalling Error, unrecognized source {0}
-MARSHAL_ERROR = Marshalling Error
\ No newline at end of file
+UNKNOWN_SOURCE = Marshalling Error, unrecognized source {0}.
+MARSHAL_ERROR = Marshalling Error.
+UNKNOWN_ELEMENT_NAME = Could not determine the element name for {0}.
+UNKNOWN_PACKAGE_NS = No package info found for class {0}. Cannot lookup default schema namespace.
\ No newline at end of file

Modified: incubator/cxf/trunk/rt/frontend/jaxws/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/pom.xml?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/pom.xml (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/pom.xml Tue Sep 26 17:31:18 2006
@@ -82,6 +82,11 @@
 
         <dependency>
             <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-simple</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-local</artifactId>
             <version>${project.version}</version>
             <optional>true</optional>

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java Tue Sep 26 17:31:18 2006
@@ -43,9 +43,9 @@
 import org.apache.cxf.jaxb.JAXBDataReaderFactory;
 import org.apache.cxf.jaxb.JAXBDataWriterFactory;
 import org.apache.cxf.jaxws.context.WebContextResourceResolver;
+import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
+import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
 import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
-import org.apache.cxf.jaxws.support.JaxwsEndpointImpl;
-import org.apache.cxf.jaxws.support.JaxwsImplementorInfo;
 import org.apache.cxf.jaxws.support.ProviderServiceFactoryBean;
 import org.apache.cxf.resource.ResourceManager;
 import org.apache.cxf.service.Service;
@@ -67,8 +67,8 @@
     private Object implementor;
     private ServerImpl server;
     private Service service;
-    private JaxwsEndpointImpl endpoint;
-    private JaxwsImplementorInfo implInfo;
+    private JaxWsEndpointImpl endpoint;
+    private JaxWsImplementorInfo implInfo;
     
     @SuppressWarnings("unchecked")
     public EndpointImpl(Bus b, Object i, String uri) {
@@ -76,7 +76,7 @@
         implementor = i;
         // bindingURI = uri;
         // build up the Service model
-        implInfo = new JaxwsImplementorInfo(implementor.getClass());
+        implInfo = new JaxWsImplementorInfo(implementor.getClass());
         
         AbstractServiceFactoryBean serviceFactory;
         if (implInfo.isWebServiceProvider()) {
@@ -108,7 +108,7 @@
         
         //      TODO: use bindigURI     
         try {
-            endpoint = new JaxwsEndpointImpl(bus, service, ei);            
+            endpoint = new JaxWsEndpointImpl(bus, service, ei);            
         } catch (EndpointException e) {
             throw new WebServiceException(e);
         }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ProviderChainObserver.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ProviderChainObserver.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ProviderChainObserver.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ProviderChainObserver.java Tue Sep 26 17:31:18 2006
@@ -24,7 +24,7 @@
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.jaxws.interceptors.DispatchInInterceptor;
 import org.apache.cxf.jaxws.interceptors.DispatchOutInterceptor;
-import org.apache.cxf.jaxws.support.JaxwsImplementorInfo;
+import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.ExchangeImpl;
 import org.apache.cxf.message.Message;
@@ -37,9 +37,9 @@
 
     Endpoint endpoint;
     Bus bus;
-    JaxwsImplementorInfo implInfo;
+    JaxWsImplementorInfo implInfo;
 
-    public ProviderChainObserver(Endpoint endpoint, Bus bus, JaxwsImplementorInfo implInfo) {
+    public ProviderChainObserver(Endpoint endpoint, Bus bus, JaxWsImplementorInfo implInfo) {
         super();
         this.endpoint = endpoint;
         this.bus = bus;

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java Tue Sep 26 17:31:18 2006
@@ -50,8 +50,8 @@
 import org.apache.cxf.endpoint.EndpointException;
 import org.apache.cxf.jaxb.JAXBDataBinding;
 import org.apache.cxf.jaxws.handler.HandlerResolverImpl;
+import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
 import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
-import org.apache.cxf.jaxws.support.JaxwsEndpointImpl;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.service.model.ServiceInfo;
@@ -120,7 +120,7 @@
         }
 
         try {
-            return new JaxwsEndpointImpl(bus, dispatchService, ei);
+            return new JaxWsEndpointImpl(bus, dispatchService, ei);
         } catch (EndpointException e) {
             throw new WebServiceException(e);
         }
@@ -226,9 +226,9 @@
             throw new WebServiceException(BUNDLE.getString("COULD_NOT_DETERMINE_PORT"));
         }
 
-        JaxwsEndpointImpl jaxwsEndpoint;
+        JaxWsEndpointImpl jaxwsEndpoint;
         try {
-            jaxwsEndpoint = new JaxwsEndpointImpl(bus, service, ei);
+            jaxwsEndpoint = new JaxWsEndpointImpl(bus, service, ei);
         } catch (EndpointException e) {
             throw new WebServiceException(e);
         }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebContextResourceResolver.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebContextResourceResolver.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebContextResourceResolver.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebContextResourceResolver.java Tue Sep 26 17:31:18 2006
@@ -20,7 +20,9 @@
 package org.apache.cxf.jaxws.context;
 
 import java.io.InputStream;
+
 import javax.xml.ws.WebServiceContext;
+
 import org.apache.cxf.resource.ResourceResolver;
 
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/CXFServlet.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/CXFServlet.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/CXFServlet.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/CXFServlet.java Tue Sep 26 17:31:18 2006
@@ -36,7 +36,6 @@
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-
 import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
@@ -44,14 +43,14 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
+
 import org.xml.sax.SAXException;
 
 import org.apache.cxf.Bus;
-
 import org.apache.cxf.bus.cxf.CXFBusFactory;
 import org.apache.cxf.jaxws.EndpointImpl;
+import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
 import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
-import org.apache.cxf.jaxws.support.JaxwsImplementorInfo;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.DestinationFactory;
@@ -189,7 +188,7 @@
             replaceDestionFactory();
 //          doesn't really matter what URL is used here
             ep.publish("http://localhost" + (urlPat.charAt(0) == '/' ? "" : "/") + urlPat);
-            JaxwsImplementorInfo implInfo = new JaxwsImplementorInfo(impl.getClass());
+            JaxWsImplementorInfo implInfo = new JaxWsImplementorInfo(impl.getClass());
             // build up the Service model
             JaxWsServiceFactoryBean serviceFactory = new JaxWsServiceFactoryBean(implInfo);
             serviceFactory.setBus(bus);

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletDestination.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletDestination.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletDestination.java Tue Sep 26 17:31:18 2006
@@ -58,8 +58,6 @@
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.transport.MessageObserver;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
-
-
 import org.apache.cxf.wsdl11.ServiceWSDLBuilder;
 import org.xmlsoap.schemas.wsdl.http.AddressType;
 

Added: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java?view=auto&rev=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java (added)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java Tue Sep 26 17:31:18 2006
@@ -0,0 +1,92 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.cxf.jaxws.support;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.ws.Binding;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.binding.soap.SoapBinding;
+import org.apache.cxf.endpoint.EndpointException;
+import org.apache.cxf.endpoint.EndpointImpl;
+import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.jaxws.binding.BindingImpl;
+import org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl;
+import org.apache.cxf.jaxws.handler.LogicalHandlerInterceptor;
+import org.apache.cxf.jaxws.handler.StreamHandlerInterceptor;
+import org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor;
+import org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor;
+import org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.EndpointInfo;
+
+/**
+ * A JAX-WS specific implementation of the CXF {@link Endpoint} interface.
+ * Extends the interceptor provider functionality of its base class by adding 
+ * interceptors in which to execute the JAX-WS handlers.
+ * Creates and owns an implementation of {@link Binding} in addition to the
+ * CXF {@link org.apache.cxf.binding.Binding}. 
+ *
+ */
+public class JaxWsEndpointImpl extends EndpointImpl {
+
+    private Binding binding;
+    
+    public JaxWsEndpointImpl(Bus bus, Service s, EndpointInfo ei) throws EndpointException {
+        super(bus, s, ei);
+
+        createJaxwsBinding();
+        
+        List<Interceptor> handlerInterceptors;
+                
+        handlerInterceptors = new ArrayList<Interceptor>();
+        handlerInterceptors.add(new LogicalHandlerInterceptor(binding));
+        if (getBinding() instanceof SoapBinding) {
+            handlerInterceptors.add(new SOAPHandlerInterceptor(binding));
+        } else {
+             // TODO: what for non soap bindings?
+        }
+        handlerInterceptors.add(new StreamHandlerInterceptor(binding));
+        
+        List<Interceptor> fault = super.getOutFaultInterceptors();
+        fault.addAll(handlerInterceptors);
+        List<Interceptor> in = super.getInInterceptors();
+        in.addAll(handlerInterceptors);
+        in.add(new WrapperClassInInterceptor());
+        
+        List<Interceptor> out = super.getOutInterceptors();
+        out.addAll(handlerInterceptors);
+        out.add(new WrapperClassOutInterceptor());
+    }
+    
+    public Binding getJaxwsBinding() {
+        return binding;
+    }
+    
+    final void createJaxwsBinding() {
+        if (getBinding() instanceof SoapBinding) {
+            binding = new SOAPBindingImpl((SoapBinding)getBinding());
+        } else {
+            binding = new BindingImpl();
+        }
+    }
+}

Added: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java?view=auto&rev=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java (added)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java Tue Sep 26 17:31:18 2006
@@ -0,0 +1,196 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.cxf.jaxws.support;
+
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.ResourceBundle;
+import java.util.logging.Logger;
+
+import javax.jws.WebService;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.Provider;
+import javax.xml.ws.Service;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.soap.SOAPBinding;
+
+import org.apache.cxf.common.classloader.ClassLoaderUtils;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.jaxb.JAXBEncoderDecoder;
+
+public class JaxWsImplementorInfo {
+
+    private static final Logger LOG = LogUtils.getL7dLogger(JaxWsImplementorInfo.class);
+    private static final ResourceBundle BUNDLE = LOG.getResourceBundle();
+
+    private Class<?> implementorClass;
+    private Class<?> seiClass;
+    private WebService implementorAnnotation;
+    private WebService seiAnnotation;
+    private WebServiceProvider wsProviderAnnotation;
+
+    public JaxWsImplementorInfo(Class<?> ic) {
+        implementorClass = ic;
+        initialise();
+    }
+
+    public Class<?> getSEIClass() {
+        return seiClass;
+    }
+
+    public Class<?> getImplementorClass() {
+        return implementorClass;
+    }
+
+    public String getWsdlLocation() {
+        if (null != seiAnnotation) {
+            return seiAnnotation.wsdlLocation();
+        } else if (null != implementorAnnotation) {
+            return implementorAnnotation.wsdlLocation();
+        } else if (null != wsProviderAnnotation) {
+            return wsProviderAnnotation.wsdlLocation();
+        }
+        return null;
+    }
+
+    /**
+     * See use of targetNamespace in {@link WebService}.
+     * 
+     * @return the qualified name of the service.
+     */
+    public QName getServiceName() {
+        String serviceName = null;
+        String namespace = null;
+        if (implementorAnnotation != null) {
+            serviceName = implementorAnnotation.serviceName();
+            namespace = implementorAnnotation.targetNamespace();
+        } else {
+            // Must be a provider
+            serviceName = wsProviderAnnotation.serviceName();
+            namespace = wsProviderAnnotation.targetNamespace();
+        }
+        if (StringUtils.isEmpty(serviceName)) {
+            serviceName = implementorClass.getName();
+        }
+        if (!StringUtils.isEmpty(namespace) && !StringUtils.isEmpty(serviceName)) {
+            return new QName(namespace, serviceName);
+        }
+        return null;
+    }
+
+    /**
+     * See use of targetNamespace in {@link WebService}.
+     * 
+     * @return the qualified name of the endpoint.
+     */
+    public QName getEndpointName() {
+        String portName = null;
+        String namespace = null;
+        if (implementorAnnotation != null) {
+            portName = implementorAnnotation.portName();
+            namespace = implementorAnnotation.targetNamespace();
+        } else {
+            // Must be a provider
+            portName = wsProviderAnnotation.portName();
+            namespace = wsProviderAnnotation.targetNamespace();
+        }
+
+        if (StringUtils.isEmpty(portName)) {
+            portName = implementorClass.getSimpleName() + "Port";
+        }
+
+        if (!StringUtils.isEmpty(portName)) {
+            return new QName(namespace, portName);
+        } else {
+            return new QName(namespace, "NoNamedPort");
+        }        
+    }
+
+    private void initialise() {
+        implementorAnnotation = implementorClass.getAnnotation(WebService.class);
+        if (null != implementorAnnotation) {
+
+            String sei = implementorAnnotation.endpointInterface();
+            if (null != sei && !"".equals(sei)) {
+                try {
+                    seiClass = ClassLoaderUtils.loadClass(sei, implementorClass);
+                } catch (ClassNotFoundException ex) {
+                    throw new WebServiceException(BUNDLE.getString("SEI_LOAD_FAILURE_MSG"), ex);
+                }
+                seiAnnotation = seiClass.getAnnotation(WebService.class);
+                if (null == seiAnnotation) {
+                    throw new WebServiceException(BUNDLE.getString("SEI_WITHOUT_WEBSERVICE_ANNOTATION_EXC"));
+                }
+                String portName = seiAnnotation.portName();
+                String serviceName = seiAnnotation.serviceName();
+                String endpointInterface = seiAnnotation.endpointInterface();
+                if ((null != portName && !"".equals(portName))
+                    || (null != serviceName && !"".equals(serviceName))
+                    || (null != endpointInterface && !"".equals(endpointInterface))) {
+                    String expString = BUNDLE.getString("ILLEGAL_ATTRIBUTE_IN_SEI_ANNOTATION_EXC");
+                    throw new WebServiceException(expString);
+                }
+            }
+        } else {
+            wsProviderAnnotation = implementorClass.getAnnotation(WebServiceProvider.class);
+        }
+    }
+
+    public boolean isWebServiceProvider() {
+        return Provider.class.isAssignableFrom(implementorClass);
+    }
+
+    public WebServiceProvider getWsProvider() {
+        return wsProviderAnnotation;
+    }
+
+    public Service.Mode getServiceMode() {
+        ServiceMode m = implementorClass.getAnnotation(ServiceMode.class);
+        if (m != null && m.value() != null) {
+            return m.value();
+        }
+        return Service.Mode.PAYLOAD;
+    }
+
+    public Class<?> getProviderParameterType() {
+        //The Provider Implementor inherits out of Provier<T>
+        Type intfTypes[] = implementorClass.getGenericInterfaces();
+        for (Type t : intfTypes) {
+            Class<?> clazz = JAXBEncoderDecoder.getClassFromType(t);
+            if (Provider.class == clazz) {
+                Type paramTypes[] = ((ParameterizedType)t).getActualTypeArguments();
+                return JAXBEncoderDecoder.getClassFromType(paramTypes[0]);
+            }
+        }
+        return null;
+    }
+
+    public String getBindingType() {
+        BindingType bType = implementorClass.getAnnotation(BindingType.class);
+        if (bType != null) {
+            return bType.value();
+        }
+        return SOAPBinding.SOAP11HTTP_BINDING;
+    }
+}

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java Tue Sep 26 17:31:18 2006
@@ -43,7 +43,7 @@
 public class JaxWsServiceConfiguration extends AbstractServiceConfiguration {
     private static final ResourceBundle BUNDLE = BundleUtils.getBundle(JaxWsServiceConfiguration.class);
 
-    private JaxwsImplementorInfo implInfo;
+    private JaxWsImplementorInfo implInfo;
 
     @Override
     public void setServiceFactory(ReflectionServiceFactoryBean serviceFactory) {

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java Tue Sep 26 17:31:18 2006
@@ -59,7 +59,7 @@
 
     private JaxWsServiceConfiguration jaxWsConfiguration;
 
-    private JaxwsImplementorInfo jaxWsImplementorInfo;
+    private JaxWsImplementorInfo jaxWsImplementorInfo;
     
     private JaxWsMethodDispatcher methodDispatcher = new JaxWsMethodDispatcher();
     
@@ -67,9 +67,8 @@
         jaxWsConfiguration = new JaxWsServiceConfiguration();
         getServiceConfigurations().add(0, jaxWsConfiguration);
     }
-
     
-    public JaxWsServiceFactoryBean(JaxwsImplementorInfo implInfo) {
+    public JaxWsServiceFactoryBean(JaxWsImplementorInfo implInfo) {
         this();
         this.jaxWsImplementorInfo = implInfo;
         this.serviceClass = implInfo.getImplementorClass();
@@ -88,7 +87,7 @@
     @Override
     public void setServiceClass(Class<?> serviceClass) {
         if (jaxWsImplementorInfo == null) {
-            jaxWsImplementorInfo = new JaxwsImplementorInfo(serviceClass);
+            jaxWsImplementorInfo = new JaxWsImplementorInfo(serviceClass);
         }
         
         super.setServiceClass(serviceClass);
@@ -112,7 +111,7 @@
 
     public void activateEndpoint(Service service, EndpointInfo ei) throws BusException, WSDLException,
                     IOException, EndpointException {
-        JaxwsEndpointImpl ep = new JaxwsEndpointImpl(getBus(), service, ei);
+        JaxWsEndpointImpl ep = new JaxWsEndpointImpl(getBus(), service, ei);
         ChainInitiationObserver observer = new ChainInitiationObserver(ep, getBus());
 
         ServerImpl server = new ServerImpl(getBus(), ep, observer);
@@ -252,11 +251,11 @@
         }
     }
 
-    public JaxwsImplementorInfo getJaxWsImplementorInfo() {
+    public JaxWsImplementorInfo getJaxWsImplementorInfo() {
         return jaxWsImplementorInfo;
     }
 
-    public void setJaxWsImplementorInfo(JaxwsImplementorInfo jaxWsImplementorInfo) {
+    public void setJaxWsImplementorInfo(JaxWsImplementorInfo jaxWsImplementorInfo) {
         this.jaxWsImplementorInfo = jaxWsImplementorInfo;
     }
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ProviderServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ProviderServiceFactoryBean.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ProviderServiceFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ProviderServiceFactoryBean.java Tue Sep 26 17:31:18 2006
@@ -29,7 +29,6 @@
 import org.apache.cxf.databinding.DataBinding;
 import org.apache.cxf.jaxb.JAXBDataBinding;
 import org.apache.cxf.service.Service;
-import org.apache.cxf.service.ServiceImpl;
 import org.apache.cxf.service.factory.MethodDispatcher;
 import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
 import org.apache.cxf.service.factory.ServiceConstructionException;
@@ -43,11 +42,11 @@
 
 public class ProviderServiceFactoryBean extends ReflectionServiceFactoryBean {
 
-    private JaxwsImplementorInfo jaxWsImplmentorInfo;
+    private JaxWsImplementorInfo jaxWsImplmentorInfo;
     private String bindingURI;
     private JaxWsMethodDispatcher md;
     
-    public ProviderServiceFactoryBean(JaxwsImplementorInfo implInfo) {
+    public ProviderServiceFactoryBean(JaxWsImplementorInfo implInfo) {
         this.jaxWsImplmentorInfo = implInfo;
         this.bindingURI = implInfo.getBindingType();
         getServiceConfigurations().add(0, new WebServiceProviderConfiguration());
@@ -104,11 +103,10 @@
      
         return intf;
     }
-
     
     @Override
-    protected void createBindings(ServiceImpl service) {
-        ServiceInfo si = service.getServiceInfo();
+    protected void initializeBindings() {
+        ServiceInfo si = getService().getServiceInfo();
         if (XMLConstants.NS_XML_FORMAT.equals(bindingURI)) {
             BindingInfo bi = new BindingInfo(si, bindingURI);
             
@@ -157,7 +155,7 @@
         this.bindingURI = bindingURI;
     }
 
-    public JaxwsImplementorInfo getJaxWsImplmentorInfo() {
+    public JaxWsImplementorInfo getJaxWsImplmentorInfo() {
         return jaxWsImplmentorInfo;
     }
 }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/WebServiceProviderConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/WebServiceProviderConfiguration.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/WebServiceProviderConfiguration.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/WebServiceProviderConfiguration.java Tue Sep 26 17:31:18 2006
@@ -36,7 +36,7 @@
 public class WebServiceProviderConfiguration extends AbstractServiceConfiguration {
     private static final ResourceBundle BUNDLE = BundleUtils.getBundle(WebServiceProviderConfiguration.class);
 
-    private JaxwsImplementorInfo implInfo;
+    private JaxWsImplementorInfo implInfo;
     private WebServiceProvider wsProvider;
     
     @Override

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ConfiguredEndpointTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ConfiguredEndpointTest.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ConfiguredEndpointTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ConfiguredEndpointTest.java Tue Sep 26 17:31:18 2006
@@ -34,7 +34,7 @@
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.interceptor.Interceptor;
-import org.apache.cxf.jaxws.support.JaxwsEndpointImpl;
+import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
 import org.apache.hello_world_soap_http.Greeter;
@@ -74,7 +74,7 @@
         
         EndpointInvocationHandler eih = (EndpointInvocationHandler)Proxy.getInvocationHandler(greeter);
         Client client = eih.getClient();
-        JaxwsEndpointImpl endpoint = (JaxwsEndpointImpl)client.getEndpoint();
+        JaxWsEndpointImpl endpoint = (JaxWsEndpointImpl)client.getEndpoint();
         assertEquals("Unexpected bean name", PORT_NAME.toString(), endpoint.getBeanName());
         assertTrue("Unexpected value for property validating", !endpoint.getValidating());
    
@@ -111,7 +111,7 @@
 
         EndpointInvocationHandler eih = (EndpointInvocationHandler)Proxy.getInvocationHandler(greeter);
         Client client = eih.getClient();
-        JaxwsEndpointImpl endpoint = (JaxwsEndpointImpl)client.getEndpoint();
+        JaxWsEndpointImpl endpoint = (JaxWsEndpointImpl)client.getEndpoint();
         assertEquals("Unexpected bean name", PORT_NAME.toString(), endpoint.getBeanName());
         // assertTrue("Unexpected value for property validating", endpoint.getValidating());
         List<Interceptor> interceptors = endpoint.getInInterceptors();
@@ -157,7 +157,7 @@
         Object implementor = new GreeterImpl(); 
         EndpointImpl ei = (EndpointImpl)(javax.xml.ws.Endpoint.create(implementor));
         
-        JaxwsEndpointImpl endpoint = (JaxwsEndpointImpl)ei.getEndpoint();
+        JaxWsEndpointImpl endpoint = (JaxWsEndpointImpl)ei.getEndpoint();
         assertEquals("Unexpected bean name", PORT_NAME.toString(), endpoint.getBeanName());
         assertTrue("Unexpected value for property validating", !endpoint.getValidating());
    
@@ -192,7 +192,7 @@
         Object implementor = new GreeterImpl(); 
         EndpointImpl ei = (EndpointImpl)(javax.xml.ws.Endpoint.create(implementor));
         
-        JaxwsEndpointImpl endpoint = (JaxwsEndpointImpl)ei.getEndpoint();
+        JaxWsEndpointImpl endpoint = (JaxWsEndpointImpl)ei.getEndpoint();
         assertEquals("Unexpected bean name", PORT_NAME.toString(), endpoint.getBeanName());
         assertTrue("Unexpected value for property validating", endpoint.getValidating());
         List<Interceptor> interceptors = endpoint.getInInterceptors();

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java Tue Sep 26 17:31:18 2006
@@ -31,8 +31,8 @@
 import org.apache.cxf.binding.soap.SoapBindingFactory;
 import org.apache.cxf.binding.soap.SoapDestinationFactory;
 import org.apache.cxf.endpoint.ClientImpl;
+import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
 import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
-import org.apache.cxf.jaxws.support.JaxwsEndpointImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.factory.ServiceConstructionException;
@@ -115,7 +115,7 @@
 
         String namespace = "http://apache.org/hello_world_soap_http";
         EndpointInfo ei = service.getServiceInfo().getEndpoint(new QName(namespace, "SoapPort"));
-        JaxwsEndpointImpl endpoint = new JaxwsEndpointImpl(bus, service, ei);
+        JaxWsEndpointImpl endpoint = new JaxWsEndpointImpl(bus, service, ei);
         
         ClientImpl client = new ClientImpl(bus, endpoint);
         

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptorTest.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptorTest.java Tue Sep 26 17:31:18 2006
@@ -35,7 +35,6 @@
 import static org.easymock.EasyMock.isA;
 import static org.easymock.classextension.EasyMock.createNiceControl;
 
-
 public class AbstractProtocolHandlerInterceptorTest extends TestCase {
     
     private IMocksControl control;

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java Tue Sep 26 17:31:18 2006
@@ -39,7 +39,6 @@
 import static org.easymock.EasyMock.isA;
 import static org.easymock.classextension.EasyMock.createNiceControl;
 
-
 public class LogicalHandlerInterceptorTest extends TestCase {
     
     private IMocksControl control;

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/StreamHandlerInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/StreamHandlerInterceptorTest.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/StreamHandlerInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/StreamHandlerInterceptorTest.java Tue Sep 26 17:31:18 2006
@@ -35,7 +35,6 @@
 import static org.easymock.EasyMock.isA;
 import static org.easymock.classextension.EasyMock.createNiceControl;
 
-
 public class StreamHandlerInterceptorTest extends TestCase {
     
     private IMocksControl control;

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/ProviderServiceFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/ProviderServiceFactoryBeanTest.java?view=diff&rev=450267&r1=450266&r2=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/ProviderServiceFactoryBeanTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/ProviderServiceFactoryBeanTest.java Tue Sep 26 17:31:18 2006
@@ -44,7 +44,7 @@
         URL resource = getClass().getResource("/wsdl/hello_world.wsdl");
         assertNotNull(resource);
         
-        JaxwsImplementorInfo implInfo = new JaxwsImplementorInfo(HWSoapMessageProvider.class);
+        JaxWsImplementorInfo implInfo = new JaxWsImplementorInfo(HWSoapMessageProvider.class);
         ProviderServiceFactoryBean bean = new ProviderServiceFactoryBean(implInfo);
 
         // We should not have to do this, but otherwise Maven can't find the WSDL.
@@ -67,7 +67,7 @@
     }
     
     public void testXMLBindingFromCode() throws Exception {
-        JaxwsImplementorInfo implInfo = new JaxwsImplementorInfo(SourcePayloadProvider.class);
+        JaxWsImplementorInfo implInfo = new JaxWsImplementorInfo(SourcePayloadProvider.class);
         ProviderServiceFactoryBean bean = new ProviderServiceFactoryBean(implInfo);
 
         Bus bus = createBus();

Added: incubator/cxf/trunk/rt/frontend/simple/.checkstyle
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/.checkstyle?view=auto&rev=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/.checkstyle (added)
+++ incubator/cxf/trunk/rt/frontend/simple/.checkstyle Tue Sep 26 17:31:18 2006
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><fileset-config file-format-version="1.1.0" simple-config="false">
+<fileset name="all" enabled="true" check-config-name="CXF Checks" type="external" description=""><file-match-pattern match-pattern="^src[/\\]." include-pattern="true"/>
+</fileset>
+</fileset-config>
\ No newline at end of file

Added: incubator/cxf/trunk/rt/frontend/simple/.pmd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/.pmd?view=auto&rev=450267
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/.pmd (added)
+++ incubator/cxf/trunk/rt/frontend/simple/.pmd Tue Sep 26 17:31:18 2006
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pmd><useProjectRuleSet>true</useProjectRuleSet><rules/></pmd>
\ No newline at end of file



Mime
View raw message