servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r991890 - in /servicemix/components/bindings/servicemix-cxf-bc/trunk: pom.xml src/main/java/org/apache/servicemix/cxfbc/interceptors/StaxJbiWrapper.java
Date Thu, 02 Sep 2010 11:13:43 GMT
Author: ffang
Date: Thu Sep  2 11:13:43 2010
New Revision: 991890

URL: http://svn.apache.org/viewvc?rev=991890&view=rev
Log:
[SMXCOMP-795]upgrade to cxf 2.2.10

Modified:
    servicemix/components/bindings/servicemix-cxf-bc/trunk/pom.xml
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/StaxJbiWrapper.java

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/pom.xml?rev=991890&r1=991889&r2=991890&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/pom.xml (original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/pom.xml Thu Sep  2 11:13:43 2010
@@ -44,7 +44,7 @@
 
   <properties>
     <servicemix-cxf-se-version>2010.02-SNAPSHOT</servicemix-cxf-se-version>
-    <cxf-version>2.2.9</cxf-version>
+    <cxf-version>2.2.10</cxf-version>
     <activemq-version>5.4.0</activemq-version>
     <jetty-version>6.1.22</jetty-version>
     <derby-version>10.5.3.0_1</derby-version>

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/StaxJbiWrapper.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/StaxJbiWrapper.java?rev=991890&r1=991889&r2=991890&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/StaxJbiWrapper.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/StaxJbiWrapper.java
Thu Sep  2 11:13:43 2010
@@ -212,7 +212,13 @@ public class StaxJbiWrapper implements X
             case STATE_END_ELEMENT_PART:
                 return CxfJbiConstants.WSDL11_WRAPPER_PREFIX;
             case STATE_RUN_PART:
-                return parts.get(part).get(reader).getPrefix();
+                String prefix = parts.get(part).get(reader).getPrefix();
+                if (prefix != null && prefix.length() == 0 
+                        && parts.get(part).get(reader).getNamespaceURI().length()
> 0) {
+                    return CxfJbiConstants.WSDL11_WRAPPER_PART_LOCALNAME;
+                } else {
+                    return prefix;
+                }
             default:
                 throw new IllegalStateException();
         }
