cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r441154 [1/2] - in /incubator/cxf/trunk: api/ api/src/main/java/org/apache/cxf/jaxws/handlers/ api/src/main/java/org/apache/cxf/message/ api/src/main/java/org/apache/cxf/wsdl/ api/src/test/java/org/apache/cxf/jaxws/handlers/ common/ common/...
Date Thu, 07 Sep 2006 17:44:30 GMT
Author: dkulp
Date: Thu Sep  7 10:44:28 2006
New Revision: 441154

URL: http://svn.apache.org/viewvc?view=rev&rev=441154
Log:
Start of removing jaxws from everything other than jaxws frontend

* Remove jaxws dependencies in api and core
* Start removing from JAXB
* Temporarily add jaxws dependency on http/jms until header issue is resolved


Added:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointUtilsException.java   (with props)
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointException.java   (with props)
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/Messages.properties   (with props)
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/APIMessages.properties
      - copied unchanged from r441086, incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/APIMessages.properties
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/InitParamResourceResolver.java
      - copied, changed from r441086, incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/InitParamResourceResolver.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamHandler.java
      - copied, changed from r441086, incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/StreamHandler.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamMessageContext.java
      - copied, changed from r441086, incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/StreamMessageContext.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/InitParamResourceResolverTest.java
      - copied, changed from r441086, incubator/cxf/trunk/api/src/test/java/org/apache/cxf/jaxws/handlers/InitParamResourceResolverTest.java
Removed:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/APIMessages.properties
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/InitParamResourceResolver.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/StreamHandler.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/StreamMessageContext.java
    incubator/cxf/trunk/api/src/test/java/org/apache/cxf/jaxws/handlers/InitParamResourceResolverTest.java
Modified:
    incubator/cxf/trunk/api/pom.xml
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/message/Message.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/Messages.properties
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
    incubator/cxf/trunk/common/pom.xml
    incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/CastUtils.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MultipartMessageInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/attachments/AttachmentTest.java
    incubator/cxf/trunk/rt/core/pom.xml
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/attachment/AttachmentUtil.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/SimpleMethodInvoker.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
    incubator/cxf/trunk/rt/databinding/jaxb/pom.xml
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Messages.properties
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/AttachmentSerializer.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentMarshaller.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentUnmarshaller.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/MessageDataReader.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
    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/EndpointInvocationHandler.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/handler/HandlerChainInvoker.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamMessageContextImpl.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/JaxwsEndpointImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/StreamHandlerInterceptorTest.java
    incubator/cxf/trunk/rt/transports/http/pom.xml
    incubator/cxf/trunk/rt/transports/jms/pom.xml
    incubator/cxf/trunk/rt/ws/addr/pom.xml
    incubator/cxf/trunk/systests/pom.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/TestStreamHandler.java
    incubator/cxf/trunk/testutils/pom.xml
    incubator/cxf/trunk/tools/java2wsdl/pom.xml
    incubator/cxf/trunk/tools/wsdl2java/pom.xml

Modified: incubator/cxf/trunk/api/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/pom.xml?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/api/pom.xml (original)
+++ incubator/cxf/trunk/api/pom.xml Thu Sep  7 10:44:28 2006
@@ -18,8 +18,8 @@
   under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
-	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.cxf</groupId>
     <artifactId>cxf-api</artifactId>
@@ -28,9 +28,9 @@
     <version>2.0-incubator-M1-SNAPSHOT</version>
 
     <parent>
-	<groupId>org.apache.cxf</groupId>
-	<artifactId>cxf</artifactId>
-	<version>2.0-incubator-M1-SNAPSHOT</version>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf</artifactId>
+        <version>2.0-incubator-M1-SNAPSHOT</version>
     </parent>
 
     <properties>
@@ -86,8 +86,8 @@
                                 <xsdOption>
                                     <xsd>${basedir}/src/main/resources/schemas/wsdl/wsdl.xsd</xsd>
                                     <dependencies>
-                                    	<dependency>${basedir}/src/main/resources/schemas/wsdl/jms.xsd</dependency>
-                                    	<dependency>${basedir}/src/main/resources/schemas/wsdl/xml-binding.xsd</dependency>
+                                        <dependency>${basedir}/src/main/resources/schemas/wsdl/jms.xsd</dependency>
+                                        <dependency>${basedir}/src/main/resources/schemas/wsdl/xml-binding.xsd</dependency>
                                         <dependency>${basedir}/src/main/resources/schemas/wsdl/http-conf.xsd</dependency>
                                     </dependencies>
                                 </xsdOption>
@@ -121,7 +121,7 @@
                                 <beanfile>${basedir}/src/main/resources/config-metadata/http-client-config.xml</beanfile>
                                 <beanfile>${basedir}/src/main/resources/config-metadata/http-listener-config.xml</beanfile>
                                 <beanfile>${basedir}/src/main/resources/config-metadata/http-server-config.xml</beanfile>
-                                <beanfile>${basedir}/src/main/resources/config-metadata/jms-client-config.xml</beanfile>                                
+                                <beanfile>${basedir}/src/main/resources/config-metadata/jms-client-config.xml</beanfile>
                                 <beanfile>${basedir}/src/main/resources/config-metadata/jms-server-config.xml</beanfile>
                             </beanfiles>
                         </configuration>

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/message/Message.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/message/Message.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/message/Message.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/message/Message.java Thu Sep  7 10:44:28 2006
@@ -33,12 +33,8 @@
     String REQUESTOR_ROLE = "org.apache.cxf.client";
     String ONEWAY_MESSAGE = "org.apache.cxf.transport.isOneWayMessage";
 
-    String ATTACHMENT_DESERIALIZER = "org.apache.cxf.databinding.attachments.AttachmentDeserializer";
-    String ATTACHMENT_SERIALIZER = "org.apache.cxf.databinding.attachments.AttachmentSerializer";
-
     String INBOUND_MESSAGE = "org.apache.cxf.message.inbound";
     String INVOCATION_OBJECTS = "org.apache.cxf.invocation.objects";
-    String METHOD = "org.apache.cxf.method";
     
     String MIME_HEADERS = "org.apache.cxf.mime.headers";
 

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java Thu Sep  7 10:44:28 2006
@@ -47,8 +47,6 @@
 import javax.xml.transform.stream.StreamSource;
 import javax.xml.validation.Schema;
 import javax.xml.validation.SchemaFactory;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceProvider;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -56,9 +54,9 @@
 
 import org.xml.sax.SAXException;
 
+import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.jaxb.JAXBUtils;
 import org.apache.cxf.ws.addressing.AttributedURIType;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.ws.addressing.MetadataType;
@@ -77,32 +75,30 @@
 
     private static final QName WSDL_LOCATION = new QName("http://www.w3.org/2006/01/wsdl-instance",
                                                          "wsdlLocation");
