Permalink
Browse files

[maven-release-plugin] copy for tag camel-2.7.4

git-svn-id: https://svn.apache.org/repos/asf/camel/tags/camel-2.7.4@1183010 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
dkulp committed Oct 13, 2011
2 parents 506c76c + 1ac2bc1 commit cfe49e9e0dae0ea2bb696c31e456093721d8ab96
@@ -394,11 +394,11 @@ protected MessageContentsList getResponsePayloadList(org.apache.cxf.message.Exch
MessageContentsList answer = new MessageContentsList();
int i = 0;
-
- for (MessagePartInfo partInfo : boi.getOutput().getMessageParts()) {
- if (elements.size() > i) {
- answer.put(partInfo, elements.get(i++));
-
+ if (boi.getOutput() != null) {
+ for (MessagePartInfo partInfo : boi.getOutput().getMessageParts()) {
+ if (elements.size() > i) {
+ answer.put(partInfo, elements.get(i++));
+ }
}
}
@@ -44,16 +44,18 @@ public void handleMessage(Message message) throws Fault {
}
List<?> params = message.getContent(List.class);
- InputStream is = (InputStream)params.get(0);
- OutputStream os = message.getContent(OutputStream.class);
+ if (null != params) {
+ InputStream is = (InputStream)params.get(0);
+ OutputStream os = message.getContent(OutputStream.class);
- try {
- IOHelper.copy(is, os);
- } catch (Exception e) {
- throw new Fault(e);
- } finally {
- IOHelper.close(is, "input stream", null);
- // Should not close the output stream as the interceptor chain will close it
+ try {
+ IOHelper.copy(is, os);
+ } catch (Exception e) {
+ throw new Fault(e);
+ } finally {
+ IOHelper.close(is, "input stream", null);
+ // Should not close the output stream as the interceptor chain will close it
+ }
}
}
}
View
@@ -51,7 +51,7 @@
<commons-collections-version>3.2.1</commons-collections-version>
<commons-pool-version>1.5.4</commons-pool-version>
<commons-dbcp-version>1.3</commons-dbcp-version>
- <cxf-version>2.3.5</cxf-version>
+ <cxf-version>2.3.7</cxf-version>
<cxf-xjc-utils-version>2.3.2</cxf-xjc-utils-version>
<derby-version>10.4.2.0</derby-version>
<dnsjava-version>2.1.0</dnsjava-version>
@@ -91,8 +91,7 @@ public void testServiceWithValidateUser() throws Exception {
fail("should fail");
} catch (Exception ex) {
assertTrue("Get a wrong type exception.", ex instanceof SOAPFaultException);
- assertTrue("Get a wrong exception message", ex.getMessage().startsWith("The security token could not be authenticated or authorized;"));
- assertTrue("Get a wrong exception message", ex.getMessage().endsWith("java.io.IOException: Wrong password!"));
+ assertTrue("Get a wrong exception message: " + ex.getMessage(), ex.getMessage().startsWith("The security token could not be authenticated or authorized"));
}
}

0 comments on commit cfe49e9

Please sign in to comment.