You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Sean Cote (JIRA)" <ji...@apache.org> on 2008/09/04 15:37:44 UTC

[jira] Created: (AXIS2-4010) Attachment content-type header not set properly for bmp files.

Attachment content-type header not set properly for bmp files.
--------------------------------------------------------------

                 Key: AXIS2-4010
                 URL: https://issues.apache.org/jira/browse/AXIS2-4010
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
    Affects Versions: 1.4
         Environment: Any OS/platform.
            Reporter: Sean Cote


I am adding an attachment to a SOAP request, like so:

_serviceClient.getOptions().setProperty(Constants.Configuration.ENABLE_SWA, Constants.VALUE_TRUE);
if (attachment != null) {
    FileDataSource communityFile = new FileDataSource(attachment);
    DataHandler communityDH = new DataHandler(communityFile);
     _messageContext.addAttachment(communityDH);
}

I am looking at the request in TCPMon and I see an issue. If the attachment is a jpg file, the "Content-Type" is automatically set to "image/jpeg". If the attachment is a gif file, the "Content-Type" is automatically set to "image/gif". However, if the attachment is a bmp file, the "Content-Type" is "application/octet-stream". I believe it should be set to "image/bmp", just like the other image file-types.

To work around this, I'm going to have to modify the generated stubs to set the "Content-Type" manually.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-4010) Attachment content-type header not set properly for bmp files.

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628862#action_12628862 ] 

Andreas Veithen commented on AXIS2-4010:
----------------------------------------

The content type is determined by FileDataSource which belongs to the Java Activation Framework. Please refer to the Javadoc of javax.activation.MimetypesFileTypeMap to set up a mapping for BMP files in your program.

> Attachment content-type header not set properly for bmp files.
> --------------------------------------------------------------
>
>                 Key: AXIS2-4010
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4010
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.4
>         Environment: Any OS/platform.
>            Reporter: Sean Cote
>
> I am adding an attachment to a SOAP request, like so:
> _serviceClient.getOptions().setProperty(Constants.Configuration.ENABLE_SWA, Constants.VALUE_TRUE);
> if (attachment != null) {
>     FileDataSource communityFile = new FileDataSource(attachment);
>     DataHandler communityDH = new DataHandler(communityFile);
>      _messageContext.addAttachment(communityDH);
> }
> I am looking at the request in TCPMon and I see an issue. If the attachment is a jpg file, the "Content-Type" is automatically set to "image/jpeg". If the attachment is a gif file, the "Content-Type" is automatically set to "image/gif". However, if the attachment is a bmp file, the "Content-Type" is "application/octet-stream". I believe it should be set to "image/bmp", just like the other image file-types.
> To work around this, I'm going to have to modify the generated stubs to set the "Content-Type" manually.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Closed: (AXIS2-4010) Attachment content-type header not set properly for bmp files.

Posted by "Sean Cote (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Cote closed AXIS2-4010.
----------------------------

    Resolution: Invalid

I have reported a bug to the activation framework. I will post a link to it as soon as Sun gets around to triaging the bug report.

> Attachment content-type header not set properly for bmp files.
> --------------------------------------------------------------
>
>                 Key: AXIS2-4010
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4010
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.4
>         Environment: Any OS/platform.
>            Reporter: Sean Cote
>
> I am adding an attachment to a SOAP request, like so:
> _serviceClient.getOptions().setProperty(Constants.Configuration.ENABLE_SWA, Constants.VALUE_TRUE);
> if (attachment != null) {
>     FileDataSource communityFile = new FileDataSource(attachment);
>     DataHandler communityDH = new DataHandler(communityFile);
>      _messageContext.addAttachment(communityDH);
> }
> I am looking at the request in TCPMon and I see an issue. If the attachment is a jpg file, the "Content-Type" is automatically set to "image/jpeg". If the attachment is a gif file, the "Content-Type" is automatically set to "image/gif". However, if the attachment is a bmp file, the "Content-Type" is "application/octet-stream". I believe it should be set to "image/bmp", just like the other image file-types.
> To work around this, I'm going to have to modify the generated stubs to set the "Content-Type" manually.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org