Accessing Sharepoint lists from a Standalone Application - web-services

I have a Standalone application, which needs to access a Sharepoint list. I bumped into a few articles, mentioning Web Service is the way to go about it.
But I am unable to find a step by step path to write a web service to fetch list from sharepoint. In addition to this, the application can take a WSDL file as an input.
Please let me know how to proceed about this scenario.

If you are using SharePoint 2007, then web services is the only way to do this. Here is a list of the different web services available.
If you are using SharePoint 2010 you can use the client object model.

You can simply use the SharePoint webservice Lists.asmx (both in SharePoint 2007 and 2010)
In your application, add a web reference 'http://(sharepoint-url)/_vti_bin/lists.asmx'
Once done, you can use the method GetList.
For more information, http://msdn.microsoft.com/en-us/library/lists.lists.getlist(v=office.12).aspx#Y82

Related

How to write a custom web form in Dynamics CRM 2013

I have a requirement of a custom grid in Microsoft Dynamics CRM 2013. From a SharePoint perspective, it would have been a web part. But in CRM 2013, I don't see a similar concept. I need the custom grid to be displayed in a pane for an Entity in CRM? How could that be implemented if possible? Any ideas?
Your question is to broad, but i think what you mean is how to make a custom web page in CRM.
In Dynamics CRM 2013, you cannot add a custom aspx page, as part of a CRM,
you can only put custom Silverlight and HTML/Javascript powered web pages, the latter being the preferred way, of creating these.
However if you need to create a custom web application, you can create it as a separate web application in a separate IIS website, use the CRM web services to access data, and then embed this web application in an iframe on an entity form in CRM.
In order to connect to the crm web service, from custom apps you can use early or late binding.
Early binding sample code
Late binding sample code
Personally i use late binding as connection is easier and it seems to have better performance. The simplest way to obtain a connection to the CRM service for CRUD operations is the following code:
string connString = "Url={DynamicsCRMUrl}; Username=username; Password=password; DeviceID=AnyDeviceId; DevicePassword=AnyDevicePasscode";
CrmConnection crm = CrmConnection.Parse(connString);
IOrganizationService service = (IOrganizationService)new OrganizationService(crm);
For crm online and IFD configured CRM you must add the DeviceID and DevicePassword, for on premise it is not necessary.
Make sure you have the CRM 2013 SDK for the required assemblies.
I am answering the question with a long shot, with assumptions, as i am not sure if this is what you require, but i hope it gives you guidance.
You can add an HTML WebResource in CRM that contains the grid to be displayed.
Depending on what you want to display on the grid, the data could be populated using the Dynamics CRM SDK REST API. (see SDK.REST.js).
Once you have set-up your HTML web resource, you can then include it in your entity form as an iframe component (similar to a SharePoint web part).
This approach means you don't need to host the grid in a separate website, but can include it as part of your CRM solution.

Discover SharePoint 2013 webservices

