cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dand...@apache.org
Subject svn commit: r573633 - in /incubator/cxf/trunk: common/common/src/main/java/org/apache/cxf/configuration/spring/ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ rt/frontend/jaxws/src/te...
Date Fri, 07 Sep 2007 17:04:44 GMT
Author: dandiep
Date: Fri Sep  7 10:04:42 2007
New Revision: 573633

URL: http://svn.apache.org/viewvc?rev=573633&view=rev
Log:
CXF-971: ignore namespaces when processing attributes in definition parsers. Also, add a usingAddressingAdvisory
attribute to the wsa:addressing feature

Modified:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/spring/ServerFactoryBeanDefinitionParser.java
    incubator/cxf/trunk/rt/ws/addr/src/main/resources/schemas/ws-addr-conf.xsd

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java?rev=573633&r1=573632&r2=573633&view=diff
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
Fri Sep  7 10:04:42 2007
@@ -64,6 +64,12 @@
             String val = node.getValue();
             String pre = node.getPrefix();
             String name = node.getLocalName();
+            String prefix = node.getPrefix();
+            
+            // Don't process namespaces
+            if (isNamespace(name, prefix)) {
+                continue;
+            }
             
             if ("createdFromAPI".equals(name)) {
                 bean.setAbstract(true);
@@ -84,6 +90,10 @@
             }
         } 
         return setBus;
+    }
+
+    private boolean isNamespace(String name, String prefix) {
+        return "xmlns".equals(prefix) || prefix == null && "xmlns".equals(name);
     }
     
     protected void parseChildElements(Element element, ParserContext ctx, BeanDefinitionBuilder
bean) {

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java?rev=573633&r1=573632&r2=573633&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
(original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
Fri Sep  7 10:04:42 2007
@@ -44,6 +44,7 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 import javax.xml.transform.Result;
+import javax.xml.transform.TransformerException;
 import javax.xml.transform.dom.DOMResult;
 import javax.xml.transform.dom.DOMSource;
 
@@ -62,6 +63,7 @@
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.databinding.DataWriter;
 import org.apache.cxf.databinding.source.AbstractDataBinding;
+import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.jaxb.io.DataReaderImpl;
 import org.apache.cxf.jaxb.io.DataWriterImpl;
 import org.apache.cxf.service.Service;
@@ -215,6 +217,12 @@
             Collection<DOMSource> schemas = getSchemas();
             if (schemas != null) {
                 for (DOMSource r : schemas) {
+                    try {
+                        DOMUtils.writeXml(r.getNode(), System.out);
+                    } catch (TransformerException e) {
+                        // TODO Auto-generated catch block
+                        e.printStackTrace();
+                    }
                     addSchemaDocument(serviceInfo, col, 
                                       (Document)r.getNode(), r.getSystemId());
                 }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java?rev=573633&r1=573632&r2=573633&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
Fri Sep  7 10:04:42 2007
@@ -144,7 +144,7 @@
         throws BeanDefinitionStoreException {
         String id = super.resolveId(elem, definition, ctx);
         if (StringUtils.isEmpty(id)) {
-            id = getBeanClass().getName() + "--" + hashCode();
+            id = getBeanClass().getName() + "--" + definition.hashCode();
         }
         
         return id;

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml?rev=573633&r1=573632&r2=573633&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml
Fri Sep  7 10:04:42 2007
@@ -39,7 +39,7 @@
       </property>
   </bean>
   
-  <jaxws:server id="simple" serviceBean="#greeter"/>
+  <jaxws:server id="simple" serviceBean="#greeter" xmlns:test="urn:foo" xmlns="urn:foo"/>
 
   <bean id="greeter" class="org.apache.hello_world_soap_http.GreeterImpl"/>
 

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/spring/ServerFactoryBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/spring/ServerFactoryBeanDefinitionParser.java?rev=573633&r1=573632&r2=573633&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/spring/ServerFactoryBeanDefinitionParser.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/spring/ServerFactoryBeanDefinitionParser.java
Fri Sep  7 10:04:42 2007
@@ -92,7 +92,7 @@
         throws BeanDefinitionStoreException {
         String id = super.resolveId(elem, definition, ctx);
         if (StringUtils.isEmpty(id)) {
-            id = getBeanClass().getName() + "--" + hashCode();
+            id = getBeanClass().getName() + "--" + definition.hashCode();
         }
         
         return id;

Modified: incubator/cxf/trunk/rt/ws/addr/src/main/resources/schemas/ws-addr-conf.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/main/resources/schemas/ws-addr-conf.xsd?rev=573633&r1=573632&r2=573633&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/main/resources/schemas/ws-addr-conf.xsd (original)
+++ incubator/cxf/trunk/rt/ws/addr/src/main/resources/schemas/ws-addr-conf.xsd Fri Sep  7
10:04:42 2007
@@ -28,6 +28,7 @@
     <xs:element name="addressing">
         <xs:complexType>
            <xs:attribute name="allowDuplicates" type="xs:boolean"/>
+           <xs:attribute name="usingAddressingAdvisory" type="xs:boolean"/>
         </xs:complexType>
     </xs:element>
     



Mime
View raw message