You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/03/28 13:40:42 UTC

svn commit: r389479 - /incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java

Author: gnodet
Date: Tue Mar 28 03:40:36 2006
New Revision: 389479

URL: http://svn.apache.org/viewcvs?rev=389479&view=rev
Log:
SM-349: Invalid content length header may be sent
Use soapVersion if specified

Modified:
    incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java

Modified: incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java?rev=389479&r1=389478&r2=389479&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java (original)
+++ incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java Tue Mar 28 03:40:36 2006
@@ -71,6 +71,9 @@
         try {
             this.endpoint = endpoint;
             this.soapMarshaler = new SoapMarshaler(endpoint.isSoap());
+            if (endpoint.isSoap() && "1.1".equals(endpoint.getSoapVersion())) {
+                this.soapMarshaler.setSoapUri(SoapMarshaler.SOAP_11_URI);
+            }
             this.jbiMarshaler = new JBIMarshaler();
             this.host = new HostConfiguration();
             this.host.setHost(new URI(endpoint.getLocationURI(), false));
@@ -103,7 +106,7 @@
         if (entity.getContentLength() < 0) {
             method.removeRequestHeader("Content-Length");
         } else {
-            method.addRequestHeader("Content-Length", Long.toString(entity.getContentLength()));
+            method.setRequestHeader("Content-Length", Long.toString(entity.getContentLength()));
         }
         method.setRequestEntity(entity);
         try {