REST « jaxb « Java Enterprise Q&A





1. Using JAXB to unmarshal/marshal a List    stackoverflow.com

I'm trying to create a very simple REST server. I just have a test method that will return a List of Strings. Here's the code:


@GET
@Path("/test2")
public List test2(){
   ...

2. Create Hello World with RESTful web service and Jersey    stackoverflow.com

I follow tutorial here on how to create web service using RESTful web service and Jersey and I get kind of stuck. The code is from HelloWorld3 ...

3. Problem implementing GET REST service due to JAXBException: IllegalAnnotationExceptions    stackoverflow.com

I am having a really strange problem implementing Java REST service. I am trying receive the following model:

@Data @EqualsAndHashCode(callSuper=false, of={"primaryKey"}) 
@Entity @Table(name = "T_UNIQUE_IDENT_TYPE")
@Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@XmlRootElement(name="UniqueIdentifierType") @XmlAccessorType(XmlAccessType.FIELD)
public class UniqueIdentifierType extends AbstractEntityWithTime implements Serializable ...

4. jersey webservice returns a 415 when executing a PUT from Ext.Ajax.request    stackoverflow.com

So, I've got a pretty simple RESTful jersey webservice, and I'm wanting to call it from my javascript code. I have no problem executing a GET request, but for some ...

5. Problem with POST method in RESTful Java Web Service    stackoverflow.com

I'm trying to make a RESTful Web Service which implements all four CRUD operations. I got stuck in "Create" because somehow I'm not able to obtain the posted data. Here is ...

6. JsonTypeInfo does not serialize when using Jackson with Jersey    stackoverflow.com

I annotated a JAXB class with JsonTypeInfo so that I could serialize polymorphic classes easily. However, the annotation does not show up when serialized by Jersey. To be more ...

7. Hypermedia with Jersey using Atom    stackoverflow.com

Every book on REST uses <atom:link href="..." rel="..."> to define Hypermedia in RESTful apps; but Jersey (with the use of JAXB) do not seems to have this support. I've tried @XmlSchema in ...

8. Automatically populate HATEAOS links using JAXB or something similar?    stackoverflow.com

Let's say I'm following HATEOAS and using hypertext in my XML. Something like this: /customer/32

<Customer>
  <FirstName>Joe</FirstName>
  <LastName>Smith</LastName>
  <Address href="/address/4324">
</Customer>
/address/4324
<Address>
  <Street>123 Fake St</Street>
  <Town>Springfield</Town>
</Address>
Is there a library akin ...

9. Method collision between JAXB and rest of the Application    stackoverflow.com

I am converting an existing POJO to be an JAXB compliant. Everything works fine except for one of the getter method of the pojo where I need an additional logic specific ...





10. JAXB REST PUT'ting referenced association    stackoverflow.com

Consider the following entity classes:

  • Manufacturer: represents a car manufacturer (Ford, Volvo, ...) and has a name.
  • Model: represents a model (Fiesta, S80), has a name, and is manufactured by a single manufacturer.
The ...

11. Creating an absolute URI using the UriBuilder from an XmlAdapter    stackoverflow.com

I have an XmlAdapter to marshal associated objects in a class to their respective REST URI's:

public class AirportAdapter extends XmlAdapter<URI, Airport> {

@Override
public URI marshal(Airport airport) throws Exception {
    ...