Title: [727] trunk/components/base/src/main/java/org/servicemix/components/saaj: Fix SM-141
- Revision
- 727
- Author
- gnt
- Date
- 2005-11-02 15:02:47 -0500 (Wed, 02 Nov 2005)
Log Message
Fix SM-141
Modified Paths
Diff
Modified: trunk/components/base/src/main/java/org/servicemix/components/http/HttpClientMarshaler.java (726 => 727)
--- trunk/components/base/src/main/java/org/servicemix/components/http/HttpClientMarshaler.java 2005-11-02 17:57:24 UTC (rev 726)
+++ trunk/components/base/src/main/java/org/servicemix/components/http/HttpClientMarshaler.java 2005-11-02 20:02:47 UTC (rev 727)
@@ -82,6 +82,8 @@
* By default this includes all suitable typed values
*/
protected boolean shouldIncludeHeader(NormalizedMessage normalizedMessage, String name, Object value) {
- return value instanceof String;
+ return value instanceof String &&
+ !"Content-Length".equals(name) &&
+ !"Content-Type".equals(name);
}
}
Modified: trunk/components/base/src/main/java/org/servicemix/components/http/HttpInvoker.java (726 => 727)
--- trunk/components/base/src/main/java/org/servicemix/components/http/HttpInvoker.java 2005-11-02 17:57:24 UTC (rev 726)
+++ trunk/components/base/src/main/java/org/servicemix/components/http/HttpInvoker.java 2005-11-02 20:02:47 UTC (rev 727)
@@ -66,12 +66,10 @@
// now lets grab the output and set it on the out message
marshaler.toNMS(out, method);
- done(exchange);
return true;
}
catch (Exception e) {
- fail(exchange, e);
- return true;
+ throw new MessagingException("Error executing http request", e);
}
finally {
method.releaseConnection();
Modified: trunk/components/base/src/main/java/org/servicemix/components/saaj/SaajBinding.java (726 => 727)
--- trunk/components/base/src/main/java/org/servicemix/components/saaj/SaajBinding.java 2005-11-02 17:57:24 UTC (rev 726)
+++ trunk/components/base/src/main/java/org/servicemix/components/saaj/SaajBinding.java 2005-11-02 20:02:47 UTC (rev 727)
@@ -78,6 +78,12 @@
}
public void onMessageExchange(MessageExchange exchange) throws MessagingException {
+ if (exchange.getStatus() == ExchangeStatus.DONE) {
+ return;
+ } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
+ done(exchange);
+ return;
+ }
SOAPConnection connection = null;
try {
connection = getConnectionFactory().createConnection();
Modified: trunk/components/base/src/test/resources/org/servicemix/components/http/example.xml (726 => 727)
--- trunk/components/base/src/test/resources/org/servicemix/components/http/example.xml 2005-11-02 17:57:24 UTC (rev 726)
+++ trunk/components/base/src/test/resources/org/servicemix/components/http/example.xml 2005-11-02 20:02:47 UTC (rev 727)
@@ -15,7 +15,7 @@
<!-- END SNIPPET: send -->
<!-- START SNIPPET: binding -->
- <sm:activationSpec componentName="httpReceiver" service="foo:httpBinding" destinationService="foo:stockQuote">
+ <sm:activationSpec componentName="httpReceiver" service="foo:httpBinding" destinationService="foo:httpSender2">
<sm:component><bean class="org.servicemix.components.http.HttpConnector">
<property name="host" value="localhost"/>
<property name="port" value="8912"/>
@@ -23,6 +23,19 @@
</sm:activationSpec>
<!-- END SNIPPET: binding -->
+ <sm:activationSpec componentName="httpSender2" service="foo:httpSender2">
+ <sm:component><bean class="org.servicemix.components.http.HttpInvoker">
+ <property name="url" value="http://localhost:8913"/>
+ </bean></sm:component>
+ </sm:activationSpec>
+
+ <sm:activationSpec componentName="httpReceiver2" service="foo:httpBinding2" destinationService="foo:stockQuote">
+ <sm:component><bean class="org.servicemix.components.http.HttpConnector">
+ <property name="host" value="localhost"/>
+ <property name="port" value="8913"/>
+ </bean></sm:component>
+ </sm:activationSpec>
+
<sm:activationSpec componentName="stockQuote" service="foo:stockQuote">
<sm:component><bean class="org.servicemix.components.saaj.SaajBinding">
<property name="soapEndpoint">