Hi,

You'll find a sample problem in [AXIS_HOME]/samples/attachements and
especially EchoAttachementsService.java

Of particular interest to you would be the line that says:

org.apache.axis.MessageContext msgContext =
org.apache.axis.MessageContext.getCurrentContext();

>From the message context one can get a reference to the Message which can be
used to get AttachementParts if my memory is correct. 

Take a look at the sample and it should all become obvious. 

-----
Jason Judt - Software Engineer
Architecture Technology Corporation
(952) 829 - 5864 x137
[EMAIL PROTECTED]
 

>  -----Original Message-----
> From:         Greg Cawthorn [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 12, 2005 9:03 AM
> To:   [EMAIL PROTECTED]
> Subject:      Extracting attachments from messaging service calls
> 
> Hello,
> 
> I am submitting a SOAP message with an attachment to a web service using
> Axis 1.1. To implement a messaging service I have to use one of the
> following method signatures:
> 
> public Element [] method(Element [] bodies); 
> public SOAPBodyElement [] method (SOAPBodyElement [] bodies); 
> public Document method(Document body); 
> public void method(SOAPEnvelope req, SOAPEnvelope resp); 
> 
> I've chosen to use the last one, but I cannot find a way to retrieve the
> attachment since I only have a reference to the SOAP envelope rather than
> the message itself. Could someone please tell me how I can access the
> entire SOAP message so that I can extract my attachment.
> 
> Thanks,
> 
> Greg

Reply via email to