See my comments inline... On 9/20/06, Yoram Givon <[EMAIL PROTECTED]> wrote:
The reason I need to set the content-ID is that the Transcoding web-service uses the content-id header to identify the attached content. When the MTOM engine generates the content-id for me, there is no way for me to tell the web service where the content is.
How are you going to tell... Anyway MTOM already tells this using the special xml element XOP:Include.. You may want to have a look at the following. http://ws.apache.org/axis2/1_0/mtom-guide.html
When I used axis 1.4 for the same goal I just added an AttachmentPart and then set the setConentID for it.
Is this using Soap With Attachments(SwA) or using MTOM. Axis2 has SwA funtionality too.. You can use that funtionality to do what you want... In that case you can add attachements to the MessageContext, using the get/setAttachment(...,...) methods available in message context.. For this you need to use the Axis2 latest nightly builds.. Regards, ~Thilina
I was just not able to find the equivalent way to do it with Axis2. Cheers, Yoram -----Original Message----- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 19, 2006 12:05 PM To: [email protected] Subject: Re: Setting the Content-ID header for an MTOM attachment Hi Yoram, You can use the OMText.getContentId() to request the content id, given that OMText object contains the binary attachment you want to send. What is you use case..When using MTOM Axis2 will take care of putting the content-id in to the SOAP request appropriately according to the specification, so that the server knows where the attachment is. I don't see why somebody needs to access the content-id manually. ~Thilina On 9/19/06, Yoram Givon <[EMAIL PROTECTED]> wrote: > > > > > Hi All, > > > > I am using Axis2 to create a SOAP request to a web service which performs > Transcoding of a file I attached to the SOAP message using MTOM. > > > > My only problem is that I also have to pass the content-id of the attachment > as part of the SOAP request so the server will know where the file is. > > > > I have searched through the mailing list and the internet and was not able > so far to find a method to set the content-id header for an MTOM attachment. > > > > Does any one know if there is a way to set the content-id header of an MTOM > attachment? > > > > Cheers, > > > > Yoram -- http://webservices.apache.org/~thilina/ http://thilinag.blogspot.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- http://webservices.apache.org/~thilina/ http://thilinag.blogspot.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
