Creating Web Services in VS 2005 - web-services

Why is that Web Service files (.asmx) have their code-behind placed in app_code folder by default unlike the regular .aspx files?

Generally asmx files are more like proxies for business objects and business objects don't belong to Web Site projects. Web service classes should be placed in a different project dedicated in business logic and not in presentation. aspx and aspx.cs on the other hand are complementary files correctly placed inside a web site project as their job is to present the data.

When you work with Web site projects, this is the style Visual Studio uses. It's not the case with Web application projects.

Related

Using specific web service

I'm trying to use a web service hosted in a government server in mexico. i have followed many tutorials but can't get it to work and i think its more complex than i thought.
The service is this one:
https://www.ventanillaunica.gob.mx/ventanilla-ws-pedimentos/ConsultarPedimentoCompletoService?wsdl
What i do is add it as a web reference on visual studio and then it shows me many clases and a delegate but no methods to use.

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.

Automatically create test page for RESTful webservice

I have a bunch of RESTful JSON webservices created with Spring WebMVC and I wonder if there's any library or framework that could automatically generate web pages with forms to call these services and test them.
I know some application servers have web control panels that dynamically generate this kind of form when you deploy webservices to them, but I'm trying to find an open source solution that could be embedded in my web app and deployed a simple Tomcat or Jetty server.

SharePoint Web Parts and SharePoint Web Services

I am looking at SharePoint web services and would like to know the best way to work with web parts. I have figured out most of the other stuff we will need but the functionality around web parts and the SharePoint Web Services seems complicated. So how do I
Retrieive a particular web part with HTML content? Is this possible?
Find out what web parts are on what pages?
I know that I can get the rendered html for an entire page through web services (although why that is exactly useful when you can retrieve the web page directly I'm not sure.) but would like to know if it is possible to embed web parts in external web sites through SharePoint Web Services.
"Web parts" are a means of "programming" Sharepoint. They are to Sharepoint much like "controls" are to Visual Basic, or "views" are to Android.
They're a creature of Sharepoint - I can't imagine you'd use them on an Apache server on a Linux host, for example.
Sharepoint web services, however, are intended to be a good way for Sharepoint to communicate with non-Microsoft technologies (like Java, for example).
If your "application" involves a heterogeneous mix of web servers and platforms, then Web Services is probably the way to go.
If your "application" resides exclusively on the Sharepoint server, and your "clients" just browse to it (preferably, browse to it with IE), then web parts might be a good choice.

Hosting existing web services in sharepoint 2010

I have a set of web services coded. Need to create an application combining some of share point 2010 features plus functionalities of my services. I was thinking of deploying the services as a part of the sharepoint application (in a virtual directory) i'm building [Not hosting as a separate application elsewhere since I do not want the service calls(script calls) to end up cross-domain]
Is this the right approach. If yes, what needs to be ensured while making my services a part of a sharepoint application using a virtual directory
You can use the SPDev tool to generate the SharePoint web service disco.aspx and wsdl.aspx files:
SPDev.exe -o GenWS -url http://Central-Administration-URL -asmx CustomWS.asmx
Then deploy all needed assemblies to GAC and copy the .asmx, disco.aspx, wsdl.aspx files to the 14 hive\ISAPI folder.
I don't think you can have path other than _vti_bin (or _vti_adm if deployed the service to the 14 hive\ADMISAPI folder), but you can deploy the web services to a subfolder and use URL like http://Site/_vti_bin/CustomDotNetWebServices/CustomWS.asmx.
SharePoint 2010 supports custom services - both ASP.NET and WCF ones:
Walkthrough: Creating a Custom ASP.NET Web Service
Creating a Custom WCF Service in SharePoint Foundation