-    private static final Transformer XML_TRANSFORMER;
-    static {
-        
+
+    
+    private EndpointReferenceUtils() {
+        // Utility class - never constructed
+    }
+    
+    private static Transformer getTransformer() throws EndpointUtilsException {
         //To Support IBM JDK 
         //If use the default transformFactory ,org.apache.xalan.processor.TransformerFactoryImpl \
         //when transform stuff will lost attributes 
-        
-        
         if (System.getProperty("java.vendor").indexOf("IBM") > -1) {
             System.setProperty("javax.xml.transform.TransformerFactory", 
                                "org.apache.xalan.xsltc.trax.TransformerFactoryImpl");
         }
         
-        Transformer transformer = null;
         try {
-            TransformerFactory tf = TransformerFactory.newInstance();
-            transformer = tf.newTransformer();            
+            return TransformerFactory.newInstance().newTransformer();
         } catch (TransformerConfigurationException tce) {
-            throw new WebServiceException("Could not create transformer", tce);
+            throw new EndpointUtilsException(new Message("COULD_NOT_CREATE_TRANSFORMER", LOG),
+                                                         tce);
         }
-        XML_TRANSFORMER = transformer;
+        
     }
     
-    private EndpointReferenceUtils() {
-        // Utility class - never constructed
-    }
     
     /**
      * Sets the service and port name of the provided endpoint reference. 
@@ -112,8 +108,7 @@
      */
     public static void setServiceAndPortName(EndpointReferenceType ref, 
                                              QName serviceName, 
-                                             String portName) 
-        throws WebServiceException {
+                                             String portName) {
         if (null != serviceName) {
             JAXBElement<ServiceNameType> jaxbElement = getServiceNameType(serviceName, portName);
             MetadataType mt = ref.getMetadata();
@@ -300,7 +295,9 @@
      * @param ref the endpoint reference.
      * @param metadata the list of metadata source.
      */
-    public static void setMetadata(EndpointReferenceType ref, List<Source> metadata) {
+    public static void setMetadata(EndpointReferenceType ref, List<Source> metadata)
+        throws EndpointUtilsException {
+        
         if (null != ref) {
             MetadataType mt = ref.getMetadata();
             if (null == mt) {
@@ -328,7 +325,7 @@
                         DOMResult domResult = new DOMResult();
                         domResult.setSystemId(source.getSystemId());
                         
-                        XML_TRANSFORMER.transform(source, domResult);
+                        getTransformer().transform(source, domResult);
     
                         node = domResult.getNode();
                     }
@@ -347,7 +344,8 @@
                     }
                 }
             } catch (TransformerException te) {
-                throw new WebServiceException("Populating metadata in EPR failed", te);
+                throw new EndpointUtilsException(new Message("COULD_NOT_POPULATE_EPR", LOG),
+                                                 te);
             }
         }
     }
@@ -384,30 +382,6 @@
             }
         }
 
-        QName portTypeName = getInterfaceName(ref);
-        if (null != portTypeName) {
-            
-            StringBuffer seiName = new StringBuffer();
-            seiName.append(JAXBUtils.namespaceURIToPackage(portTypeName.getNamespaceURI()));
-            seiName.append(".");
-            seiName.append(JAXBUtils.nameToIdentifier(portTypeName.getLocalPart(),
-                                                      JAXBUtils.IdentifierType.INTERFACE));
-            
-            Class<?> sei = null;
-            try {
-                sei = Class.forName(seiName.toString(), true, 
-                                    manager.getClass().getClassLoader());
-            } catch (ClassNotFoundException ex) {
-                LOG.log(Level.FINE, "SEI_LOAD_FAILURE_MSG", ex);
-                return null;
-            }
-            Definition def = manager.getDefinition(sei);
-            if (def == null && sei.getInterfaces().length > 0) {
-                sei = sei.getInterfaces()[0];
-                def = manager.getDefinition(sei);
-            }
-            return def;
-        }
         return null;
     }
 
