How can I make multiple client resources in xtext web editor using default Ace? - xtext

Stuck in where the server is saving the content of editor and how can I access or tweek it according to my use?
I want to have multiple clients hence multiple web editors and need to save the states and content of each client.

Related

Is 'Word as a Service' possible via MS Graph API?

I have found some, but not all, pieces of the puzzle.
Using Graph APIs, when a user selects a document in my own web application, I can:-
Create a new temporary folder in their OneDrive account
Upload my.docx file to this location
Get the url for my.docx
Open the URL in a new tab, loading Office 365's MSWord editor (or viewer and editor after one more click)
This is where it gets a bit trickier. How can I get the edited content back into the location where my web application historically stored these documents?
Theorising, I can:-
Create a webhook subscription to the new folder I create
Implement a webhook listener (and validation) service
When the listener receives an 'update' notice for the document:-
Call the download(content) API, or from the driveItem metadata, download it from #microsoft.graph.downloadUrl
Persist it to my desired location within my web application
To me this sounds like it'll suffer from big delays. The webhook subscriptions typically send batches of changes and the frequency looks uncertain. It certainly wouldn't be great for versioning every individual save operation during the editing session.
Have I missed some more obvious path to Word as a Service? i.e. another API or a mixture of APIs?
Alternatives I've considered but haven't yet scoped: implement WOPI or WebDav within my own web application.
It sounds like you're only using OneDrive to take advantage of its built-in support for the MS-WOPI protocol. WOPI is basically an enhanced WebDav interface that is used by Office to work with remote document (i.e. files stored on OneDrive, Box, DropBox, etc.).
Your solution is generally fine and it is certainly easy enough to orchestrate. You can absolutely use webhooks to subscribe to changes to the file. You'll likely want some mechanism in your app to notify your system when they're "done" so you can clean up the file afterwards.
If you want a more robust solution, you'll need to look at WOPI. Implementing WOPI would allow you to keep these files on your system permanently. Office Online would use the WOPI interface to speak with your storage system and open/save/edit files in-place.
Keep in mind that implementing WOPI (or any protocol for that matter) is often a non-trivial endeavor. You will also need to get your final solution validated and whitelisted by Office before it can be used. Details on this process and how to request access can be found at the Microsoft Cloud Storage Provider Program website.
Today OneNote and Excel are the only office "document clients" that have API's exposed via a REST API publicly available in the Microsoft Graph.
The only other "publicly available options" I'm aware of are:
WOPI APIs, that kind of act like a REST API but muche older
The office add-in model (hosted in a client) with the JavaScript API
The word object library (old, relying on dcoms and needs to have office installed and licensed on the machine)

Workday - How to programmatically get list of WSDLs in Workday

I am working on developing an integration with Workday. Under my initial analysis, I found that Workday provides multiple wsdls for different modules like "Human resource", "Inventory" etc. I can see this complete list at https://community.workday.com/sites/default/files/file-hosting/productionapi/operations/index.html
I am trying to understand how I get get this list progamatically in my integration so that my user can select one of the wsdls rather than typing in the full name of WSDL. Please share your thoughts on this.
You can programatically retrieve a list of all web service operations by creating a Custom Report based on the "Public Web Services" data source. The report can then be exposed as a RESTful WS for easy retrieval.
Some fields you can include in the report are: Web service, supported operations, api version, endpoint url, WSDL url, etc, etc.
This is highly customisable, in the sense that you can query the RESTful WS Report for specific versions, specific operations, etc, via Prompts / URL Params.
The report-as-a-service, supports also a variety of output formats as well as its own WSDL.
The purpose of a SOAP WSDL is to generate a client stub, i.e. a model that lets your client interact with objects exposed or consumed by the service provider. You don't interact with a WSDL at runtime - you interact with the stub. If you want to make multiple services available, you have to include each WSDL in your client application at compile time and generate their stubs. The services in a given API version do not change, so there isn't a reason to do this dynamically.
To add to the query asked, what we are trying to understand is that whether there an API call/request which we could hit to get the list of web services available to populate it on the UI to select from it.
For Example: In this link, https://community.workday.com/sites/default/files/file-hosting/productionapi/index.html, we have Absence_Management, Academic_Advising, Academic_Foundation and so on and Now, if I want it to be displayed to the end user so that He can select the webservice to be used and accordingly we could download the WSDL as to work on it.

How to create forms in dart?

