You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Brad Moody (JIRA)" <ji...@apache.org> on 2008/06/05 17:07:45 UTC

[jira] Created: (CXF-1634) Add XMLBean data provider to JAX-RS front end

Add XMLBean data provider to JAX-RS front end
---------------------------------------------

                 Key: CXF-1634
                 URL: https://issues.apache.org/jira/browse/CXF-1634
             Project: CXF
          Issue Type: Improvement
          Components: REST
    Affects Versions: 2.1
            Reporter: Brad Moody
            Priority: Minor




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


[jira] Commented: (CXF-1634) Add XMLBean data provider to JAX-RS front end

Posted by "Brad Moody (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602984#action_12602984 ] 

Brad Moody commented on CXF-1634:
---------------------------------

Yeah that sounds like a pretty good idea. I'll look into it when I have some free time.

> Add XMLBean data provider to JAX-RS front end
> ---------------------------------------------
>
>                 Key: CXF-1634
>                 URL: https://issues.apache.org/jira/browse/CXF-1634
>             Project: CXF
>          Issue Type: Improvement
>          Components: REST
>    Affects Versions: 2.1
>            Reporter: Brad Moody
>            Priority: Minor
>         Attachments: jaxrsXmlBeans.patch
>
>


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


[jira] Commented: (CXF-1634) Add XMLBean data provider to JAX-RS front end

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602977#action_12602977 ] 

Sergey Beryozkin commented on CXF-1634:
---------------------------------------

Thanks for supplying  a patch. I'll incorporate it into my 'big' patch I'll attempt to commit at 21/22 June.

Couple of comments :
1. I'll most likely move XMLbeans and Atom providers (those not required by the spec) out of the default list and into a sererate extensions package.

2. On the temp file thing : I think it's very reasonable to use a temp file for large requests/responses. 
Still, would it make sense to check for a Content-Length header in readFrom() and if it's less than say 8K or 16K then use an in memory buffer ? If you agree then you may consider enhancing it after my commit as at the trunk the runtime passes null for the  headers parameter....

> Add XMLBean data provider to JAX-RS front end
> ---------------------------------------------
>
>                 Key: CXF-1634
>                 URL: https://issues.apache.org/jira/browse/CXF-1634
>             Project: CXF
>          Issue Type: Improvement
>          Components: REST
>    Affects Versions: 2.1
>            Reporter: Brad Moody
>            Priority: Minor
>         Attachments: jaxrsXmlBeans.patch
>
>


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


[jira] Resolved: (CXF-1634) Add XMLBean data provider to JAX-RS front end

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

Sergey Beryozkin resolved CXF-1634.
-----------------------------------

    Resolution: Fixed

> Add XMLBean data provider to JAX-RS front end
> ---------------------------------------------
>
>                 Key: CXF-1634
>                 URL: https://issues.apache.org/jira/browse/CXF-1634
>             Project: CXF
>          Issue Type: Improvement
>          Components: REST
>    Affects Versions: 2.1
>            Reporter: Brad Moody
>            Assignee: Sergey Beryozkin
>            Priority: Minor
>         Attachments: jaxrsXmlBeans.patch
>
>


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


[jira] Updated: (CXF-1634) Add XMLBean data provider to JAX-RS front end

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

Brad Moody updated CXF-1634:
----------------------------

    Attachment: jaxrsXmlBeans.patch

Here's a patch to give JAX-RS providers which allow XMLBeans classes to work with media types application/xml and application/json. The definition of an XMLBean being an object that extends org.apache.xmlbeans.XMLObject.

Completely untested other than they work on my machine. 

I'm not 100% happy with the JSON provider as it writes the data from XMLBean.save() to a  temporary file and then reads it back in using an XMLStream. 

I've not really got enough experience with XML streams to come up with a better way of converting to JSON. The only alternative I could think of was to eliminate the temp file by keeping the whole document string in memory. Unfortunately the project I developed this for has concerns about large files so I had to steer clear of that.

I'd be interested to see a better way of doing this if anyone else finds these classes useful.

> Add XMLBean data provider to JAX-RS front end
> ---------------------------------------------
>
>                 Key: CXF-1634
>                 URL: https://issues.apache.org/jira/browse/CXF-1634
>             Project: CXF
>          Issue Type: Improvement
>          Components: REST
>    Affects Versions: 2.1
>            Reporter: Brad Moody
>            Priority: Minor
>         Attachments: jaxrsXmlBeans.patch
>
>


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


[jira] Assigned: (CXF-1634) Add XMLBean data provider to JAX-RS front end

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

Sergey Beryozkin reassigned CXF-1634:
-------------------------------------

    Assignee: Sergey Beryozkin

> Add XMLBean data provider to JAX-RS front end
> ---------------------------------------------
>
>                 Key: CXF-1634
>                 URL: https://issues.apache.org/jira/browse/CXF-1634
>             Project: CXF
>          Issue Type: Improvement
>          Components: REST
>    Affects Versions: 2.1
>            Reporter: Brad Moody
>            Assignee: Sergey Beryozkin
>            Priority: Minor
>         Attachments: jaxrsXmlBeans.patch
>
>


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