I'm struggling to access to some data hosted on a website.
I know this website was developed using Sharepoint 2013 (by someone else, and I don't have any contact with them).
I have the right credentials to the site, and via browser I can navigate and obtain the data I need (some electric measurements).
I need a way to obtain the data using a webservice.
Is there a way to discover all the webservices implemented on the site? And to gain access to those data?
I browsed the lists on _api/Web/Lists but due to my lack of knowledge I didn't find anything useful.
Thank you all!
Best way to start you discovery of default SharePoint web services is from here
There are at least 3 default services that you could use to get more information from different lists and webs:
/_api/site
/_api/web
/_api/web/lists/getbytitle('listname')/items
Unfortunately I don't think there is a way to discover all web services there are on your particular site

Is it possible to make a call out to a remote server from within a SharePoint 2013 app?

I am very new to SharePoint development as well as SharePoint overall, so I apologize if this question seems like a no-brainer. I'm currently working on a SharePoint 2013 app and I'm wondering if it's possible to make a call out to some URL from within the SharePoint environment. Basically, I want to do this within an event receiver after some action is done to a list, and from there I want to make a call to some web service on my server to update my system. Using the REST API to poll the SharePoint server isn't a good option for this scenario since it won't scale very well.
When dealing with SharePoint 2013 apps you can access any resource using standardized APIs. In addition to REST SharePoint is offering the JS Client Object Model (CSOM).
In order to access data from another web than the current one, your app needs the permission to interact with the entire tenant.
If you're trying to query data from another host, you have to use JSONP because of the same origin policy.
if you are building an app using the "new App Model" for wiring up Remote Event Receivers it is possible to do anything, in which your app hosting framework/environment allows you to. If you are building a Classic App (Farm Solutions) you'll have access to perform operations which are allowable from the SharePoint servers directly...typically this is a lot as GAC deployed assemblies are granted full trust.
depending on what you are trying to do and what kind of resources you app will consume. I'd consider moving the dependancies away from SharePoint and building using the new App Model versus the older farm solutions. As you sound like you are starting in SharePoint, this gives you an opportunity to learn the new ways of doing development for SharePoint.
Lastly, you might consider building a workflow. Not sure what kind of app you are building but the new workflow capabilities include actions which can make RESTful calls. Potentially making your application a "no code" solution. Again it all really depends.

Microsoft Dynamics CRM -- Do people build websites with it?

Forgive my ignorance, but do people build websites with Microsoft Dynamics CRM?
I have a potential client who says that is the technology they will use for a new web project, for which I would be doing the HTML templating. I want to learn all I can as I am new to this particular system, but I can't seem to find anything related to web building and CRM. Is it more likely the client is using another piece of technology that they are neglecting to tell us about?
Any experience or insight about this process is greatly appreciated!
You can't build website using MSCRM, but you can build ASP.Net website using CRM content easily. The API provided by MSCRM is a set of web services, that can be queried in a website to populate pages content.
Also, you can directly query the Database if you want ReadOnly content, and only for read-only content, because it is not supported to update/create data using SQL connections.
Note that it's required to have the external connector license to use any data in the CRM, thru the API and even thru direct SQL queries.
I have built a website using .NET, utilising the CRM4 API and database. All the website did was to submit queries to CRM using the CRM web services and metadata web services, and get data back. This company was already using CRM for their back end, so it's much easier for the front end to use the same database as well since it's a simple one.
The alternative would be to create an intermediate connector between the 2 systems -- backend and front end, which is not as efficient (for our case anyway).

Using a Web Service to access data outside MOSS using AD for authentication

So here is the scenario:
I have a MOSS 2007 box and I want my clients to be able to access a SharePoint site via the internet. I am told that I will be using an IPA and AD for authentication. However I have a DB outside of SharePoint that holds various business data and I want to use Web Services to access the data, manipulate it, and send it back to SharePoint via web parts.
The issue is that, from what I understand, I am going to have to authenticate the AD user every time a request to the Web Service happens. Obviously I dont want to do this every time because they have already authenticated to get onto the site, however I do want each call to have some form of security so its not open calls to my db. I do plan on having other applications access this service outside of SharePoint, so I dont want to have to reinstall the service for each application or even again.
Has anyone had to perform this task or something similar or do you have any suggestions on how to do this?
Thank you in advance and happy coding!
Why not just deploy the webservice to Sharepoint using a Sharepoint solution and a Feature.
That way it will be running under the sharepoint app pool and all authentication is done by sp.
Edit:
Seeing that SharePoint should not be in "control" (as stated in the comment), you should create the webservice, and run the application it's under in as using Windows Authentication. IMHO you should create a WCF Service. The, using the information found in this article you make the Service authenticate users against the AD usergroups they are in. see the "Security: Authentication" section of the article.
Then in Visual Studio you create a webpart and add a service reference to the project, pointing to your newly created Service. Have the webpart perform the needed logic (i.e. display data etc.)
Deploy the webpart to SharePoint using a SharePoint solution (.wsp files, created with WSPBuilder). Google for SharePoint + wspbuilder + tutorials. The solution should contain 1 feature to deploy the webpart. WSPBuilder integrates with VS and allows for the creation of WSPBuilde project. add a webpart feature item to the project (it will create the xml (deployment related) and code file for the webpart.