cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r958510 - in /cxf/trunk/rt/frontend/jaxws/src/main: jaxws22/org/apache/cxf/jaxws22/spring/ resources/META-INF/ spi-2.1/META-INF/ spi-2.2/META-INF/
Date Mon, 28 Jun 2010 09:06:12 GMT
Author: ema
Date: Mon Jun 28 09:06:12 2010
New Revision: 958510

URL: http://svn.apache.org/viewvc?rev=958510&view=rev
Log:
[CXF-2849]:Added spring namespace handler and EndpointDefinitionParser for jaxws2.2 to make
sure the endpoint started via servlet uses jaxws2.2 api

Added:
    cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/jaxws22/spring/
    cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/jaxws22/spring/EndpointDefinitionParser.java
    cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/jaxws22/spring/NamespaceHandler.java
    cxf/trunk/rt/frontend/jaxws/src/main/spi-2.1/META-INF/spring.handlers   (props changed)
      - copied unchanged from r958487, cxf/trunk/rt/frontend/jaxws/src/main/resources/META-INF/spring.handlers
    cxf/trunk/rt/frontend/jaxws/src/main/spi-2.2/META-INF/spring.handlers
Removed:
    cxf/trunk/rt/frontend/jaxws/src/main/resources/META-INF/spring.handlers

Added: cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/jaxws22/spring/EndpointDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/jaxws22/spring/EndpointDefinitionParser.java?rev=958510&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/jaxws22/spring/EndpointDefinitionParser.java
(added)
+++ cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/jaxws22/spring/EndpointDefinitionParser.java
Mon Jun 28 09:06:12 2010
@@ -0,0 +1,55 @@
+/**
+ * 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.jaxws22.spring;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+public class EndpointDefinitionParser extends org.apache.cxf.jaxws.spring.EndpointDefinitionParser
{
+    public EndpointDefinitionParser() {
+        setBeanClass(JAXWS22SpringEndpointImpl.class);
+    }
+    
+    @NoJSR250Annotations
+    public static class JAXWS22SpringEndpointImpl extends org.apache.cxf.jaxws22.EndpointImpl
+        implements ApplicationContextAware {
+    
+        public JAXWS22SpringEndpointImpl(Object implementor) {
+            super((Bus)null, implementor);
+        }
+        public JAXWS22SpringEndpointImpl(Bus bus, Object implementor) {
+            super(bus, implementor);
+        }
+        
+        
+        public void setApplicationContext(ApplicationContext ctx) throws BeansException {
+            if (getBus() == null) {
+                Bus bus = BusFactory.getThreadDefaultBus();
+                BusWiringBeanFactoryPostProcessor.updateBusReferencesInContext(bus, ctx);
+                setBus(bus);
+            }
+        }
+    }
+
+}

Added: cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/jaxws22/spring/NamespaceHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/jaxws22/spring/NamespaceHandler.java?rev=958510&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/jaxws22/spring/NamespaceHandler.java
(added)
+++ cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/jaxws22/spring/NamespaceHandler.java
Mon Jun 28 09:06:12 2010
@@ -0,0 +1,37 @@
+/**
+ * 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.jaxws22.spring;
+
+import org.apache.cxf.configuration.spring.StringBeanDefinitionParser;
+import org.apache.cxf.frontend.spring.ServerFactoryBeanDefinitionParser;
+import org.apache.cxf.jaxws.spring.JaxWsProxyFactoryBeanDefinitionParser;
+import org.apache.cxf.jaxws.spring.NamespaceHandler.SpringServerFactoryBean;
+
+public class NamespaceHandler extends org.apache.cxf.jaxws.spring.NamespaceHandler {
+    public void init() {
+        registerBeanDefinitionParser("client", new JaxWsProxyFactoryBeanDefinitionParser());
+        registerBeanDefinitionParser("endpoint", new EndpointDefinitionParser());
+        registerBeanDefinitionParser("schemaLocation", new StringBeanDefinitionParser());
+
+        ServerFactoryBeanDefinitionParser parser = new ServerFactoryBeanDefinitionParser();
+        parser.setBeanClass(SpringServerFactoryBean.class);
+        registerBeanDefinitionParser("server", parser);
+    }
+
+}

Propchange: cxf/trunk/rt/frontend/jaxws/src/main/spi-2.1/META-INF/spring.handlers
------------------------------------------------------------------------------
    svn:mergeinfo = 

Added: cxf/trunk/rt/frontend/jaxws/src/main/spi-2.2/META-INF/spring.handlers
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/spi-2.2/META-INF/spring.handlers?rev=958510&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/spi-2.2/META-INF/spring.handlers (added)
+++ cxf/trunk/rt/frontend/jaxws/src/main/spi-2.2/META-INF/spring.handlers Mon Jun 28 09:06:12
2010
@@ -0,0 +1,21 @@
+#
+#
+#    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.
+#
+#
+http\://cxf.apache.org/jaxws=org.apache.cxf.jaxws22.spring.NamespaceHandler
\ No newline at end of file



Mime
View raw message