@@ -653,103 +627,6 @@
     public static EndpointReferenceType getEndpointReference(WSDLManager manager,
                                                                  Object implementor) {
         return getEndpointReference(manager, implementor.getClass());
-    }
-
-    /**
-     * Gets an endpoint reference for the provided implementor object.
-     * @param manager - the wsdl manager.
-     * @param implementorClass - the service implementor.
-     * @return EndpointReferenceType - the endpoint reference
-     * @throws WSDLException
-     */
-    public static EndpointReferenceType getEndpointReference(WSDLManager manager,
-                                                                 Class<?> implementorClass) {
-
-        WebService ws = getWebServiceAnnotation(implementorClass);
-
-        WebServiceProvider wsp = null;
-        if (null == ws) {
-            wsp = implementorClass.getAnnotation(WebServiceProvider.class);
-            if (null == wsp) {
-                return null;
-            }
-        }
-
-        EndpointReferenceType reference = new EndpointReferenceType();
-        reference.setMetadata(new MetadataType());
-        String serviceName = (null != ws) ? ws.serviceName() : wsp.serviceName();
-        String targetNamespace = (null != ws) ? ws.targetNamespace() : wsp.targetNamespace();
-        String portName = (null != ws) ? ws.portName() : wsp.portName();
-        String url = (null != ws) ? ws.wsdlLocation() : wsp.wsdlLocation();
-        String className = (null != ws) ? ws.endpointInterface() : null; 
-     
-        QName portTypeName = null;
-        if (null != className && !"".equals(className)) {
-            Class<?> seiClazz = null;
-            try {
-                seiClazz = Class.forName(className);
-            } catch (ClassNotFoundException cnfe) {
-                LOG.log(Level.SEVERE, "SEI_LOAD_FAILURE_MSG", cnfe);
-                throw new WebServiceException("endpointInterface element in WebService annotation invalid", 
-                                              cnfe);
-            }
-            
-            if (!seiClazz.isInterface()) {
-                throw new WebServiceException("endpointInterface element does not refer to a java interface");
-            }
-            
-            WebService seiws = seiClazz.getAnnotation(WebService.class);
-            if (null == seiws) {
-                throw new WebServiceException("SEI should have a WebService Annotation");
-            }
-
-            if ("".equals(url)) {
-                url = seiws.wsdlLocation();
-            }
-
-            //WebService.name maps to wsdl:portType name.
-            portTypeName = new QName(ws.targetNamespace(), seiws.name());
-
-            //ServiceName,portName,endpointInterface not allowed on the WebService annotation
-            // of a SEI, Section 3.2 JSR181.
-            // set interfaceName using WebService.targetNamespace of SEI only.
-        } else {
-
-            if (null != ws) {
-                className = ws.name();
-            }
-            if (null == className || "".equals(className)) {
-                className = implementorClass.getSimpleName();
-            }
-            portTypeName = new QName(targetNamespace, className);
-        }
-
-        setInterfaceName(reference, portTypeName);
-        // set serviceName, portName and targetNamespace
-        if (!"".equals(serviceName)) {
-            setServiceAndPortName(reference, new QName(targetNamespace, serviceName),
-                                  portName);
-        }
-
-        if (null != url && url.length() > 0) {
-            //REVISIT Resolve the url for all cases
-            URL wsdlUrl = implementorClass.getResource(url);
-            if (wsdlUrl != null) {
-                url = wsdlUrl.toExternalForm();
-            }
-        }
-        // set wsdlLocation
-        if (!"".equals(url)) {
-            setWSDLLocation(reference, url);
-        }
-
-        if (LOG.isLoggable(Level.FINE)) {
-            LOG.fine("created endpoint reference with");
-            LOG.fine("    service name: " + getServiceName(reference));
-            LOG.fine("    wsdl location: " + getWSDLLocation(reference));
-            LOG.fine("    sei class: " + getInterfaceName(reference));
-        }
-        return reference;
     }
     
     private static String getNameSpaceUri(Node node, String content, String namespaceURI) {

Added: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointUtilsException.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointUtilsException.java?view=auto&rev=441154
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointUtilsException.java (added)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointUtilsException.java Thu Sep  7 10:44:28 2006
@@ -0,0 +1,33 @@
+/**
+ * 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.wsdl;
+
+import org.apache.cxf.common.i18n.Exception;
+import org.apache.cxf.common.i18n.Message;
+
+public class EndpointUtilsException extends Exception {
+    public EndpointUtilsException(Message msg) {
+        super(msg);
+    }
+    
+    public EndpointUtilsException(Message msg, Throwable t) {
+        super(msg, t);
+    }
+
+}

Propchange: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointUtilsException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointUtilsException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/Messages.properties?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/Messages.properties (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/Messages.properties Thu Sep  7 10:44:28 2006
@@ -1 +1,4 @@
 SEI_LOAD_FAILURE_MSG = Could not load Webservice SEI
+
+COULD_NOT_CREATE_TRANSFORMER = Could not create transformer
+COULD_NOT_POPULATE_EPR = Populating metadata in EPR failed

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java Thu Sep  7 10:44:28 2006
@@ -76,14 +76,6 @@
      */
     Definition getDefinition(Element element) throws WSDLException;  
     
-    /**
-     * Get the WSDL definition for the given class.  Implementations
-     * may return a copy from a local cache or load a new copy 
-     * from the class.
-     * @param sei - the Class annotated with a WebService annotation 
-     * @return the wsdl Definition
-     */
-    Definition getDefinition(Class<?> sei) throws WSDLException;
 
     /**
      * Adds a definition into the cache for lookup later

Modified: incubator/cxf/trunk/common/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/pom.xml?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/common/pom.xml (original)
+++ incubator/cxf/trunk/common/pom.xml Thu Sep  7 10:44:28 2006
@@ -64,7 +64,7 @@
         <dependency>
             <groupId>javax.jws</groupId>
             <artifactId>jsr181-api</artifactId>
-        </dependency>
+	</dependency>
 
         <dependency>
             <groupId>javax.xml.bind</groupId>
@@ -74,7 +74,8 @@
         <dependency>
             <groupId>javax.xml.ws</groupId>
             <artifactId>jaxws-api</artifactId>
-        </dependency>
+            <scope>provided</scope>
+	</dependency>
 
         <dependency>
             <groupId>stax</groupId>

Modified: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/CastUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/CastUtils.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/CastUtils.java (original)
+++ incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/CastUtils.java Thu Sep  7 10:44:28 2006
@@ -20,6 +20,7 @@
 package org.apache.cxf.helpers;
 
 import java.util.Collection;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -42,6 +43,13 @@
     }
     public static <T> Collection<T> cast(Collection<?> p, Class<T> cls) {
         return (Collection<T>)p;
+    }
+    public static <T> List<T> cast(List<?> p) {
+        return (List<T>)p;
+    }
+    
+    public static <T> List<T> cast(List<?> p, Class<T> cls) {
+        return (List<T>)p;
     }
 
     public static <T> Set<T> cast(Set<?> p) {

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MultipartMessageInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MultipartMessageInterceptor.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MultipartMessageInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MultipartMessageInterceptor.java Thu Sep  7 10:44:28 2006
@@ -45,7 +45,7 @@
         
         AttachmentDeserializer ad = new AttachmentDeserializer(message);
         if (ad.preprocessMessage()) {
-            message.put(Message.ATTACHMENT_DESERIALIZER, ad);
+            message.put(AttachmentDeserializer.class, ad);
         }
     }
 

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/attachments/AttachmentTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/attachments/AttachmentTest.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/attachments/AttachmentTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/attachments/AttachmentTest.java Thu Sep  7 10:44:28 2006
@@ -58,7 +58,6 @@
 import org.apache.cxf.jaxb.attachment.JAXBAttachmentMarshaller;
 import org.apache.cxf.jaxb.attachment.JAXBAttachmentUnmarshaller;
 import org.apache.cxf.message.Attachment;
-import org.apache.cxf.message.Message;
 
 public class AttachmentTest extends TestBase {
 
@@ -234,8 +233,7 @@
                 }
                 assertTrue("Data Root Tag not found in message soap part!", found);
             }
-            AttachmentDeserializer ad = (AttachmentDeserializer)soapMessage
-                .get(Message.ATTACHMENT_DESERIALIZER);
+            AttachmentDeserializer ad = soapMessage.get(AttachmentDeserializer.class);
             ad.processAttachments();
             Collection<Attachment> attachments = soapMessage.getAttachments();
             assertTrue(attachments.size() == 2);

Modified: incubator/cxf/trunk/rt/core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/pom.xml?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/core/pom.xml (original)
+++ incubator/cxf/trunk/rt/core/pom.xml Thu Sep  7 10:44:28 2006
@@ -43,12 +43,10 @@
             <artifactId>cxf-api</artifactId>
             <version>${project.version}</version>
         </dependency>
-
         <dependency>
-	    <groupId>org.apache.cxf</groupId>
-	    <artifactId>cxf-tools-java2wsdl</artifactId>
-	    <version>${project.version}</version>
-        </dependency>
+            <groupId>org.apache.ws.commons</groupId>
+            <artifactId>XmlSchema</artifactId>
+        </dependency> 
 
         <dependency>
             <groupId>org.springframework</groupId>
@@ -66,14 +64,12 @@
             <scope>test</scope>
         </dependency>
 
-	<dependency>
+        <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-testutils</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
-
-        
     </dependencies>
 
 

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/attachment/AttachmentUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/attachment/AttachmentUtil.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/attachment/AttachmentUtil.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/attachment/AttachmentUtil.java Thu Sep  7 10:44:28 2006
@@ -29,8 +29,6 @@
 import java.util.Map;
 import java.util.UUID;
 
-import javax.xml.ws.WebServiceException;
-
 import org.apache.cxf.message.Message;
 
 public final class AttachmentUtil {
@@ -43,7 +41,7 @@
      * @param ns
      * @return
      */
-    public static String createContentID(String ns) {
+    public static String createContentID(String ns) throws UnsupportedEncodingException {
         // tend to change
         String cid = "cxf.apache.org";
         String name = UUID.randomUUID() + "@";
@@ -56,11 +54,7 @@
                 e.printStackTrace();
                 return null;
             } catch (MalformedURLException e) {
-                try {
-                    cid = URLEncoder.encode(ns, "UTF-8");
-                } catch (UnsupportedEncodingException e1) {
-                    throw new WebServiceException("Encoding content id with namespace error", e);
-                }
+                cid = URLEncoder.encode(ns, "UTF-8");
             }
         }
         return name + cid;

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java Thu Sep  7 10:44:28 2006
@@ -178,8 +178,8 @@
 
     private void setMethod(Map<String, Object> ctx, Message message) {
         if (ctx != null) {
-            message.setContent(Method.class, ctx.get(Message.METHOD));
-            methd = (Method)ctx.get(Message.METHOD);
+            message.setContent(Method.class, ctx.get(Method.class.getName()));
+            methd = (Method)ctx.get(Method.class.getName());
         }
     }
 

Added: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointException.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointException.java?view=auto&rev=441154
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointException.java (added)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointException.java Thu Sep  7 10:44:28 2006
@@ -0,0 +1,38 @@
+/**
+ * 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.endpoint;
+
+import org.apache.cxf.common.i18n.Exception;
+import org.apache.cxf.common.i18n.Message;
+
+public class EndpointException extends Exception {
+
+    public EndpointException(Message msg) {
+        super(msg);
+    }
+
+    public EndpointException(Message msg, Throwable t) {
+        super(msg, t);
+    }
+
+    public EndpointException(Throwable cause) {
+        super(cause);
+    }
+
+}

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

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

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java Thu Sep  7 10:44:28 2006
@@ -23,8 +23,6 @@
 import java.util.concurrent.Executor;
 import java.util.logging.Logger;
 
-import javax.xml.ws.WebServiceException;
-
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
 import org.apache.cxf.binding.Binding;
@@ -50,7 +48,7 @@
     private Bus bus;
     private Interceptor faultInterceptor;
     
-    public EndpointImpl(Bus bus, Service s, EndpointInfo ei) {
+    public EndpointImpl(Bus bus, Service s, EndpointInfo ei) throws EndpointException {
         this.bus = bus;
         service = s;
         endpointInfo = ei;
@@ -93,18 +91,18 @@
         this.bus = bus;
     }
 
-    final void createBinding(BindingInfo bi) {
+    final void createBinding(BindingInfo bi) throws EndpointException {
         String namespace = bi.getBindingId();
         BindingFactory bf = null;
         try {
             bf = bus.getExtension(BindingFactoryManager.class).getBindingFactory(namespace);
             binding = bf.createBinding(bi);
         } catch (BusException ex) {
-            throw new WebServiceException(ex);
+            throw new EndpointException(ex);
         }
         if (null == bf) {
             Message msg = new Message("NO_BINDING_FACTORY", BUNDLE, namespace);
-            throw new WebServiceException(msg.toString());
+            throw new EndpointException(msg);
         }
     }
 

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/SimpleMethodInvoker.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/SimpleMethodInvoker.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/SimpleMethodInvoker.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/SimpleMethodInvoker.java Thu Sep  7 10:44:28 2006
@@ -21,14 +21,12 @@
 
 
 import java.lang.reflect.Method;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import javax.xml.ws.Holder;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.service.model.BindingOperationInfo;
@@ -45,15 +43,13 @@
         this.bean = bean;
     }
     
-    @SuppressWarnings("unchecked")
     public Object invoke(Exchange exchange, Object o) {
         BindingOperationInfo bop = exchange.get(BindingOperationInfo.class);
         
         
         Method m = (Method)bop.getOperationInfo().getProperty(Method.class.getName());
-        List<Object> params = (List<Object>) o;
+        List<Object> params = CastUtils.cast((List<?>)o);
                 
-        checkHolder(m, params, exchange);
         Object res;
         try {
             Object[] paramArray = params.toArray();
@@ -65,51 +61,13 @@
             if (!((Class)m.getReturnType()).getName().equals("void")) {
                 retList.add(res);
             }
-            for (int i = 0; i < paramArray.length; i++) {
-                if (paramArray[i] instanceof Holder) {
-                    retList.add(((Holder)paramArray[i]).value);
-                }
-            }
             return Arrays.asList(retList.toArray());
         } catch (Exception e) {
             throw new Fault(e);
         }
     }
 
-    @SuppressWarnings("unchecked")
-    private void checkHolder(Method method, List<Object> params, Exchange exchange) {
-        if (method != null) {
-           
-            Type[] para = method.getGenericParameterTypes();
-            for (int i = 0; i < para.length; i++) {
-                if (para[i] instanceof ParameterizedType) {
-                    Object param = null;
-                    ParameterizedType paramType = (ParameterizedType)para[i];
-                    if (((Class)paramType.getRawType()).getName().equals("javax.xml.ws.Holder")) {
-                        
-                        try {
-                            param = new Holder(
-                                ((Class)paramType.getActualTypeArguments()[0]).newInstance());
-                        } catch (InstantiationException e) {
-                            throw new Fault(e);
-                        } catch (IllegalAccessException e) {
-                            throw new Fault(e);
-                        }
-                        if (i >= params.size()) {
-                            params.add(param);
-                        } else {
-                            params.set(i, new Holder(params.get(i)));
-                        }
-                        
-                    }
-                                       
-                    
-                }
-            }
-            
-        }
-        
-    }
+   
 
     
 }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java Thu Sep  7 10:44:28 2006
@@ -19,7 +19,6 @@
 
 package org.apache.cxf.wsdl11;
 
-import java.io.File;
 import java.io.IOException;
 import java.net.URL;
 import java.util.Iterator;
@@ -29,7 +28,6 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import javax.jws.WebService;
 import javax.wsdl.Definition;
 import javax.wsdl.WSDLException;
 import javax.wsdl.extensions.ExtensionRegistry;
@@ -137,29 +135,6 @@
         return def;
     }
 
-    public Definition getDefinition(Class<?> sei) throws WSDLException {
-
-        if (null == sei.getAnnotation(WebService.class)) {
-            return null;
-        }
-
-        synchronized (definitionsMap) {
-            if (definitionsMap.containsKey(sei)) {
-                return definitionsMap.get(sei);
-            }
-        }
-        Definition def = null;
-        try {
-            def = createDefinition(sei);
-        } catch (Exception ex) {
-            throw new WSDLException(WSDLException.PARSER_ERROR, ex.getMessage());
-        }
-
-        synchronized (definitionsMap) {
-            definitionsMap.put(sei, def);
-        }
-        return def;
-    }
 
     public void addDefinition(Object key, Definition wsdl) {
         synchronized (definitionsMap) {
@@ -176,100 +151,6 @@
             definitionsMap.put(url, def);
         }
         return def;
-    }
-
-    private Definition createDefinition(Class<?> sei) throws Exception {
-        Definition definition = null;
-        if (LOG.isLoggable(Level.INFO)) {
-            LOG.info("createDefinition for class: " + sei.getName());
-        }
-        File tmp = null;
-        try {
-            tmp = File.createTempFile("tmp", ".wsdl");
-            tmp.delete();
-            tmp.mkdir();
-        } catch (IOException ex) {
-            LOG.log(Level.SEVERE, "WSDL_GENERATION_TMP_DIR_MSG", ex);
-            return null;
-        }
-
-        /*
-         * JAXWSWsdlGenerator generator = new JAXWSWsdlGenerator(sei.getName(),
-         * sei.getClassLoader()); Configuration config = new ToolConfig(new
-         * String[] {"-wsdl", "-d", tmp.getPath()});
-         * generator.setConfiguration(config); generator.generate();
-         */
-
-        try {
-            int result = 0;
-            org.apache.cxf.tools.java2wsdl.JavaToWSDL.runTool(new String[] {"-o",
-                            tmp.getPath() + "/tmp.wsdl", sei.getName() });
-            if (0 != result) {
-                LOG.log(Level.SEVERE, "WSDL_GENERATION_BAD_RESULT_MSG", result);
-                return null;
-            }
-
-            // schema and WSDL file should have been created in tmp directory
-
-            File[] generated = tmp.listFiles();
-            File schema = null;
-            File wsdl = null;
-            for (File f : generated) {
-                if (f.isFile()) {
-                    if (null == wsdl && f.getName().endsWith(".wsdl")) {
-                        wsdl = f;
-                    } else if (null == schema && f.getName().endsWith(".xsd")) {
-                        schema = f;
-                    }
-                    if (null != schema && null != wsdl) {
-                        break;
-                    }
-                }
-            }
-            if (null == wsdl || null == schema) {
-                LOG.severe("WSDL_SCHEMA_GENERATION_FAILURE_MSG");
-                return null;
-            } else if (LOG.isLoggable(Level.INFO)) {
-                LOG.info("Generated " + wsdl.getPath() + " and " + schema.getPath());
-            }
-
-            /*
-             * WSDLFactory wf = getWSDLFactory();
-             * 
-             * try { WSDLReader reader = wf.newWSDLReader();
-             * reader.setFeature("javax.wsdl.verbose", false);
-             * reader.setExtensionRegistry(registry); definition =
-             * reader.readWSDL(wsdl.getPath()); } catch (WSDLException ex) {
-             * LOG.log(Level.SEVERE, "WSDL_UNREADABLE_MSG", ex); }
-             */
-
-            // definition =
-            // org.apache.cxf.tools.java2wsdl.JavaToWSDL.getDefinition();
-        } finally {
-            class Directory {
-                private final File dir;
-
-                Directory(File d) {
-                    dir = d;
-                }
-
-                void delete() {
-                    File[] entries = dir.listFiles();
-                    for (File f : entries) {
-                        if (f.isDirectory()) {
-                            Directory d = new Directory(f);
-                            d.delete();
-                        }
-                        f.delete();
-                    }
-                    dir.delete();
-                }
-            }
-            Directory dir = new Directory(tmp);
-            dir.delete();
-        }
-
-        return definition;
     }
 
     private void registerInitialExtensions() throws BusException {

Modified: incubator/cxf/trunk/rt/databinding/jaxb/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/pom.xml?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/pom.xml (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/pom.xml Thu Sep  7 10:44:28 2006
@@ -77,6 +77,12 @@
         </dependency>
 
         <dependency>
+            <groupId>javax.xml.ws</groupId>
+            <artifactId>jaxws-api</artifactId>
+            <scope>provided</scope>
+	    </dependency>  
+
+        <dependency>
             <groupId>com.sun.xml.messaging.saaj</groupId>
             <artifactId>saaj-impl</artifactId>
         </dependency>
@@ -92,7 +98,10 @@
             <scope>test</scope>
         </dependency>
  
-
+        <dependency>
+            <groupId>woodstox</groupId>
+            <artifactId>wstx-asl</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java Thu Sep  7 10:44:28 2006
@@ -26,6 +26,7 @@
 import java.lang.reflect.Type;
 import java.util.HashSet;
 import java.util.Map;
+import java.util.ResourceBundle;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -33,9 +34,7 @@
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBElement;
 import javax.xml.bind.JAXBException;
-import javax.xml.bind.MarshalException;
 import javax.xml.bind.Marshaller;
-import javax.xml.bind.UnmarshalException;
 import javax.xml.bind.Unmarshaller;
 
 import javax.xml.bind.annotation.XmlRootElement;
@@ -47,16 +46,17 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 import javax.xml.validation.Schema;
-import javax.xml.ws.Holder;
-import javax.xml.ws.ProtocolException;
 import javax.xml.ws.RequestWrapper;
 import javax.xml.ws.ResponseWrapper;
 import javax.xml.ws.WebEndpoint;
 
 import org.w3c.dom.Node;
 
+import org.apache.cxf.common.i18n.BundleUtils;
+import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.interceptor.Fault;
 
 
 /**
@@ -64,8 +64,9 @@
  * @author apaibir
  */
 public final class JAXBEncoderDecoder {
+    private static final ResourceBundle BUNDLE = BundleUtils.getBundle(JAXBEncoderDecoder.class);
     
-    static Map<Class<?>, JAXBContext> contextMap = new ConcurrentHashMap<Class<?>, JAXBContext>();
+    private static Map<Class<?>, JAXBContext> contextMap = new ConcurrentHashMap<Class<?>, JAXBContext>();
     
     private JAXBEncoderDecoder() {        
     }
@@ -98,7 +99,7 @@
             return getValidClass(cls.getComponentType());
         }
 
-        if (cls == Holder.class || cls == Object.class || cls == String.class) {
+        if (cls == Object.class || cls == String.class) {
             cls = null;
         } else if (cls.isPrimitive() || cls.isInterface() || cls.isAnnotation()) {
             cls = null;
@@ -220,20 +221,16 @@
     }
     
     private static Marshaller createMarshaller(JAXBContext context,
-                                               Class<?> cls) {
+                                               Class<?> cls) throws JAXBException {
         Marshaller jm = null;
-        try {
-            if (context == null) {
-                context = JAXBContext.newInstance(cls);
-            }
-            
-            jm = context.createMarshaller();
-            jm.setProperty(Marshaller.JAXB_ENCODING , "UTF-8");
-            jm.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
-        } catch (JAXBException je) {
-            throw new ProtocolException("Marshalling Error", je);
+        if (context == null) {
+            context = JAXBContext.newInstance(cls);
         }
         
+        jm = context.createMarshaller();
+        jm.setProperty(Marshaller.JAXB_ENCODING , "UTF-8");
+        jm.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+        
         return jm;
     }
     
@@ -242,16 +239,16 @@
                                 Object source, AttachmentMarshaller am) {
         
         Class<?> cls = null != elValue ? elValue.getClass() : null;
-        Marshaller u = createMarshaller(context, cls);
         try {
-            // The Marshaller.JAXB_FRAGMENT will tell the Marshaller not to generate the xml declaration.
-            u.setProperty(Marshaller.JAXB_FRAGMENT, true);
-        } catch (javax.xml.bind.PropertyException e) {
-            // intentionally empty.
-        }
-        Object mObj = elValue;      
+            Marshaller u = createMarshaller(context, cls);
+            try {
+                // The Marshaller.JAXB_FRAGMENT will tell the Marshaller not to generate the xml declaration.
+                u.setProperty(Marshaller.JAXB_FRAGMENT, true);
+            } catch (javax.xml.bind.PropertyException e) {
+                // intentionally empty.
+            }
+            Object mObj = elValue;      
 
-        try {
             if (null != elNname && null != cls 
                 && !cls.isAnnotationPresent(XmlRootElement.class)) {
                 mObj = JAXBElement.class.getConstructor(new Class[] {QName.class, Class.class, Object.class})
@@ -268,19 +265,10 @@
             } else if (source instanceof XMLStreamWriter) {
                 u.marshal(mObj, (XMLStreamWriter)source);
             } else {
-                throw new ProtocolException("Marshalling Error, unrecognized source " 
-                                            + source.getClass().getName());
-            }
-        } catch (MarshalException me) {
-            // It's helpful to include the cause in the case of
-            // schema validation exceptions.
-            String message = "Marshalling error ";
-            if (me.getCause() != null) {
-                message += me.getCause();
+                throw new Fault(new Message("UNKNOWN_SOURCE", BUNDLE, source.getClass().getName()));
             }
-            throw new ProtocolException(message, me);
         } catch (Exception ex) {
-            throw new ProtocolException("Marshalling Error", ex);
+            throw new Fault(new Message("MARSHAL_ERROR", BUNDLE), ex);
         }
     }
 
@@ -295,18 +283,14 @@
     }
 
     private static Unmarshaller createUnmarshaller(JAXBContext context,
-                                                   Class<?> cls) {
+                                                   Class<?> cls) throws JAXBException {
         Unmarshaller um = null;
-        try {
-            if (context == null) {
-                context = JAXBContext.newInstance(cls);
-            }
-            
-            um = context.createUnmarshaller();            
-        } catch (JAXBException je) {
-            throw new ProtocolException("Marshalling Error", je);
+        if (context == null) {
+            context = JAXBContext.newInstance(cls);
         }
         
+        um = context.createUnmarshaller();            
+        
         return um;
     }
 
@@ -345,19 +329,10 @@
                 obj = (clazz != null) ? u.unmarshal((XMLEventReader)source, clazz) 
                     : u.unmarshal((XMLEventReader)source);                                
             } else {
-                throw new ProtocolException("Unmarshalling error, unrecognized source " 
-                                            + source.getClass().getName());
-            }
-        } catch (UnmarshalException ue) {
-            // It's helpful to include the cause in the case of
-            // schema validation exceptions.
-            String message = "Unmarshalling error ";
-            if (ue.getCause() != null) {
-                message += ue.getCause();
+                throw new Fault(new Message("UNKNOWN_SOURCE", BUNDLE, source.getClass().getName()));
             }
-            throw new ProtocolException(message, ue);
         } catch (Exception ex) {
-            throw new ProtocolException("Unmarshalling error", ex);
+            throw new Fault(new Message("MARSHAL_ERROR", BUNDLE), ex);
         }
         return (elName == null) ? obj : getElementValue(obj, elName);
     }

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=441154&r1=441153&r2=441154
==============================================================================
--- 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 Thu Sep  7 10:44:28 2006
@@ -1,2 +1,4 @@
 INIT_OBJ_CONTEXT_FAILED = ObjectMessageContext Intialisation Failed.
