I read couple of articles about creating custom WCF services for SharePoint 2010 and each suggests creating it under SharePoint project (as oppose to creating a separate WCF Application project or WCF Library). Also, I came across SharePoint WCF best practices.
So my question: is it possible to create a standalone WCF Service and have an option to deploy it inside of SharePoint (let's say I don't want this service to be a part of my wsp)? And what is the best practice?
thanks.
It has to be part of your wsp file if you are going to deploy it in a SharePoint web app. You can create a stand alone wcf service that can connect to a SharePoint site collection and you can also use the SharePoint Client Object Model to remotely connect to a SharePoint site collection. There are numerous walkthroughs on how to do this.
Here is a good starting point for the Client Object Model http://msdn.microsoft.com/en-us/library/ee537247.aspx
Related
I don't have any code yet as I don't know where to start! I see on the web that I'd need to select
on the Access toolbar external data >> more >> data services. Then it asks to point to a xml config file. Which I don't have and would need to create. I have the connection string from a VB.net application.
sWIPConnString As String = "SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=fake3465-vip.ent.agt.bb.ca)(PORT=41521))(CONNECT_DATA=(SERVICE_NAME=fictitious_service_name)));uid=APP_getinfo;pwd=thispassword;"
I'd have to convert that to an xml version. Any help would be appreciated!
Thank in advance
Pete
But those data services are not just any old plane jane web site. They are web sites that have installed, setup, and the developers of those web sites setup that data service connection. And these custom connections are NOT general web sites, and they are not general web services that many sites have. And they are not a web API written around say SOAP or some REST standard.
So unless that web site decided to adopt this Microsoft specific means and method to expose data, then you not be able to use this feature to simple connect to any old web site out of the blue. If you have a existing web site that exposes some web services? Then you have to use MSXML and consume that web data yourself. That option in Access is not some general purpose setting or feature that allows connection to any old web site - only ones that have created that web service written to the business connection options that Microsoft created.
It not clear if you planning to create some web services on the target web site (that would assume you're the developer of that web site), or you trying to consume existing web services that the given site exposes. Even in this 2nd case, those exposed web services or even REST calls has ZERO to do with the feature in Access.
so that feature is of only use for connecting to web sites that offer specific created connection based on that standard from Microsoft - it not a general web service consuming feature built into access and you can't use that feature as such.
How to make a web service call from Access? Well, it has ZERO to do with that feature. Here is a MSXML exmaple:
How to use XML web services in Access2007 which are built on Visual studio (2008/2010)
I'd like to create a document in SharePoint 2013 using a call to a WCF (or any other web service) from my console application.
I've been told that WCF access is deprecated in SP13 and will be removed in future versions. Instead, CSOM is to be used (whatever that is).
My question is about the recommended approach. Is it smart to build a solution based on WCF connection (which I know very well how to do) or should I start reading up on the other approach?
CSOM stands for Client-side Object Model. It comes in three flavors; .NET. JavaScript, and Silverlight. Using CSOM abstracts some of the plumbing that you have to do when using WCF directly but ultimately, CSOM talks to a WCF service called client.svc.
If you know WCF already, you can make RESTful calls using OData to that service from your app.
Here's more info about the different API's, http://msdn.microsoft.com/en-us/library/jj164060.aspx.
Here's more info about REST access: http://msdn.microsoft.com/en-us/library/jj164022.aspx.
I'm working in a project like this : http://msmvps.com/blogs/theproblemsolver/archive/2009/12/23/rehosting-the-workflow-designer-in-wf4.aspx
Is it possible to upload this app in a sharepoint and executed it in sharepoint??
As far as I know SharePoint is still using the WF3 runtime and not the WF4 runtime. So no this won't work.
you will have to create a separate Webservice Application (with the WF) in .net 4 and then from SharePoint you call the webservice. From WF you can in turn integrate with Sharepoint through the Managed client object model.
Refer to this link for more information on the client model:
http://msdn.microsoft.com/en-us/library/ee857094.aspx
Base:
I have created a ASP.NET web part to be deployed to a Sharepoint 2010 site. This web part is using a external web service, a WCF service that is hosted else where, not on the same machine as the Sharepoint site. The web parts are installed on the sharepoint server using a CAB-file that is created via a deploy project.
Issue:
My issue is that I have web service binding configurations in the web.config of my ASP.NET web part solution that I need to modify based on what customer is using it, so I need to be able to modify my binding address after installation (or during).
Other:
I have seen solutions using the SPWebConfigModification, but I have no local installation of Sharepoint so that is not an option. I have also seen pure C# solution where the endpoint address is hard coded in the assembly, but this will prevent me from modifying the address after compilation of the web part. The best way would be to have an external txt/xml-file that I can use from my web part to get the endpoint address from, or a smart way of updating the sharepoint web.config not using SPWebConfigModification.
so...
any one have a awesome solution to my issue?
Can you use custom webpart properties that will contain the WCF endpoint information? This way you will be able to configure your webpart(s) after they are added to a page. The properties are reachable from the webpart code so you can generate the wcf proxy in the runtime with no custom config files in the solution.
this article might help you with the custom properties http://www.lamber.info/post/2010/05/21/How-do-I-create-custom-properties-in-Visual-Web-Parts.aspx
Editing web.config is almost always the wrong place to put something like this.
Maks answer is good and certainly the easiest option, if you want to store the address of the web service in one place to be used by multiple web part instances then this option may be better.
SO - What is a proper way to store site-level global variables in a SharePoint site?
I can read the SP lists fine and pull data out of the SP context, but I am trying to get data from an external database as well and I don't know exactly how to do that. Is is possible to add WCF communication to the webpart that will allow the Silverlight app to communicate to a WCF service? If so, any examples on how to do this?
Or is there a better way to store/retrieve custom data that I don't want to be accessable through custom sp lists?
You could use a combination of BCS/External Content Types to surface the data in SharePoint, then the SharePoint client object model to access this.
Eric,
I am not sure if i have understood your question correctly. If you have a custom webpart that loads some silverlight content and silverlight needs to access external data using wcf, then you can do the following:
If you need to deploy your wcf service in sharepoint site, then follow this article from Sahil Malik: http://blah.winsmarts.com/2008-5-SharePoint_as_a_WCF_Host.aspx
Once the service is deployed and your able to access it from ie, Add service reference in your silverlight project.
Load the silverlight application in your webpart
This link might also help:
http://blah.winsmarts.com/2008-7-SilverLight_WCF_References_in_SharePoint_-_The_right_way.aspx