File is not Writing using FileOutputStream in java
- by Krishna
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?