Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST API does not un-marshal XMLliterals #499

Open
amedranogil opened this issue Mar 15, 2019 · 2 comments
Open

REST API does not un-marshal XMLliterals #499

amedranogil opened this issue Mar 15, 2019 · 2 comments
Assignees

Comments

@amedranogil
Copy link
Member

When REST API receives an event (for example) if the turtle serialization includes an XMLLiteral it will not unmarshall it.

Reproduce:

have CHe and RESTAPI installed,
send a CTXe with subject as XMLLliteral
querry CHe for context event,
You'll see the serialization of subject as subject, and not the URI.

Work arround:

have clients not send literals:

			//unliterilize everything
			event.unliteral();
			Iterator it = GraphIterator.getResourceIterator(event);
			while (it.hasNext()) {
				Resource r = (Resource) it.next();
				r.unliteral();
                        }
@Alfiva Alfiva self-assigned this Mar 15, 2019
@Alfiva
Copy link
Member

Alfiva commented Mar 15, 2019

Do you mean when the event is sent from a REST client to the REST API? Or from uAAL instance towards the REST clients through their callbacks in REST Manager? (in other words: in which direction?)
Does this happen only when XMLliteral is the subject, or anywhere in the event?
Do you have any particular event you are using for testing?
Do you suggest that not sending literals is the way to go, or should we find a fix to allow them?
Will this happen as well with service calls that include XMLliterals?

@amedranogil
Copy link
Member Author

amedranogil commented Mar 15, 2019

Do you mean when the event is sent from a REST client to the REST API? Or from uAAL instance towards the REST clients through their callbacks in REST Manager? (in other words: in which direction?)

tested when client sends context event to REST API .

Does this happen only when XMLliteral is the subject, or anywhere in the event?

It happens with any member; I only noticed for subject and object; but I guess this happens with anything. The problem might not be so much on REST-API as CHe registering the litereals as ... literals (i.e. you can not querry anything within the object)

Do you have any particular event you are using for testing?

yes.
but due to privacy concerns I would have to clean up somewhat.

Do you suggest that not sending literals is the way to go, or should we find a fix to allow them?

the fact that the serialization included a literal might be an accident on my part, but this rises a good question about how to manage the literals and who should manage them. As said, the REST API seemed not to mind literal properties in an event, but the real problem rose when querrying the CHe for those events.

Will this happen as well with service calls that include XMLliterals?

I think the Service Strategy is smart enough to deal with liteals, but I do not know if this will happen in every situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants