You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2008/05/10 13:41:57 UTC

svn commit: r655055 - in /servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors: JbiConstants.java JbiInWsdl1Interceptor.java

Author: ffang
Date: Sat May 10 04:41:57 2008
New Revision: 655055

URL: http://svn.apache.org/viewvc?rev=655055&view=rev
Log:
[SM-1340]using servicemix-cxf-bc to proxy extenal web service,return the message which lost 'xsd' and 'xsi' namespace

Modified:
    servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiConstants.java
    servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java

Modified: servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiConstants.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiConstants.java?rev=655055&r1=655054&r2=655055&view=diff
==============================================================================
--- servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiConstants.java (original)
+++ servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiConstants.java Sat May 10 04:41:57 2008
@@ -72,7 +72,11 @@
     public static final String WSDL11_WRAPPER_VERSION = "version";
 
     public static final String WSDL11_WRAPPER_PART_LOCALNAME = "part";
-
+    
+    public static final String WSDL11_WRAPPER_XSD_PREFIX = "xsd";
+    
+    public static final String WSDL11_WRAPPER_XSI_PREFIX = "xsi";
+        
     public static final QName WSDL11_WRAPPER_PART = new QName(
             WSDL11_WRAPPER_NAMESPACE, WSDL11_WRAPPER_PART_LOCALNAME,
             WSDL11_WRAPPER_PREFIX);

Modified: servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java?rev=655055&r1=655054&r2=655055&view=diff
==============================================================================
--- servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java (original)
+++ servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java Sat May 10 04:41:57 2008
@@ -109,10 +109,18 @@
                 throw new IllegalArgumentException(
                         "messageType namespace is null or empty");
             }
-            root
-                    .setAttribute(XMLConstants.XMLNS_ATTRIBUTE + ":"
+            root.setAttribute(XMLConstants.XMLNS_ATTRIBUTE + ":"
                             + JbiConstants.WSDL11_WRAPPER_MESSAGE_PREFIX,
                             typeNamespace);
+            
+            root.setAttribute(XMLConstants.XMLNS_ATTRIBUTE + ":"
+                    + JbiConstants.WSDL11_WRAPPER_XSD_PREFIX,
+                    XMLConstants.W3C_XML_SCHEMA_NS_URI);
+
+            root.setAttribute(XMLConstants.XMLNS_ATTRIBUTE + ":"
+                    + JbiConstants.WSDL11_WRAPPER_XSI_PREFIX,
+                    XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
+            
             String typeLocalName = wsdlMessage.getMessageInfo().getName()
                     .getLocalPart();
             if (typeLocalName == null || typeLocalName.length() == 0) {