It's all about the answers!

Ask a question

CRRRS6402E Content is not allowed making PUT request in RDNG


Dmitry A. Lesin (19512443) | asked Nov 26 '18, 9:20 a.m.

Hello guys!

Sorry for disturbing. I'm trying to update an artifact with OSLC in accordance to:
But I can not overcome it! Could anybody take a quick look at my case and say what I'm doing wrong.
I'm working with RDNG v6.0.5, use Firefox v12 and Poster add-on installed.
1. Building GET request
Poster GET request

2. Taking and copy-pasting body from result to content of new PUT request to be sent
GET request result

3. Taking content from ETag header in the result of GET request and saving it as is in If-Math header of new PUT request
Coping ETag value to If-Match header

4. Executing PUT request
Error in PUT request

What is wrong?
Thanks a lot in advance!

Accepted answer


permanent link
Ralph Schoon (54.8k23641) | answered Nov 26 '18, 9:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 I was not talking about the HEADER. I was talking about the MESSAGE content in the PUT.


Dmitry A. Lesin selected this answer as the correct answer

Comments
Dmitry A. Lesin commented Nov 26 '18, 10:07 a.m.

Yes, sure, I'm understanding that. I have taken body from result in GET request and copy/pasted it to content to be sent. As well as ETag copied to If-Match.

Or may be I didn't understand you clear again? 


Dmitry A. Lesin commented Nov 26 '18, 10:09 a.m.

  Content is copied


Dmitry A. Lesin commented Nov 26 '18, 10:11 a.m. | edited Nov 26 '18, 10:15 a.m.

SURE

This is a specifics of Poster, I believe. It's never mind if you set "Content-Type" header. It must be set in "Content Type" filed of Poster!


Dmitry A. Lesin commented Nov 26 '18, 10:14 a.m.

  Content type must be set in a special field

2 other answers



permanent link
Ralph Schoon (54.8k23641) | answered Nov 26 '18, 9:28 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Nov 26 '18, 9:30 a.m.

The error message seems to indicate that whatever you sent as a payload in the post was not in a valid application/rdf+xml format. Also check the log and search for the entry using the code.


Comments
Dmitry A. Lesin commented Nov 26 '18, 9:46 a.m. | edited Nov 26 '18, 9:57 a.m.

It's strange because I was taking the content from GET result as is. It means that GET result was not in valid application/rdf+xml format, wasn't it?


Dmitry A. Lesin commented Nov 26 '18, 9:59 a.m.

Log doesn't have enough info:


2018-11-26 17:40:02,447 [Default Executor-thread-4833 @@ 17:40 <unauthenticated> <Mozilla/5.0 (Windows NT 6.2; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0@fe80:0:0:0:180a:7716:d783:2d90%12> /rm/resources/_QdJP-OjKEeinF9fCDHR5fg] ERROR ibm.rdm.fronting.server.services.RMRestServiceBase  - CRRRS1007E  A problem occurred in the Requirements Management (RM) server: Entry [6d335a433bffd7b5]
com.ibm.rdm.fronting.server.exception.UnsupportedMediaTypeException: CRRRS6402E  Content is not allowed.  Content type must be application/rdf+xml
at com.ibm.rdm.fronting.server.exception.RRSException.newException(RRSException.java:315)
at com.ibm.rdm.fronting.server.exception.RRSException.newUnsupportedMediaTypeException(RRSException.java:206)
at com.ibm.rdm.fronting.server.services.calm.internal.OSLC20ContentHandler.validateContentType(OSLC20ContentHandler.java:1712)


permanent link
Benjamin Röhl (120316) | answered Nov 26 '18, 9:34 a.m.

Your GET request is asking for content type of "application/xml" and not "application/rdf+xml".


Comments
Dmitry A. Lesin commented Nov 26 '18, 9:42 a.m.

I was trying already all variants: "application/xml", "application/rdf+xml" in Accept and Content-Type headers but the result is the same.


Benjamin Röhl commented Nov 26 '18, 10:09 a.m.
To be clear, the only combination is correct.

For your GET request define the following headers:
Accept: application/rdf+xml
OSLC-Core-Version: 2.0
...

For your PUT request define the following headers:
Content-Type: application/rdf+xml
OSLC-Core-Version: 2.0
If-Match: [E-Tag of GET request]
...

Dmitry A. Lesin commented Nov 26 '18, 10:43 a.m.

Yes, thank you!

I was trying this variant too.
I appreciate your advice anyway!

Your answer


Register or to post your answer.