How can i write a file to a drive on the network using webMethods other than FTP Solution.
Any mounted or shared drive can be accessed via java.io classes. You’ll need to write a Java service to do the writing, or use the sample.IO.test:writeToFile service in the WmSamples as a pattern.
Vijay, this Java code will take any string and write it to file.
Inputs: pathToFile -- The specified path to write the file xmldata -- The string to write to disk Outputs: none -------- begin source code ---------- IDataHashCursor pipelineCursor = pipeline.getHashCursor(); pipelineCursor.first( "pathToFile" ); String pathToFile = (String) pipelineCursor.getValue(); pipelineCursor.first( "xmldata" ); String xmldata = (String) pipelineCursor.getValue(); try { File f = new File(pathToFile); FileOutputStream fos = new FileOutputStream(f); byte[] xmlbytes = xmldata.getBytes(); fos.write(xmlbytes); fos.close(); } catch (Exception e) { System.out.println(e); } -------- end source code ------------