-SCHEMA_NOT_RESOLVED = Could not resolve URI: {0}
\ No newline at end of file
+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

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/AttachmentSerializer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/AttachmentSerializer.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/AttachmentSerializer.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/AttachmentSerializer.java Thu Sep  7 10:44:28 2006
@@ -22,6 +22,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
 import java.util.Properties;
 
 import javax.activation.DataHandler;
@@ -30,10 +31,10 @@
 import javax.mail.internet.MimeBodyPart;
 import javax.mail.internet.MimeMessage;
 import javax.mail.internet.MimeMultipart;
-import javax.xml.ws.WebServiceException;
 
 import org.apache.cxf.binding.attachment.AttachmentDataSource;
 import org.apache.cxf.binding.attachment.AttachmentUtil;
+import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Attachment;
 import org.apache.cxf.message.Message;
 
@@ -60,11 +61,16 @@
      * @throws CxfRioException
      */
 
-    public String serializeMultipartMessage() throws WebServiceException {
+    public String serializeMultipartMessage() {
 
         Session session = Session.getDefaultInstance(new Properties(), null);
         MimeMessage mimeMessage = new MimeMessage(session);
-        String soapPartId = AttachmentUtil.createContentID(null);
+        String soapPartId;
+        try {
+            soapPartId = AttachmentUtil.createContentID(null);
+        } catch (UnsupportedEncodingException e) {
+            throw new Fault(e);
+        }
         String subType = AttachmentUtil.getMimeSubType(message, soapPartId);
         MimeMultipart mimeMP = new MimeMultipart(subType);
 
@@ -92,9 +98,9 @@
             mimeMessage.setContent(mimeMP);
             mimeMessage.writeTo(out, FILTER);
         } catch (MessagingException me) {
-            throw new WebServiceException(me);
+            throw new Fault(me);
         } catch (IOException ioe) {
-            throw new WebServiceException(ioe);
+            throw new Fault(ioe);
         }
         return mimeMP.getContentType();
     }

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentMarshaller.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentMarshaller.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentMarshaller.java Thu Sep  7 10:44:28 2006
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.jaxb.attachment;
 
