Author: dkulp
Date: Fri Jan 8 22:02:14 2010
New Revision: 897332
URL: http://svn.apache.org/viewvc?rev=897332&view=rev
Log:
Fix test failure
Modified:
cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java
Modified:
cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java?rev=897332&r1=897331&r2=897332&view=diff
==============================================================================
---
cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java
(original)
+++
cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java
Fri Jan 8 22:02:14 2010
@@ -172,10 +172,11 @@
XMLStreamWriter writer =
(XMLStreamWriter)message.get(ORIGINAL_XML_WRITER);
try {
- StaxUtils.copy(new
W3CDOMStreamReader(soapMessage.getSOAPPart()), writer);
- writer.flush();
- message.setContent(XMLStreamWriter.class, writer);
-
+ if (writer != null) {
+ StaxUtils.copy(new
W3CDOMStreamReader(soapMessage.getSOAPPart()), writer);
+ writer.flush();
+ message.setContent(XMLStreamWriter.class, writer);
+ }
} catch (XMLStreamException e) {
throw new SoapFault(new Message("SOAPEXCEPTION", BUNDLE),
e, message.getVersion()
.getSender());