axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff" <j...@cogentlogic.com>
Subject Re: AW: MessageContext.getCurrentContext() returns null
Date Thu, 01 Apr 2004 14:53:55 GMT
Yeah, you need activation.jar and mail.jar in the class path.

Yet another class path issue...it'll be the death of Java...I hope...perhaps
J3SE can solve it before we move on to something better!


Jeff



----- Original Message ----- 
From: "Tony Thompson" <tony.thompson@stone-ware.com>
To: <Thomas.Dorner@t-systems.com>; <axis-user@ws.apache.org>
Sent: Thursday, April 01, 2004 7:37 AM
Subject: Re: AW: MessageContext.getCurrentContext() returns null


> In your examples, what is "soapService" and "oService"?
>
> Is it possible that my service is not deployed correctly and that is
> why the current message context is null?
>
> Thanks.
> Tony
>
> >>> Thomas.Dorner@t-systems.com 04/01/04 02:37AM >>>
> You can handle your attachment like this - without using the
> MessageContext
>
> Object[] attachments = soapService.getAttachments();
> AttachmentPart attachPart = (AttachmentPart) attachments[0];
> AttachmentPart attachPart1 = (AttachmentPart) attachments[1];
>
> DataHandler arrow = attachPart.getDataHandler();
> DataHandler folder = attachPart1.getDataHandler();
>
> File myFile1 = new File("C:\\temp\\" + attachPart.getContentId() +
> ".gif");
> FileOutputStream myFOS1 = new FileOutputStream(myFile1);
> arrow.writeTo(myFOS1);
>
> ....
>
> Another solution can be - take your Service or Locator (also Service)
> and get the AxisEngine --> then make
> engine.getCurrentMessageContext()!?
>
> AxisEngine engine = oService.getEngine();
> engine.getCurrentMessageContext();
>
> Thomas
>
> -----Ursprüngliche Nachricht-----
> Von: Tony Thompson [mailto:tony.thompson@stone-ware.com]
> Gesendet: Mittwoch, 31. März 2004 15:51
> An: axis-user@ws.apache.org
> Betreff: MessageContext.getCurrentContext() returns null
>
>
> When I invoke MessageContext.getCurrentContext(), it returns null.
> Can
> anyone explain why that might happen and how I can fix it?  I am
> trying
> to add a DIME attachment to a response and it is hard to do without a
> MessageContext.
>
> Thanks.
> Tony


Mime
View raw message