+import java.io.UnsupportedEncodingException;
 import java.util.Collection;
 import java.util.UUID;
 
@@ -28,6 +29,7 @@
 import org.apache.cxf.binding.attachment.AttachmentImpl;
 import org.apache.cxf.binding.attachment.AttachmentUtil;
 import org.apache.cxf.binding.attachment.ByteDataSource;
+import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Attachment;
 import org.apache.cxf.message.Message;
 
@@ -49,17 +51,26 @@
         source.setContentType(mimeType);
         DataHandler handler = new DataHandler(source);
 
-        String id = AttachmentUtil.createContentID(elementNS);
+        String id;
+        try {
+            id = AttachmentUtil.createContentID(elementNS);
+        } catch (UnsupportedEncodingException e) {
+            throw new Fault(e);
+        }
         Attachment att = new AttachmentImpl(id, handler);
         atts.add(att);
 
         return "cid:" + id;
     }
 
-    @Override
     public String addMtomAttachment(DataHandler handler, String elementNS, String elementLocalName) {
 
-        String id = AttachmentUtil.createContentID(elementNS);
+        String id;
+        try {
+            id = AttachmentUtil.createContentID(elementNS);
+        } catch (UnsupportedEncodingException e) {
+            throw new Fault(e);
+        }
         Attachment att = new AttachmentImpl(id, handler);
         atts.add(att);
 

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentUnmarshaller.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentUnmarshaller.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentUnmarshaller.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/JAXBAttachmentUnmarshaller.java Thu Sep  7 10:44:28 2006
@@ -23,27 +23,29 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.util.logging.Logger;
 
 import javax.activation.DataHandler;
 import javax.mail.MessagingException;
 import javax.xml.bind.attachment.AttachmentUnmarshaller;
-import javax.xml.ws.WebServiceException;
 
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Attachment;
 import org.apache.cxf.message.Message;
 
 public class JAXBAttachmentUnmarshaller extends AttachmentUnmarshaller {
-
+    private static final Logger LOG = LogUtils.getL7dLogger(JAXBAttachmentUnmarshaller.class);
+    
     private Message message;
     private AttachmentDeserializer ad;
 
     public JAXBAttachmentUnmarshaller(Message messageParam) {
         super();
         this.message = messageParam;
-        ad = (AttachmentDeserializer)message.get(Message.ATTACHMENT_DESERIALIZER);
+        ad = message.get(AttachmentDeserializer.class);
         if (ad == null) {
-            throw new WebServiceException("Can't find Attachment Deserializer in message"
-                                          + " when doing JAXBAttachmentUnmarshaller");
+            throw new Fault(new org.apache.cxf.common.i18n.Message("NO_ATTACHMENT_DESERIALIZER", LOG));
         }
     }
 
@@ -60,7 +62,7 @@
         try {
             copy(att.getDataHandler().getInputStream(), bos);
         } catch (IOException e) {
-            throw new WebServiceException("Could not read attachment.", e);
+            throw new Fault(new org.apache.cxf.common.i18n.Message("ATTACHMENT_READ_ERROR", LOG), e);
         }
         return bos.toByteArray();
     }
@@ -104,11 +106,11 @@
         try {
             att = ad.getAttachment(contentId);
         } catch (MessagingException me) {
-            throw new WebServiceException("Failed in getting attachment " + contentId + ". Cause: "
-                                               + me.getMessage());
+            throw new Fault(new org.apache.cxf.common.i18n.Message("FAILED_GETTING_ATTACHMENT",
+                                                                   LOG, contentId), me);
         } catch (IOException ioe) {
-            throw new WebServiceException("Failed in getting attachment " + contentId + ". Cause: "
-                                               + ioe.getMessage());
+            throw new Fault(new org.apache.cxf.common.i18n.Message("FAILED_GETTING_ATTACHMENT",
+                                                                   LOG, contentId), ioe);
         }
         if (att == null) {
             throw new IllegalArgumentException("Attachment " + contentId + " was not found.");

Added: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/Messages.properties?view=auto&rev=441154
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/Messages.properties (added)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/Messages.properties Thu Sep  7 10:44:28 2006
@@ -0,0 +1,3 @@
+NO_ATTACHMENT_DESERIALIZER = Can't find Attachment Deserializer in message when doing JAXBAttachmentUnmarshaller
+ATTACHMENT_READ_ERROR = Could not read attachment.
+FAILED_GETTING_ATTACHMENT = Failed in getting attachment {0}.
\ No newline at end of file

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

Propchange: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/attachment/Messages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/MessageDataReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/MessageDataReader.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/MessageDataReader.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/MessageDataReader.java Thu Sep  7 10:44:28 2006
@@ -28,6 +28,7 @@
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.jaxb.JAXBDataReaderFactory;
 import org.apache.cxf.jaxb.JAXBEncoderDecoder;
+import org.apache.cxf.jaxb.attachment.AttachmentDeserializer;
 import org.apache.cxf.jaxb.attachment.JAXBAttachmentUnmarshaller;
 import org.apache.cxf.message.Message;
 
@@ -49,7 +50,7 @@
     
     public Object read(QName name, Message input, Class cls) {
         JAXBAttachmentUnmarshaller au = null;        
-        if (input.get(Message.ATTACHMENT_DESERIALIZER) != null) {
+        if (input.get(AttachmentDeserializer.class) != null) {
             au = new JAXBAttachmentUnmarshaller(input); 
         }
         Object source = null;

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java Thu Sep  7 10:44:28 2006
@@ -39,7 +39,6 @@
 import javax.xml.transform.stream.StreamSource;
 import javax.xml.validation.Schema;
 import javax.xml.validation.SchemaFactory;
-import javax.xml.ws.ProtocolException;
 import javax.xml.ws.RequestWrapper;
 
 import org.w3c.dom.Element;
@@ -47,6 +46,7 @@
 
 import junit.framework.TestCase;
 
+import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.testutil.common.TestUtil;
 import org.apache.hello_world_soap_http.Greeter;
 import org.apache.hello_world_soap_http.types.GreetMe;
@@ -100,8 +100,8 @@
         Node node;
         try {
             JAXBEncoderDecoder.marshall(context, null, null, inCorrectElName,  elNode);
-            fail("Should have thrown a ProtocolException");
-        } catch (ProtocolException ex) {
+            fail("Should have thrown a Fault");
+        } catch (Fault ex) {
             //expected - not a valid object
         }
 
@@ -130,8 +130,8 @@
         try {
             // Marshal with the schema should get an exception.
             JAXBEncoderDecoder.marshall(context, schema, stringStruct, elName,  elNode);
-            fail("Marshal with schema should have thrown a ProtocolException");
-        } catch (ProtocolException ex) {
+            fail("Marshal with schema should have thrown a Fault");
+        } catch (Fault ex) {
             //expected - not a valid object
         }
     }
@@ -234,11 +234,11 @@
         Node n = null;
         try {
             JAXBEncoderDecoder.unmarshall(context, null, n, null, String.class);
-            fail("Should have received a ProtocolException");
-        } catch (ProtocolException pe) {
+            fail("Should have received a Fault");
+        } catch (Fault pe) {
             //Expected Exception
         } catch (Exception ex) {
-            fail("Should have received a ProtocolException, not: " + ex);
+            fail("Should have received a Fault, not: " + ex);
         }
         
         // Now test schema validation during unmarshaling
@@ -261,8 +261,8 @@
             // unmarshal with schema should raise exception.
             obj = JAXBEncoderDecoder.unmarshall(context, schema, elNode,  elName,
                 Class.forName("org.apache.hello_world_soap_http.types.StringStruct"));
-            fail("Should have thrown a ProtocolException");
-        } catch (ProtocolException ex) {
+            fail("Should have thrown a Fault");
+        } catch (Fault ex) {
             // expected - schema validation should fail.
         }
     }

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=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/pom.xml (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/pom.xml Thu Sep  7 10:44:28 2006
@@ -54,7 +54,10 @@
             <scope>test</scope>
         </dependency>
 
-
+        <dependency>
+            <groupId>javax.xml.ws</groupId>
+            <artifactId>jaxws-api</artifactId>
+	    </dependency>  
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-api</artifactId>

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=441154&r1=441153&r2=441154
==============================================================================
--- 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 Thu Sep  7 10:44:28 2006
@@ -35,6 +35,7 @@
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.endpoint.EndpointException;
 import org.apache.cxf.endpoint.ServerImpl;
 import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
 import org.apache.cxf.jaxws.support.JaxwsEndpointImpl;
@@ -81,7 +82,11 @@
             service.setInvoker(new JAXWSMethodInvoker(i));
         }
         //      TODO: use bindigURI     
-        endpoint = new JaxwsEndpointImpl(bus, service, ei);
+        try {
+            endpoint = new JaxwsEndpointImpl(bus, service, ei);
+        } catch (EndpointException e) {
+            throw new WebServiceException(e);
+        }
     }
 
     public Binding getBinding() {

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointInvocationHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointInvocationHandler.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointInvocationHandler.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointInvocationHandler.java Thu Sep  7 10:44:28 2006
@@ -92,7 +92,7 @@
 
         Object[] paramsWithOutHolder = handleHolder(params);
         Map<String, Object> context = new HashMap<String, Object>();
-        context.put(org.apache.cxf.message.Message.METHOD, method);
+        context.put(Method.class.getName(), method);
         Object rawRet[] = client.invoke(oi, paramsWithOutHolder, context);
 
         if (rawRet != null && rawRet.length != 0) {

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=441154&r1=441153&r2=441154
==============================================================================
--- 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 Thu Sep  7 10:44:28 2006
@@ -47,6 +47,7 @@
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.endpoint.ClientImpl;
 import org.apache.cxf.endpoint.Endpoint;
+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;
@@ -103,7 +104,12 @@
         } else {
             ei = si.getEndpoint(portName);
         }
-        return new JaxwsEndpointImpl(bus, service, ei);        
+        
+        try {
+            return new JaxwsEndpointImpl(bus, service, ei);
+        } catch (EndpointException e) {
+            throw new WebServiceException(e);
+        }        
     }
     
     public <T> Dispatch<T> createDispatch(QName portName, Class<T> type, Mode mode) {
@@ -195,7 +201,13 @@
             throw new WebServiceException(BUNDLE.getString("COULD_NOT_DETERMINE_PORT"));
         }
 
