Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext Web: 'The parameter \'serviceType\' is required.'(automatic requests of the editor work in jetty but not on a exported war)
Xtext Web: 'The parameter \'serviceType\' is required.' [message #1805221] Wed, 10 April 2019 07:23 Go to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hello there,
my excursion to the LS ended. For some reasons i have to use the Xtext Web package and the Servlet.
When I start jetty in Eclipse and open the editor, the automatic calls to the servlet work. Then I exported it as a war and imported it in another Eclipse Servlet project. It doesn't find the servcice type which is sent via put:

http://localhost:84/polarion/xtext-service/update?resource=6864cdc3.mydsl

It goes out here:
def ServiceDescriptor getService(IServiceContext context)
throws InvalidRequestException {
val serviceType = context.getParameter(IServiceContext.SERVICE_TYPE)
if (serviceType === null)
throw new InvalidParametersException('The parameter \'serviceType\' is required.')

My own save request, which i send via a button with hardcoded servicetype works:

http://localhost:84/polarion/xtext-service/

jQuery('#save-button').bind("click", function(e) {
var data = {
serviceType: 'save',
resource: 'W1111..mydsl',
fullText: editor.getValue(),
contentType: 'text'
};
console.log(data);
jQuery.post('http://localhost:84/polarion/xtext-
service/', data, function(result) {
console.log("saved");
});

I don't understand why it has different behaviour on Eclipse Jetty and the exported WAR. Same sources.

Thanks for help.
Markus
Re: Xtext Web: 'The parameter \'serviceType\' is required.' [message #1805269 is a reply to message #1805221] Wed, 10 April 2019 15:33 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13163
Registered: July 2009
Senior Member
Are there any error on client side?
Did you compare the requests and responses for differences


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext Web: 'The parameter \'serviceType\' is required.' [message #1805392 is a reply to message #1805269] Sat, 13 April 2019 10:36 Go to previous message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
HI,
it's solved. I edited xtext-ace.css for the new serviceurl and it built my string wrong. When I sent the string in the browser it worked.
Some weird behaviour. I deleted the chache and tried it again... it works
thanks,
Markus
Previous Topic:Single Lined Comments With Ending Characters - Grammar Question
Next Topic:Load a xtext-file to Xtext Web
Goto Forum:
  


Current Time: Mon Oct 21 05:26:13 GMT 2019

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

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

Back to the top