This is an automated email from the ASF dual-hosted git repository.
ema pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new c8731a9 [CXF-7606]: SwA doesn't work for image/gif content type
c8731a9 is described below
commit c8731a9dd3e26341eeefc3042f64f159e1d2c1c8
Author: Jim Ma <[email protected]>
AuthorDate: Tue Jan 9 17:18:45 2018 +0800
[CXF-7606]: SwA doesn't work for image/gif content type
---
.../java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java | 3 +--
.../src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java | 2 +-
testutils/src/main/resources/wsdl/swa-mime.wsdl | 4 ++--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
index cb22201..c508308 100644
---
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
+++
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
@@ -192,7 +192,6 @@ public class SwAOutInterceptor extends
AbstractSoapInterceptor {
writeTo(bout);
return bout.createInputStream();
}
-
@Override
public void writeTo(OutputStream out) throws IOException {
ImageWriter writer = null;
@@ -206,10 +205,10 @@ public class SwAOutInterceptor extends
AbstractSoapInterceptor {
writer.setOutput(iout);
writer.write(bimg);
writer.dispose();
+ iout.flush();
out.flush();
}
}
-
};
} else if (o instanceof DataHandler) {
diff --git
a/systests/jaxws/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
b/systests/jaxws/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
index 5b1635c..868c414 100644
---
a/systests/jaxws/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
+++
b/systests/jaxws/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
@@ -193,7 +193,7 @@ public class ClientServerSwaTest extends
AbstractBusClientServerTestBase {
URL url2 = this.getClass().getResource("resources/attach.html");
URL url3 = this.getClass().getResource("resources/attach.xml");
URL url4 = this.getClass().getResource("resources/attach.jpeg1");
- URL url5 = this.getClass().getResource("resources/attach.jpeg2");
+ URL url5 = this.getClass().getResource("resources/attach.gif");
DataHandler dh1 = new DataHandler(url1);
DataHandler dh2 = new DataHandler(url2);
diff --git a/testutils/src/main/resources/wsdl/swa-mime.wsdl
b/testutils/src/main/resources/wsdl/swa-mime.wsdl
index 211c740..6e71bda 100644
--- a/testutils/src/main/resources/wsdl/swa-mime.wsdl
+++ b/testutils/src/main/resources/wsdl/swa-mime.wsdl
@@ -190,7 +190,7 @@
<mime:content part="attach4" type="image/jpeg"/>
</mime:part>
<mime:part>
- <mime:content part="attach5" type="image/jpeg"/>
+ <mime:content part="attach5" type="image/gif"/>
</mime:part>
</mime:multipartRelated>
</wsdl:input>
@@ -212,7 +212,7 @@
<mime:content part="attach4" type="image/jpeg"/>
</mime:part>
<mime:part>
- <mime:content part="attach5" type="image/jpeg"/>
+ <mime:content part="attach5" type="image/gif"/>
</mime:part>
</mime:multipartRelated>
</wsdl:output>
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].