-        JaxwsEndpointImpl jaxwsEndpoint = new JaxwsEndpointImpl(bus, service, ei);
+        JaxwsEndpointImpl jaxwsEndpoint;
+        try {
+            jaxwsEndpoint = new JaxwsEndpointImpl(bus, service, ei);
+        } catch (EndpointException e) {
+            throw new WebServiceException(e);
+        }
+        
         Client client = new ClientImpl(bus, jaxwsEndpoint);
 
         InvocationHandler ih = new EndpointInvocationHandler(client, jaxwsEndpoint.getJaxwsBinding());

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java Thu Sep  7 10:44:28 2006
@@ -35,8 +35,6 @@
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
-import org.apache.cxf.jaxws.handlers.StreamHandler;
-import org.apache.cxf.jaxws.handlers.StreamMessageContext;
 import org.apache.cxf.message.Message;
 
 

Copied: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/InitParamResourceResolver.java (from r441086, incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/InitParamResourceResolver.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/InitParamResourceResolver.java?view=diff&rev=441154&p1=incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/InitParamResourceResolver.java&r1=441086&p2=incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/InitParamResourceResolver.java&r2=441154
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/InitParamResourceResolver.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/InitParamResourceResolver.java Thu Sep  7 10:44:28 2006
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxws.handlers;
+package org.apache.cxf.jaxws.handler;
 
 import java.io.InputStream;
 import java.util.Map;

Copied: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamHandler.java (from r441086, incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/StreamHandler.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamHandler.java?view=diff&rev=441154&p1=incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/StreamHandler.java&r1=441086&p2=incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamHandler.java&r2=441154
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/StreamHandler.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamHandler.java Thu Sep  7 10:44:28 2006
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxws.handlers;
+package org.apache.cxf.jaxws.handler;
 
 import javax.xml.ws.handler.Handler;
 

Copied: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamMessageContext.java (from r441086, incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/StreamMessageContext.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamMessageContext.java?view=diff&rev=441154&p1=incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/StreamMessageContext.java&r1=441086&p2=incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamMessageContext.java&r2=441154
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/jaxws/handlers/StreamMessageContext.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamMessageContext.java Thu Sep  7 10:44:28 2006
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxws.handlers;
+package org.apache.cxf.jaxws.handler;
 
 import java.io.InputStream;
 import java.io.OutputStream;

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamMessageContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamMessageContextImpl.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamMessageContextImpl.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/StreamMessageContextImpl.java Thu Sep  7 10:44:28 2006
@@ -26,7 +26,6 @@
 
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
-import org.apache.cxf.jaxws.handlers.StreamMessageContext;
 import org.apache.cxf.message.Message;
 
 

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=441154&r1=441153&r2=441154
==============================================================================
--- 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 Thu Sep  7 10:44:28 2006
@@ -38,6 +38,7 @@
 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.endpoint.EndpointException;
 import org.apache.cxf.endpoint.ServerImpl;
 import org.apache.cxf.interceptor.WrappedInInterceptor;
 import org.apache.cxf.jaxb.JAXBDataBinding;
@@ -69,7 +70,7 @@
         this.implInfo = i;
     }
 
-    public void activateEndpoints() throws IOException, WSDLException, BusException {
+    public void activateEndpoints() throws IOException, WSDLException, BusException, EndpointException {
         Service service = getService();
 
         for (EndpointInfo ei : service.getServiceInfo().getEndpoints()) {
@@ -78,7 +79,7 @@
     }
 
     public void activateEndpoint(Service service, EndpointInfo ei) throws BusException, WSDLException,
-        IOException {
+        IOException, EndpointException {
         JaxwsEndpointImpl ep = new JaxwsEndpointImpl(getBus(), service, ei);
         ChainInitiationObserver observer = new ChainInitiationObserver(ep, getBus());
 

Modified: 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=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxwsEndpointImpl.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxwsEndpointImpl.java Thu Sep  7 10:44:28 2006
@@ -26,6 +26,7 @@
 
 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;
@@ -50,7 +51,7 @@
 
     private Binding binding;
     
-    public JaxwsEndpointImpl(Bus bus, Service s, EndpointInfo ei) {
+    public JaxwsEndpointImpl(Bus bus, Service s, EndpointInfo ei) throws EndpointException {
         super(bus, s, ei);
 
         createJaxwsBinding();

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java Thu Sep  7 10:44:28 2006
@@ -35,8 +35,6 @@
 import junit.framework.TestCase;
 
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
-import org.apache.cxf.jaxws.handlers.StreamHandler;
-import org.apache.cxf.jaxws.handlers.StreamMessageContext;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
 

Copied: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/InitParamResourceResolverTest.java (from r441086, incubator/cxf/trunk/api/src/test/java/org/apache/cxf/jaxws/handlers/InitParamResourceResolverTest.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/InitParamResourceResolverTest.java?view=diff&rev=441154&p1=incubator/cxf/trunk/api/src/test/java/org/apache/cxf/jaxws/handlers/InitParamResourceResolverTest.java&r1=441086&p2=incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/InitParamResourceResolverTest.java&r2=441154
==============================================================================
--- incubator/cxf/trunk/api/src/test/java/org/apache/cxf/jaxws/handlers/InitParamResourceResolverTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/InitParamResourceResolverTest.java Thu Sep  7 10:44:28 2006
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxws.handlers;
+package org.apache.cxf.jaxws.handler;
 
 import java.util.HashMap;
 import java.util.Map;

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=441154&r1=441153&r2=441154
==============================================================================
--- 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 Thu Sep  7 10:44:28 2006
@@ -27,8 +27,6 @@
 
 import junit.framework.TestCase;
 
-import org.apache.cxf.jaxws.handlers.StreamHandler;
-import org.apache.cxf.jaxws.handlers.StreamMessageContext;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.easymock.classextension.IMocksControl;

Modified: incubator/cxf/trunk/rt/transports/http/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/pom.xml?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/pom.xml (original)
+++ incubator/cxf/trunk/rt/transports/http/pom.xml Thu Sep  7 10:44:28 2006
@@ -72,6 +72,12 @@
             <artifactId>commons-logging</artifactId>
             <version>1.1</version>
         </dependency>
+
+        <dependency>
+            <groupId>javax.xml.ws</groupId>
+            <artifactId>jaxws-api</artifactId>
+            <scope>provided</scope>
+	    </dependency>  
         <dependency>
             <groupId>javax.servlet</groupId>
             <artifactId>servlet-api</artifactId>

Modified: incubator/cxf/trunk/rt/transports/jms/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/pom.xml?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/pom.xml (original)
+++ incubator/cxf/trunk/rt/transports/jms/pom.xml Thu Sep  7 10:44:28 2006
@@ -68,7 +68,12 @@
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
-        
+        <dependency>
+            <groupId>javax.xml.ws</groupId>
+            <artifactId>jaxws-api</artifactId>
+            <scope>provided</scope>
+        </dependency>  
+
         <dependency>
             <groupId>com.sun.xml.messaging.saaj</groupId>
             <artifactId>saaj-impl</artifactId>

Modified: incubator/cxf/trunk/rt/ws/addr/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/pom.xml?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/pom.xml (original)
+++ incubator/cxf/trunk/rt/ws/addr/pom.xml Thu Sep  7 10:44:28 2006
@@ -51,7 +51,10 @@
             <artifactId>cxf-api</artifactId>
             <version>${project.version}</version>
         </dependency>
-
+        <dependency>
+            <groupId>javax.xml.ws</groupId>
+            <artifactId>jaxws-api</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-common</artifactId>

Modified: incubator/cxf/trunk/systests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/pom.xml?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/systests/pom.xml (original)
+++ incubator/cxf/trunk/systests/pom.xml Thu Sep  7 10:44:28 2006
@@ -34,6 +34,7 @@
 
     <properties>
         <topDirectoryLocation>..</topDirectoryLocation>
+        <surefire.fork.mode>pertest</surefire.fork.mode>
     </properties>
 
     <dependencies>

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/TestStreamHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/TestStreamHandler.java?view=diff&rev=441154&r1=441153&r2=441154
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/TestStreamHandler.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/TestStreamHandler.java Thu Sep  7 10:44:28 2006
@@ -28,8 +28,8 @@
 import javax.xml.ws.ProtocolException;
 import javax.xml.ws.handler.MessageContext;
 
-import org.apache.cxf.jaxws.handlers.StreamHandler;
-import org.apache.cxf.jaxws.handlers.StreamMessageContext;
+import org.apache.cxf.jaxws.handler.StreamHandler;
+import org.apache.cxf.jaxws.handler.StreamMessageContext;
 import org.apache.handler_test.PingException;
 
 public class  TestStreamHandler extends TestHandlerBase 



Mime
View raw message