users@jersey.java.net

Re: [Jersey] List<T> Use Sentence Case instead of Camel Case

From: gerard davison <gerard.davison_at_oracle.com>
Date: Tue, 13 Oct 2009 11:59:15 +0100

Paul

It appears that jersey at least is already replicated of java.net in a
read-only way if this helps anybody:

http://www.java.net/blog/kohsuke/archive/2009/10/08/read-only-mirror-subversion-repositories-various-projects

Gerard


On 13/10/2009 09:16, Paul Sandoz wrote:
> Hi James,
>
> This is an open issue. I would point you to it, but unfortunately
> java.net is still having it's own issues coping with DoS attacks. For
> example, Hudson has not managed to complete a successful build for
> over a week! things are in a terrible state. At this point we are
> seriously considering moving off java.net after our EE 6 work is complete
>
> Paul.
>
> On Oct 9, 2009, at 7:03 PM, James Allchin wrote:
>
>> Hi All,
>>
>> I have a number of JAXB beans that are directly marshalled and
>> unmarshalled using Jersey.
>>
>> E.g.
>>
>> @XmlAccessorType(XmlAccessType.FIELD)
>> @XmlType(name = "Artifact", propOrder = {
>> "artifactId",
>> "artifactType",
>> "contentHash"
>> })
>> @XmlSeeAlso({
>> EmailArtifact.class,
>> ManagedDocArtifact.class
>> })
>> @XmlRootElement(name ="Artifact")
>> public class Artifact {
>>
>> protected String artifactId;
>> protected String artifactType;
>> protected String contentHash;
>>
>> ...
>> ...
>> ...
>>
>> }
>>
>> If I create a GET method that returns a single artifact object. It
>> correctly produces the XML:
>>
>> <Artifact>
>> <artifactId>293289392839283</artifactId>
>> <artifactType>EMAIL</artifactType>
>> <contentHash>2837873827322</contentHash>
>> </Artifact>
>>
>> Here I have been able to successfully control the name of the
>> Artifact element to have a capital "A" at the beginning.
>>
>> However, I create a GET method that returns collection of artifact
>> objects, I end up with:
>>
>> <artifacts>
>> <Artifact>
>> <artifactId>293289392839283</artifactId>
>> <artifactType>EMAIL</artifactType>
>> <contentHash>2837873827322</contentHash>
>> </Artifact>
>> <Artifact>
>> <artifactId>293289392839283</artifactId>
>> <artifactType>EMAIL</artifactType>
>> <contentHash>2837873827322</contentHash>
>> </Artifact>
>> </artifacts>
>>
>> As you can see the outer element for the collection has a lower case
>> "A". In order to conform to our own internal standard I would like
>> this to be a capital "A" - Artifacts.
>>
>> I can not see where this is possible to define within JAXB, is it
>> actually the Jersey framework that is controlling this?
>>
>> Can we control of the element name generated for collections?
>>
>> Many thanks,
>>
>> James
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

-- 
Gerard Davison | Senior Principal Software Engineer | +44 118 924 5095
Oracle JDeveloper Web Service Tooling Development
Oracle Corporation UK Ltd is a company incorporated in England & Wales.
Company Reg. No. 1782505.
Reg. office: Oracle Parkway, Thames Valley Park, Reading RG6 1RA.
Blog http://kingsfleet.blogspot.com