Setting the Content-ID header for an MTOM attachment
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
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]
RE: Setting the Content-ID header for an MTOM attachment
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. When I used axis 1.4 for the same goal I just added an AttachmentPart and then set the setConentID for it. 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: axis-user@ws.apache.org 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]
Re: Setting the Content-ID header for an MTOM attachment
Thilina, Can Yoram write a custom handler, get access to the message context and use the following method in MessageContext to set a custom attachment? public void addAttachment(String contentID, DataHandler dataHandler) -- dims On 9/19/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. When I used axis 1.4 for the same goal I just added an AttachmentPart and then set the setConentID for it. 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: axis-user@ws.apache.org 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] -- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting the Content-ID header for an MTOM attachment
Yes.. Possible.. He can do it at the client (using OperationClient) program as well as at the service impl too :) Then he'll be using Soap With Attachments.. Not MTOM... Thanks, ~Thilina On 9/20/06, Davanum Srinivas [EMAIL PROTECTED] wrote: Thilina, Can Yoram write a custom handler, get access to the message context and use the following method in MessageContext to set a custom attachment? public void addAttachment(String contentID, DataHandler dataHandler) -- dims On 9/19/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. When I used axis 1.4 for the same goal I just added an AttachmentPart and then set the setConentID for it. 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: axis-user@ws.apache.org 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] -- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) - 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]
Re: Setting the Content-ID header for an MTOM attachment
Not using MTOM... Does he care? i doubt it :) -- dims On 9/19/06, Thilina Gunarathne [EMAIL PROTECTED] wrote: Yes.. Possible.. He can do it at the client (using OperationClient) program as well as at the service impl too :) Then he'll be using Soap With Attachments.. Not MTOM... Thanks, ~Thilina On 9/20/06, Davanum Srinivas [EMAIL PROTECTED] wrote: Thilina, Can Yoram write a custom handler, get access to the message context and use the following method in MessageContext to set a custom attachment? public void addAttachment(String contentID, DataHandler dataHandler) -- dims On 9/19/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. When I used axis 1.4 for the same goal I just added an AttachmentPart and then set the setConentID for it. 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: axis-user@ws.apache.org 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] -- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://webservices.apache.org/~thilina/ http://thilinag.blogspot.com/ -- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Setting the Content-ID header for an MTOM attachment
Sounds good to me :-) As long as I get the attachment across like I do with axis 1.4 I am fine. Yoram -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 19, 2006 1:45 PM To: Thilina Gunarathne Cc: axis-user@ws.apache.org Subject: Re: Setting the Content-ID header for an MTOM attachment Not using MTOM... Does he care? i doubt it :) -- dims On 9/19/06, Thilina Gunarathne [EMAIL PROTECTED] wrote: Yes.. Possible.. He can do it at the client (using OperationClient) program as well as at the service impl too :) Then he'll be using Soap With Attachments.. Not MTOM... Thanks, ~Thilina On 9/20/06, Davanum Srinivas [EMAIL PROTECTED] wrote: Thilina, Can Yoram write a custom handler, get access to the message context and use the following method in MessageContext to set a custom attachment? public void addAttachment(String contentID, DataHandler dataHandler) -- dims On 9/19/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. When I used axis 1.4 for the same goal I just added an AttachmentPart and then set the setConentID for it. 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: axis-user@ws.apache.org 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] -- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://webservices.apache.org/~thilina/ http://thilinag.blogspot.com/ -- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) - 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]