Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @MTOM(enabled= true)
- public class Mtomservice{
- @SuppressWarnings("finally")
- public Response getResponse (byte[] arg0) {
- Response response = new Response ();
- try{
- String filePath = WebServiceBase.getCurrentSession().getEnvironmentString("Directory", true)+"/PretenzMtom_3.pdf";
- FileOutputStream fileOut = new FileOutputStream(new File(filePath));
- fileOut.write(arg0);
- response.setResponseststus("OK");
- } catch (Exception e) {
- e.printStackTrace();
- response.setResponseststus("error");
- StringWriter errors = new StringWriter();
- e.printStackTrace(new PrintWriter(errors));
- response.setResponseErrorText(errors.toString());
- }
- finally {
- return response;
- }
- }
Add Comment
Please, Sign In to add comment