syncope-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colm O hEigeartaigh (JIRA)" <>
Subject [jira] [Created] (SYNCOPE-884) Error in REST API when specifying accept header
Date Tue, 28 Jun 2016 15:58:57 GMT
Colm O hEigeartaigh created SYNCOPE-884:

             Summary: Error in REST API when specifying accept header
                 Key: SYNCOPE-884
             Project: Syncope
          Issue Type: Bug
    Affects Versions: 2.0.0-M4
            Reporter: Colm O hEigeartaigh
             Fix For: 2.0.0

Let's say we want to create a group via the REST API using curl.


<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:group xmlns:ns2=""><auxClasses/><realm>/</realm><resources/><type>GROUP</type><adynMembershipConds/><name>boss</name><typeExtensions/></ns2:group>

This works fine:

curl -u admin:password -X POST -H 'Content-type: application/xml' -d @req.xml http://localhost:9080/syncope/rest/groups

However, when you specify the accept header, the group gets created, but there is a problem
in marshalling the response:

curl -u admin:password -X POST -H 'Content-type: application/xml' -H 'Accept: application/xml'
-d @req.xml http://localhost:9080/syncope/rest/groups

> JAXBException occurred : 1 counts of IllegalAnnotationExceptions. 

Looking in the logs I see:

16:55:01.014 ERROR org.apache.cxf.jaxrs.utils.JAXRSUtils - Problem with writing the data,
class, ContentType: application/xml

This message was sent by Atlassian JIRA

View raw message