@@ -278,7 +284,7 @@ public class StaxJbiWrapper implements X
     public int getAttributeCount() {
         switch (state) {
             case STATE_START_ELEMENT_WRAPPER:
-                return 6;
+                return 7;
             case STATE_START_ELEMENT_PART:
                 return 0;
             case STATE_RUN_PART:
@@ -293,15 +299,18 @@ public class StaxJbiWrapper implements X
             case STATE_START_ELEMENT_WRAPPER:
                 switch (i) {
                     case 0: return new QName(XMLConstants.XMLNS_ATTRIBUTE_NS_URI,
+                            CxfJbiConstants.WSDL11_WRAPPER_PREFIX,
+                                            XMLConstants.XMLNS_ATTRIBUTE);
+                    case 1: return new QName(XMLConstants.XMLNS_ATTRIBUTE_NS_URI,
                             CxfJbiConstants.WSDL11_WRAPPER_MESSAGE_PREFIX,
                                              XMLConstants.XMLNS_ATTRIBUTE);
-                    case 1: return new QName(CxfJbiConstants.WSDL11_WRAPPER_TYPE);
-                    case 2: return new QName(CxfJbiConstants.WSDL11_WRAPPER_NAME);
-                    case 3: return new QName(CxfJbiConstants.WSDL11_WRAPPER_VERSION);
-                    case 4: return new QName(XMLConstants.XMLNS_ATTRIBUTE_NS_URI,
+                    case 2: return new QName(CxfJbiConstants.WSDL11_WRAPPER_TYPE);
+                    case 3: return new QName(CxfJbiConstants.WSDL11_WRAPPER_NAME);
+                    case 4: return new QName(CxfJbiConstants.WSDL11_WRAPPER_VERSION);
+                    case 5: return new QName(XMLConstants.XMLNS_ATTRIBUTE_NS_URI,
                             CxfJbiConstants.WSDL11_WRAPPER_XSI_PREFIX,
                                              XMLConstants.XMLNS_ATTRIBUTE);
-                    case 5: return new QName(XMLConstants.XMLNS_ATTRIBUTE_NS_URI,
+                    case 6: return new QName(XMLConstants.XMLNS_ATTRIBUTE_NS_URI,
                             CxfJbiConstants.WSDL11_WRAPPER_XSD_PREFIX,
                                              XMLConstants.XMLNS_ATTRIBUTE);
                     default: throw new IllegalStateException();
@@ -317,12 +326,13 @@ public class StaxJbiWrapper implements X
         switch (state) {
             case STATE_START_ELEMENT_WRAPPER:
                 switch (i) {
-                    case 0: return XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
-                    case 1:
+                    case 0:
+                    case 1: return XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
                     case 2:
-                    case 3: return XMLConstants.NULL_NS_URI;
-                    case 4: return XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
+                    case 3:
+                    case 4: return XMLConstants.NULL_NS_URI;
                     case 5: return XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
+                    case 6: return XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
                     default: throw new IllegalStateException();
                 }
             case STATE_RUN_PART:
@@ -336,12 +346,13 @@ public class StaxJbiWrapper implements X
         switch (state) {
             case STATE_START_ELEMENT_WRAPPER:
                 switch (i) {
-                    case 0: return CxfJbiConstants.WSDL11_WRAPPER_MESSAGE_PREFIX;
-                    case 1: return CxfJbiConstants.WSDL11_WRAPPER_TYPE;
-                    case 2: return CxfJbiConstants.WSDL11_WRAPPER_NAME;
-                    case 3: return CxfJbiConstants.WSDL11_WRAPPER_VERSION;
-                    case 4: return CxfJbiConstants.WSDL11_WRAPPER_XSI_PREFIX;
-                    case 5: return CxfJbiConstants.WSDL11_WRAPPER_XSD_PREFIX;
+                    case 0: return CxfJbiConstants.WSDL11_WRAPPER_PREFIX; 
+                    case 1: return CxfJbiConstants.WSDL11_WRAPPER_MESSAGE_PREFIX;
+                    case 2: return CxfJbiConstants.WSDL11_WRAPPER_TYPE;
+                    case 3: return CxfJbiConstants.WSDL11_WRAPPER_NAME;
+                    case 4: return CxfJbiConstants.WSDL11_WRAPPER_VERSION;
+                    case 5: return CxfJbiConstants.WSDL11_WRAPPER_XSI_PREFIX;
+                    case 6: return CxfJbiConstants.WSDL11_WRAPPER_XSD_PREFIX;
                     default: throw new IllegalStateException();
                 }
             case STATE_RUN_PART:
@@ -356,11 +367,12 @@ public class StaxJbiWrapper implements X
             case STATE_START_ELEMENT_WRAPPER:
                 switch (i) {
                     case 0: return XMLConstants.XMLNS_ATTRIBUTE;
-                    case 1:
+                    case 1: return XMLConstants.XMLNS_ATTRIBUTE;
                     case 2:
-                    case 3: return XMLConstants.DEFAULT_NS_PREFIX;
-                    case 4: return XMLConstants.XMLNS_ATTRIBUTE;
+                    case 3:
+                    case 4: return XMLConstants.DEFAULT_NS_PREFIX;
                     case 5: return XMLConstants.XMLNS_ATTRIBUTE;
+                    case 6: return XMLConstants.XMLNS_ATTRIBUTE;
                     default: throw new IllegalStateException();
                 }
             case STATE_RUN_PART:
@@ -380,13 +392,17 @@ public class StaxJbiWrapper implements X
                 switch (i) {
                     case 0:
                     {
+                        return CxfJbiConstants.WSDL11_WRAPPER_NAMESPACE;
+                    }
+                    case 1:
+                    {
                         String typeNamespace = wsdlMessage.getMessageInfo().getName().getNamespaceURI();
                         if (typeNamespace == null || typeNamespace.length() == 0) {
                             throw new IllegalArgumentException("messageType namespace is
null or empty");
                         }
                         return typeNamespace;
                     }
-                    case 1:
+                    case 2:
                     {
                         String typeLocalName = wsdlMessage.getMessageInfo().getName().getLocalPart();
                         if (typeLocalName == null || typeLocalName.length() == 0) {
@@ -394,13 +410,13 @@ public class StaxJbiWrapper implements X
                         }
                         return CxfJbiConstants.WSDL11_WRAPPER_MESSAGE_PREFIX + ":" + typeLocalName;
                     }
-                    case 2:
-                        return wsdlMessage.getMessageInfo().getName().getLocalPart().toString();
                     case 3:
-                        return "1.0";
+                        return wsdlMessage.getMessageInfo().getName().getLocalPart().toString();
                     case 4:
-                        return XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI;
+                        return "1.0";
                     case 5:
+                        return XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI;
+                    case 6:
                         return XMLConstants.W3C_XML_SCHEMA_NS_URI;
                     default: throw new IllegalStateException();
                 }
@@ -430,7 +446,13 @@ public class StaxJbiWrapper implements X
     }
 
     public String getNamespacePrefix(int i) {
-        return parts.get(part).get(reader).getNamespacePrefix(i);
+        String prefix = parts.get(part).get(reader).getNamespacePrefix(i);
+        if (prefix != null && prefix.length() == 0 
+                && parts.get(part).get(reader).getNamespaceURI().length() > 0)
{
+            return CxfJbiConstants.WSDL11_WRAPPER_PART_LOCALNAME;
+        } else {
+            return prefix;
+        }
     }
 
     public String getNamespaceURI(int i) {



Mime
View raw message