File is not Writing using FileOutputStream in java

Posted by Krishna on Stack Overflow See other posts from Stack Overflow or by Krishna
Published on 2014-06-09T09:20:34Z Indexed on 2014/06/09 9:24 UTC
Read the original article Hit count: 299

Filed under:
|
|
|

I have Java Desktop Swing application in which i am trying to write xml file but its not writing data into file here my code is

FileOutputStream fileOutputStream = new FileOutputStream(input_file);
            SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
            SOAPConnection soapConnection = soapConnectionFactory.createConnection();

            SOAPMessage soapResponse = soapConnection.call(soapcall, url);

            String str = WebServiceDAO.soapMessageToString(soapResponse);

            System.err.println("String*****" + str);

            fileOutputStream.write(str.getBytes());
            fileOutputStream.close();

here i am getting data but its not writing in file what could be the prob?

© Stack Overflow or respective owner

Related posts about java

Related posts about swing