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 "Akitoshi Yoshida (JIRA)" <ax...@ws.apache.org> on 2007/08/27 15:43:30 UTC

[jira] Closed: (AXIS-2658) OctetStreamDataSource with an arbitrary content type

     [ https://issues.apache.org/jira/browse/AXIS-2658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Akitoshi Yoshida closed AXIS-2658.
----------------------------------

    Resolution: Duplicate

I wrongly submitted the same issue twice.
This is a duplicate of AXIS-2691.


> OctetStreamDataSource with an arbitrary content type
> ----------------------------------------------------
>
>                 Key: AXIS-2658
>                 URL: https://issues.apache.org/jira/browse/AXIS-2658
>             Project: Axis
>          Issue Type: Improvement
>          Components: Basic Architecture
>    Affects Versions: 1.4
>         Environment: JDK 1.4.2
> Windows XP
>            Reporter: Akitoshi Yoshida
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: OctetStreamDataSource.zip
>
>
> We would like to have a message ( org.apache.axis.Message ) that we can serialize (i.e., using its writeTo(OutputStream) method)  more than once. 
> We noticed that when attachments are instantiated with the org.apache.axis.attachments.ManagedMemoryDataSource class, they will be removed after serialization in the writeContentToStream(java.io.OutputStream os) method of org.apache.axis.attachments.AttachmentsImpl class. When this message is serialized again, it results in an IOException (not thrown but logged) saying that the resource is deleted.
> If the org.apache.axis.attachments.OctetStreamDataSource class can be changed to take a variable content type, we can use this data source class to replace those attachments in a handler.
> This will look like:
> ...
>     private String contentType;
> ...
>     public OctetStreamDataSource(String name, OctetStream data) {
>         this(name, CONTENT_TYPE, data);
>     }
>     public OctetStreamDataSource(String name, String contentType, OctetStream data) {
>         this.name = name;
>         this.contentType = contentType;	
>         this.data = data == null ? null : data.getBytes();
>         os = new ByteArrayOutputStream();
>     } // ctor
> ...
>     public String getContentType() {
>         return contentType;
>     } // getContentType

-- 
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