I am trying to create an Office Add-In whose functionality is similar to one of the samples for PowerPoint: enter link description here.
---------- -----------
| Add-In | =======================> | Service |
---------- -----------
Service in the add-in
The main difference with the tutorial is that I want to reverse the approach: I want to expose a service endpoint inside the add-in and call it from some other application (it would be an HTTP binding reachable over TCP-IP).
-------------------------- -----------
| Add-In || Service:port | <======= | Process |
-------------------------- -----------
Is this possible?
Alternatives
I searched a bit, but it seems like the API are not including components to define services. This kinda seems reasonable as a whole hosting environment would be needed.
However, we are talking about Javascript API, so I was hoping that maybe WebSockets could be used. My point here is to be able to contact the add-in from outside avoiding the add-in to poll for messages to a whatever service endpoint.
What options do I have to achieve this?
Client side JavaScript can't host a service.
Your server side code can do whatever you want, and you can definitely use WebSockets to communicate with the add in.
Related
How can I add WebService to existing project in Delphi XE3? I would like to add SOAP support and next generate WDSL document.
Normally from empty project I choose:
Menu | New | Other | WebService | SOAP Server Application -> Stand-alone VCL Application
This are two projects: one to implement the WebService and another to consume it. When you have implemented the SOAP service (you can do with other platforms, like asmx or WCF webservices), create the current project to consume, go to File --> New --> Other --> Webservices --> WSDL importer, and put the url where webservice are published, Delphi will create the interfaces to "talk" with the webservice.
It could be an option to create a new, empty project with the desired settings and merge the two projects manually with a suitable comparison tool, then throw away the second project. Maybe not a neat solution from the books, but it works well for me.
We're about to start a new project and I've been looking at some of the new web technologies. We want to build a RESTful api which a client can access. To date we've been using python with django/flask to build the api and using jquery for the front end.
I've read quite a bit on javascript frameworks such as emberjs and angular, as well as nodejs solutions like express, meteor and derby. I really like the idea that a site should 'auto update' when the model changes.I'm aware that there are some libraries like gevent which can help facilitate socket level communication, but it seems to be more of a patch than an elegant solution.
Ideally, I don't want to give up a proven technology, ie writing server code in python (or php,ruby whatever) for building my whole app on nodejs. Having a RESTful API is important since we want our services to be open and accessible.
Would it be a bad idea to have 2 servers and 1 client? 1 traditional api server communicating with a javascript framework on the client. Then also run a nodejs server alongside the api server which can somehow talk to the api and if it finds updates, passes it along to the client.
We want to build a RESTful api which a client can access.
Ideally, I don't want to give up a proven technology, ie writing server code in python (or php,ruby whatever) for building my whole app on nodejs.
Then you should probably go with Rails and Ember.js. I'll quote eviltrout (co-founder of discourse) which is build on ember and rails:
One amazing side effect of a rich client side app is you end up with a battle tested API. Our app has consumed our own API since day one, so we know it works.
If we want to create a native client for Android or iOS, it would be a lot easier because we already speak JSON fluently. If people want to build services that use Discourse, they won’t have to result to screen scraping. It’s a huge win for us and the developers that use our platform. 1
However you should keep in mind that ember is as of to date still a very young framework (rc3 v1.0.0).
I don't know what sort of application you are building (in respect to why you would want to use node) How to decide when to use Node.js?
Hi my question is this: I want to add a push notification to my WP7 application, and have read the A Really Long Post About the Windows Phone 7 Push Notification System explination. Now this is pretty to-the-point stuff, except for this little part, where the line
var svc = new NotificationService.NotificationServiceClient();
is added. I think that this is just a reference to the web application of the developer. Is that correct, is this indeed a reference to the web application? And if so, how to implement that in the VS express for WP7, if indeed possible
I have already created a web application, but this is in the VS Web Development Express IDE, and working in the VS Express for WP7 IDE, want to add a reference to this web application.
Thanks in advance!
It looks like in the blog post the code you listed is intended to be called from an application other than the one on the phone. There are other ways of sending a tile update from within the phone.
Clarification after comments...
In the majority of cases, sending notifications to the device is handled by server-side or desktop application code and not from the device itself. If you have a service which is sending out notifications to the devices with the app installed, then you should ideally follow the patterns laid out by MS themselves. In short, the steps are as follows.
1) The phone app registers itself with the MPNS (Microsft Push Notification Service) servers.
2) The phone app receives a unique URL to which notifications are sent.
3) The phone app sends this url to your service by whatever means are best for the app (usually a call to a WCF service) *
4) Your service calls the MPNS service to send the notification to the phone
5) The phone app receives the message and acts upon it as appropriate.
The bit you are probably thinking about is the highlighted step (3). This is usually the only call out to an external source that you need to code manually in the notification scenario (registering with MPNS is handled by internal classes).
Given that this is the bit that you need to put most thought into, and that your question is about adding a reference to a web application there may be a bit of confusion here. The two ways I have seen this data get passed around are
1) Call a WCF service (which may b hosted in a web application, and can be added with "Add Service Reference in VS), or
2) Posting data directly to a web page that deals with the posted data and stores it for later us.
In either case, you won't need to "add a reference" to a web app. 1) means adding a service reference in VS, which I believe you can do in the free dev environment, and 2) involves hand crafting an HttpWebRequest to post the data.
I'm trying to interact with the Siebel Communications activex web application.We have an existing web app that needs to interact with elemets in the siebel activex's
Trying to add the Siebel app in an iframe is not effective,I can't script that iframe,it's on a different doamain.
The approach I'm considering :
Wrtitng another activex with a web browser control to load the siebel app.
Any idea's?
There is a COM interface to support client-side integration with Siebel. In order to use it, the EnableWebClientAutomation parameter needs to be set to TRUE in the application configuration file. Setting that parameter makes sure the Siebel desktop integration object (ActiveX control) gets downloaded to your client machines.
[SWE]
EnableWebClientAutomation = TRUE
I don't have any experience in doing this type of integration, and there's not a whole lot of info in Siebel Bookshelf about it, but I'm pretty sure this is how Mercury LoadRunner integrates with Siebel for automated load testing.
I hope this helps.
I'm not sure that you can interact with the Active X control directly - you probably have to go direct to the Siebel application via a Siebel Business Server, and control the action from there.
The standard way to interact with Siebel from a desktop application is through the Siebel web client automation server - lots more info here: http://download.oracle.com/docs/cd/B31104_02/books/OIRef/OIRefProgramming21.html#wp1004834
B
Active X is a dead component after IE 8.0. I would not suggest this. Elements of ActiveX is not open to public. these are stored under Siebsrvr\webtempl folder. these basically provides option to use HighInteractive Client. after OpenUI has come, these are obsolete to be used
OK, this is impossible, but I will try to explain the situation here.
Let's say we have cases, that we need a fast setup of a web server in order to have a simple soap web service running (querying a db and so on).
In VS though, upon debugging a web project, it creates a quick ASP.NET development server without relying on the actuall IIS that might be installed on the PC.
Is there any project that does something like that?
This would be ideal for small projects, where a simple executable would get a server ready to go and would allow web services to be executed right away.
I have looked at some stuff over the net like http://msdn.microsoft.com/en-us/magazine/cc163879.aspx and http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2004/05/24/4479.aspx but they seem to be quite outdated and i am not sure how well they work (havent tested them thoroughly)
EDIT: I have build an application like the one you suggest. However, how can i implement HTTP GET/POST requests to the service using this method? I tried using WebGet after my operationcontract but it didnt work. For example, my service is at http://localhost:8080/Service and i would like to use it such as http://localhost:8080/Service/getMethod?x=2.
I believe that the development server used by Visual Studio is based off of the Cassini code base (of which there is a fork here). I also found this article on hosting the asp.net runtime. It was also created a while back (2004), but has been updated since (2008). I think a lot of the core concepts are probably still the same.
Another approach would be a roll-your-own web server using the HttpListener class. This could take some work if you want to use it for hosting asmx type services, but if you were doing RESTful services, it isn't too bad of an option (this is actually how RavenDB works if you are not hosting it under IIS).
A WCF service can be hosted in almost any kind of application, including a Windows Service or a console application. There is no need for a web server at all.
Alright,
i've done it so im posting it here to help anyone who has issues with similar problems.
Create your WCF Service file as usual and then by using ServiceHost (or WebServiceHost) you can easily create a WCF service.
In order to use GET http requests to make it simple to communicate with mobile devices (such as iphone) you can use WebGet above your service methods and make sure you manually add a service endpoint using WebHttpBinding for WebServiceHost or WebHttpBinding with an WebHttpBehavior for ServiceHost.
Then you can call your service methods such as http://localhost:port/webhttpendpointaddress/mymethod?x=2.