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 "Samuel Isokpunwu (JIRA)" <ji...@apache.org> on 2007/02/02 23:52:05 UTC

[jira] Created: (AXIS2-2092) Byte array attachments type

Byte array attachments type
---------------------------

                 Key: AXIS2-2092
                 URL: https://issues.apache.org/jira/browse/AXIS2-2092
             Project: Axis 2.0 (Axis2)
          Issue Type: Improvement
          Components: jaxws
         Environment: Win XP
            Reporter: Samuel Isokpunwu


Adding enhancement to the attachment optimization code to properly marshall a byte array attachment type. The current code work well when attachment type is a DataHandler.

-- 
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] Updated: (AXIS2-2092) Byte array attachments type

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

Rich Scheuerle updated AXIS2-2092:
----------------------------------

    Description:     (was: Adding enhancement to the attachment optimization code to properly marshall a byte array attachment type. The current code work well when attachment type is a DataHandler.)

Adding enhancement to the attachment optimization code to properly marshall a byte array attachment type. The current code work well when attachment type is a DataHandler.

> Byte array attachments type
> ---------------------------
>
>                 Key: AXIS2-2092
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2092
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: jaxws
>         Environment: Win XP
>            Reporter: Samuel Isokpunwu
>         Assigned To: Rich Scheuerle
>


-- 
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-2092) Byte array attachments type

Posted by "Thilina Gunarathne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470142 ] 

Thilina Gunarathne commented on AXIS2-2092:
-------------------------------------------

Can't we achieve this using a ByteArrayDataSource instead of creating an MimePartDataSource.. 

Just curious.. :)

> Byte array attachments type
> ---------------------------
>
>                 Key: AXIS2-2092
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2092
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: jaxws
>         Environment: Win XP
>            Reporter: Samuel Isokpunwu
>         Assigned To: Rich Scheuerle
>         Attachments: d417707patch.txt, patch.txt
>
>


-- 
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] Resolved: (AXIS2-2092) Byte array attachments type

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

Rich Scheuerle resolved AXIS2-2092.
-----------------------------------

    Resolution: Fixed

Committed patch.txt.

Committed revision 503469.

> Byte array attachments type
> ---------------------------
>
>                 Key: AXIS2-2092
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2092
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: jaxws
>         Environment: Win XP
>            Reporter: Samuel Isokpunwu
>         Assigned To: Rich Scheuerle
>         Attachments: d417707patch.txt, patch.txt
>
>


-- 
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] Updated: (AXIS2-2092) Byte array attachments type

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

Rich Scheuerle updated AXIS2-2092:
----------------------------------

    Attachment: patch.txt

I am attaching a modified patch.

The modified patch contains the following:
   1) Added more debug information to both the JAXBAttachmentMarshaller and JAXBAttachmentUnmarshaller.
   2) Added code to implement JAXBAttachmentUnmarshaller.getAttachmentAsBytes() method.
   3) Changed the wsdl for the new test to load the local copy of xmlmime.xsd.  We had problems in 
       the past accessing this schema remotely.
   4) The new test webservices was swallowing exceptions.  I changed the code to throw WebServiceExceptions.
   5)  I added an additional test in the client suite to intentionally not send the message as MTOM optimized.  An MTOM unoptimized client and MTOM optimized server will force the code through some different paths.
   6) I added a second attachment to the ImageDepot.  The second attachement is a custom attachment using the Base64Binary mechanism.  Base64Binary allows the user to get the contentType and byte[] array directly.  I added this second kind of attachment to force some new flows.   It also allowed me to more easily check the resulting values.

I thought that (6) in combination with (5) would cause JAXB to use the unmarshaller code (2).  However it appears that the current version of JAXB 2.0 always invokes getAttachmentAsDataHandler.  Even so, I think the new addtions will help us out.  It would be nice to determine how/whether we can trigger JAXB to use (2).



> Byte array attachments type
> ---------------------------
>
>                 Key: AXIS2-2092
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2092
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: jaxws
>         Environment: Win XP
>            Reporter: Samuel Isokpunwu
>         Assigned To: Rich Scheuerle
>         Attachments: d417707patch.txt, patch.txt
>
>


-- 
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] Assigned: (AXIS2-2092) Byte array attachments type

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

Rich Scheuerle reassigned AXIS2-2092:
-------------------------------------

    Assignee: Rich Scheuerle

> Byte array attachments type
> ---------------------------
>
>                 Key: AXIS2-2092
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2092
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: jaxws
>         Environment: Win XP
>            Reporter: Samuel Isokpunwu
>         Assigned To: Rich Scheuerle
>
> Adding enhancement to the attachment optimization code to properly marshall a byte array attachment type. The current code work well when attachment type is a DataHandler.

-- 
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] Updated: (AXIS2-2092) Byte array attachments type

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

Samuel Isokpunwu updated AXIS2-2092:
------------------------------------

    Attachment: d417707patch.txt

A patch to  fix the problem.

> Byte array attachments type
> ---------------------------
>
>                 Key: AXIS2-2092
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2092
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: jaxws
>         Environment: Win XP
>            Reporter: Samuel Isokpunwu
>         Assigned To: Rich Scheuerle
>         Attachments: d417707patch.txt
>
>


-- 
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-2092) Byte array attachments type

Posted by "Samuel Isokpunwu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470268 ] 

Samuel Isokpunwu commented on AXIS2-2092:
-----------------------------------------

Initially I used ByteArrayDataSource for the implementation but was having problem with JAXB attachment marshaller in the server side response to the client application.
>From further debugging, the JAXB Attachment marshaller uses MimePartDataSource when marshalling the byte array DataHandler request from the client application and hence for reasons I was not able to determine, the jaxws attachment marshaller implementation using  ByteArrayDataSource was failing on the server side response message to the client application.

Apart from the fact that JAXB attachment implementation uses MimePartDataSource,  Also from reading the mime part APIs, It seem that the MimePartDataSource usage is the best approach for messages with mime headers and attachment.

> Byte array attachments type
> ---------------------------
>
>                 Key: AXIS2-2092
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2092
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: jaxws
>         Environment: Win XP
>            Reporter: Samuel Isokpunwu
>         Assigned To: Rich Scheuerle
>         Attachments: d417707patch.txt, patch.txt
>
>


-- 
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-2092) Byte array attachments type

Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470068 ] 

Rich Scheuerle commented on AXIS2-2092:
---------------------------------------

I have applied the patch to my sandbox and I am making some changes to it.

Currently the patch only applies to marshalling...it should also handle unmarshalliing.

> Byte array attachments type
> ---------------------------
>
>                 Key: AXIS2-2092
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2092
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: jaxws
>         Environment: Win XP
>            Reporter: Samuel Isokpunwu
>         Assigned To: Rich Scheuerle
>         Attachments: d417707patch.txt
>
>


-- 
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-2092) Byte array attachments type

Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469910 ] 

Rich Scheuerle commented on AXIS2-2092:
---------------------------------------

Sam is working on a fix and updated test.

> Byte array attachments type
> ---------------------------
>
>                 Key: AXIS2-2092
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2092
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: jaxws
>         Environment: Win XP
>            Reporter: Samuel Isokpunwu
>         Assigned To: Rich Scheuerle
>


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