Xtext Web: 'The parameter \'serviceType\' is required.' [message #1805221] |
Wed, 10 April 2019 03:23  |
Eclipse User |
|
|
|
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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03538 seconds