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 2010/02/06 08:08:35 UTC
svn commit: r907180 -
/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
Author: ffang
Date: Sat Feb 6 07:08:35 2010
New Revision: 907180
URL: http://svn.apache.org/viewvc?rev=907180&view=rev
Log:
[SMXCOMP-709]cxf-bc doesn't need to conver to InputStream
Modified:
servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java?rev=907180&r1=907179&r2=907180&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java (original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java Sat Feb 6 07:08:35 2010
@@ -234,13 +234,7 @@
outChain.add(getOutFaultInterceptors());
message.setInterceptorChain(outChain);
- InputStream is = convertMessageToInputStream(nm
- .getContent());
-
- StreamSource source = new StreamSource(is);
- message.setContent(Source.class, source);
-
- message.setContent(InputStream.class, is);
+ message.setContent(Source.class, nm.getContent());
conduit.prepare(message);
OutputStream os = message.getContent(OutputStream.class);
@@ -260,7 +254,6 @@
os = message.getContent(OutputStream.class);
os.flush();
- is.close();
os.close();
} catch (Exception e) {
if (!(exchange instanceof InOnly)) {
@@ -691,14 +684,6 @@
return useSOAPEnvelope;
}
- protected InputStream convertMessageToInputStream(Source src) throws IOException, TransformerException {
- final Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- StreamResult result = new StreamResult(baos);
- transformer.transform(src, result);
- return new ByteArrayInputStream(baos.toByteArray());
- }
-
/**
* Specifies if the endpoints send message synchronously to external server using underlying
* jms/http transport