Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » CreateRepresentation API call fails with 'No handler found for event: CreateRepresentationInput'
CreateRepresentation API call fails with 'No handler found for event: CreateRepresentationInput' [message #1847367] Mon, 25 October 2021 12:26 Go to next message
Andre Seecamp is currently offline Andre SeecampFriend
Messages: 13
Registered: July 2021
Junior Member
Hello everyone,

I am working on a service which should create a representation for an already created document in Sirius Web.
Currently I am testing the API provided by Sirius Web with a cURL Request.
I also already tried it with the graphiql interface but this lead to the same problem.

The cURL request looks like this:
curl \
    -X POST \
    -H "Content-Type: application/json" \
    --data '{"query":"  mutation createRepresentation ($input: CreateRepresentationInput!) {    createRepresentation (input: $input) {      __typename      ... on ErrorPayload {        message      }    }  }","variables":{"input":{"id":"5eab377a-cfa0-4d3e-b6f6-38d5190e05cf","objectId":"5d99c844-a3b4-4723-932f-6285cd116275","editingContextId":"7f9f322f-8767-40ce-8bcf-4f3b44e9bcda","representationDescriptionId":"5eab377a-cfa0-4d3e-b6f6-38d5190e05cf","representationName":"TestRepresentation"}}}' \
    http://localhost:8080/api/graphql


I inserted the current editingContextId and the objectId (which I assume correlates to the documentId?). The id and representationDescriptionId are set randomly.

Now, Sirius Web returns an error if I execute the query. In my console I receive the following error:
Quote:
'No handler found for event: CreateRepresentationInput {id: 5eab377a-cfa0-4d3e-b6f6-38d5190e05cf, editingContextId: 7f9f322f-8767-40ce-8bcf-4f3b44e9bcda, representationDescriptionId: 5eab377a-cfa0-4d3e-b6f6-38d5190e05cf, objectId: 5d99c844-a3b4-4723-932f-6285cd116275, representationName: TestRepresentation}


I already took a look at the code which returns the error, but I can not figure out what I have to change to make the query work.

If anyone could point out what is wrong with my query I would be very grateful!

Thanks in advance!

Best regards,
André
Re: CreateRepresentation API call fails with 'No handler found for event: CreateRepresentationInput' [message #1847500 is a reply to message #1847367] Fri, 29 October 2021 07:55 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Quote:

I inserted the current editingContextId and the objectId (which I assume correlates to the documentId?). The id and representationDescriptionId are set randomly.



  • The "editingContextId" is not the documentId but the projectId (in most cases, you can assume editingContext == project).
  • The "objectId" should be the id of the semantic element on which the new representation is to be created
  • The plain "id" can be randomly chosen, it only serves as an identifier for the request itself
  • The "representationDescriptionId" is *not* random, it should be the id of the type of representation you want to create, typically a DiagramDescription.



Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: CreateRepresentation API call fails with 'No handler found for event: CreateRepresentationInput' [message #1847502 is a reply to message #1847500] Fri, 29 October 2021 09:17 Go to previous message
Andre Seecamp is currently offline Andre SeecampFriend
Messages: 13
Registered: July 2021
Junior Member
Thanks again for your help!
Setting a correct id for the representationDescriptionId resolved my problem.
Previous Topic:Read-only session for image exporting
Next Topic:NullPointerException when I create session using aird file
Goto Forum:
  


Current Time: Sat Apr 20 02:35:57 GMT 2024

Powered by FUDForum. Page generated in 0.02918 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top