Web サービスを作成し、クライアントがファイルをサーバーに送信します。次に、サーバーはファイルを保存する必要があります。私がしたいファイルの名前は、message_2013.03.20.13.55.43.xml (yyyy.mm.dd.hh.mm.ss) のようなものです。Web サービスをデプロイしましたが、ファイルは message_.xml のように保存されます (ファイルが上書きされます)。これは、日付文字列が null であることを意味します。これは私のコードの一部です:
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Date date = new Date();
String current_date = dateFormat.format(date).toString().replaceAll(":", ".");
current_date = current_date.replaceAll(" ", ".");
current_date = current_date.replaceAll("/", ".");;
String pathname = "C:\\soap_downloads\\message_"+current_date+".xml";
私のローカルホストでテストすると、完璧に動作します。サーバーのオペレーティング システムは Windows 2008 R2 です。