You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by Apache Wiki <wi...@apache.org> on 2005/04/06 04:03:38 UTC

[Ws Wiki] Update of "ja/axis/AttachmentsSpecifyFilename" by ToshiyukiKimura

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification.

The following page has been changed by ToshiyukiKimura:
http://wiki.apache.org/ws/ja/axis/AttachmentsSpecifyFilename

The comment on the change is:
Axis Wiki in Japanese

New page:
##language:ja

'''質問: 添付を出力する場所はどのようにして指定するのですか?'''

回答: 出力を自分で書くだけです。例えば以下のように書きます。

{{{
   Iterator       iterator = call.getResponseMessage().getAttachments();
   AttachmentPart part     = (AttachmentPart) iterator.next();
   DataHandler    dh       = part.getDataHandler();

   dh.writeTo(new java.io.FileOutputStream("ファイルを出力したい完全なファイルパス"));
}}}

あるいは Axis に一時ファイルを生成させ、あなたのファイルシステムに移行します。

{{{
    new java.io.File(dh.getName()).renameTo("実際に欲しいファイル");
}}}


'''質問: どうして私の添付は正しく転送されないのですか (すなわち、添付に関する問題) ?'''

あなたの Axis デプロイに mail.jar (Java Mail) と activation.jar (Java Activaton Framework) が含まれているか確かめてください。