Can anyone advise on the correct class type to pass as a parameter to the Guvnor REST API if I want to get a deployed Excel file from Guvnor?
> WebClient client = WebClient.create("http://localhost:8080/");
> client.header("Authorization", authorizationHeader);
> client.path("jboss-brms/rest/packages/PR/assets/ARule/binary").accept("application/octet-stream").get(FileInputStream.class);
The code above is giving me:
*javax.ws.rs.client.ClientException: .Problem with reading the response message, class : class java.io.FileInputStream, ContentType : application/octet-stream. at org.apache.cxf.jaxrs.client.AbstractClient.reportMessageHandlerProblem(AbstractClient.java:744)
...
Caused by: java.lang.ClassCastException at java.lang.Class.cast(Class.java:2990) at org.apache.cxf.jaxrs.provider.BinaryDataProvider.readFrom(BinaryDataProvider.java:67) at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1288) at org.apache.cxf.jaxrs.client.AbstractClient.readBody(AbstractClient.java:506)*
I'm using Apache CXF2.7.6 and jdk1.6.0_37