What is the best way to create forms (textfields, checkboxes, radio buttons, ...) and handle the data after the user's input?
Just use web components as dart's web ui?
http://www.dartlang.org/articles/web-ui/
http://www.dartlang.org/docs/tutorials/web-ui/
edit: Lets imagine the following example application: I would like to create an online quiz/test.
First the user has to register
Data will be stored in a textfile or in a database
User can log in and play an online quiz or do an online test.
For that quiz/test i need to evaluate the input with the predefined correct answers
Here's a high-level answer to your question.
To handle data on the server side you can use the HttpServer class to start a web server. See this article.
To store data in a flat file you'll need to use the dart:io package to open a file and write to it. See the documentation for File.openWrite().
To store data in a database there are packages available on pub for mysql and postgresql.
There are two different ways to implement the client side. The traditional way is to use templating to generate html with the data in input elements within a form tag, and then handle the form submission in your webserver.
The modern way, that is the focus within the Dart community, is to write a single page app, which uses HttpRequest to read data from and send data to the server (usually using json).
On the client side, you could retrieve data from server (e.g. as JSON) and use that to build a form. This seems like a good fit for a web component as elements can be dynamically added based on received data.
The component would be bound to the model so you can serialize the model object to JSON on submit and send it to server on submit or just send it as standard HTML form.
The server side of the story is less clear, there are no production quality web server libraries that I am aware of, but you could take a look at DartExpress as an example, or Stream, and there are others, more or less complete. Anyway, you would have to extract the POST payload from HttpRequest (if sent as JSON) or use the form data which is also accessible via queryParameters property - please note that this is Dart:io.HttpRequest class, not Dart:html.HttpRequest, and it is available only on server side.
The mentioned server frameworks simplify this part a bit.
Using Web-UI would be a good choice. The todomvc application illustrates nicely how to dynamically capture the input from a user. Processing on the server side is wide open as far as choices go. Dart does have server side capabilities, and you could use some of the existing libraries to accomplish what you want.
Another way that you can process the information server side is to comunicate with the DB directly using a REST based web service like CouchDB. Cloudant offers such a service and allows you to communicate directly to the DB from the client, providing you can overcome the Same-Origin-Policy. There are 2 ways to do this. Enable CORS on the CouchDB instance, or host your application on the server that has the DB, which is also possible with CouchDB.
Dart serverside also supports websockets, so you can easily deliver the user provided data to the server with web sockets, and then do whatever processing you like on the serverside.
One other option I can think of would be to have the information processed and saved in the local browser. You can access the local DB or local browser file system from the Dart client, and keep everything local. For statistics, you can have the client update a web service of your choice.

how to create a web service

I building a website with Ruby on Rails framework.
The site will contain a flash application that will interact with the rails application using web service.
My partner builds the flash application and he told me that the flash application interacts through WSDL file.
I am new to web services. I would like to know how to create the WSDL file, and how to make the interaction between the rails application and the WSDL file.
If you believe that there are better alternatives than SOAP/WDSL, I would like to hear them too.
Thanks,
Oded
Have you Googled how to build web services in Ruby? Here are a few links that come up, all addressing exactly what you want to do:
http://www.tutorialspoint.com/ruby/ruby_web_services.htm
http://www.ibm.com/developerworks/opensource/library/os-ws-rubyrails/index.html
http://searchsoa.techtarget.com/tip/Web-services-with-Ruby-on-Rails
How about you take a look at some of those links, and come back to us if you have further questions.
I do have one elaboration:
My partner builds the flash
application and he told me that the
flash application interacts through
WSDL file.
It sounds like your partner has an incomplete understanding of how Flash can access remote data services. Using a SOAP Web Service with a WSDL is one method, for sure, and here is some documentation on that.
A Flex / Flash application can also make standard HTTP calls, sometimes called REST Web Services. In many cases, REST Web Services will return an XML Document, but that is not required. Any data, including simple text data, can be returned from a REST Web Service.
What many people prefer to do is to use an AMF Gateway with RemoteObject. AMF is a binary format so you'll get much smaller file size transferred back and forth than the alternatives. It also provides for automatic object translation between your server side objects and client side objects. This can be a time saver in development because you don't have to parse data to turn it into something Flex can use easily. RubyAMF is one Ruby implementation of AMF.
You'll be going through more pain than you need to by using WSDL.
Instead, I recommend creating a REST interface that returns json (or xml) -- you'll find in rails it will just work.
So you'll have things like:
/books # returns a list of books. Also do Searching here
/books/1 # return the detail of a book with ID of 1
Search for "REST Rails" and you'll get examples of controllers that will return JSON and XML depending on what the client requests.

In SharePoint, graphically display data from a web service

[SharePoint/MOSS 2007]
I want to access several web services (on external sites, with WSDL descriptors), and graphically display the data, using a separate web part to display each item.
The graph for each is quite simple - just a thermometer, or traffic lights (as in KPI).
I want to be able to access more detail about the data with a web click
What are the basic sharepoint components for this?
I am able to program a web part, if necessary.
(background - I've been looking through KPI, PerformancePoint, Data Connection Libraries, InfoPath, Business Data catalogs, etc. I just need a someone to tell me which are the right components for further investigation).
I think you should solve this without considering SharePoint, i.e. you should create Web Services proxies (add Service reference) in order to access the external Web Service and then create the necessary HTML to represent the result.
One this is working, you can wrap it in a Web part.
You could use the Business Data Catalog to access the Web Service, but it is really hard to use and then you'd still need some way to transform the data in order to get the graphical display. KPIs are useful if you have lists with the required information, not for external data from a Web Service. I don't see InfoPath or PerformancePoint playing any role in this case.

Resources