Hosting existing web services in sharepoint 2010 - web-services

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

Related

authentication through web service SonarQube

I'm working on a web application that highly requires SonarQube (version 5.3) Web Services.
I want to authenticate to the sonarqube instance using my application.
which web service should I use?
Another question :
While using the issues web service I noticed that the web service returns the issues of the last project analysed by sonar.
Is there a way to have the issues of all the projects or to have the issues of a given project?

Create a web service that is hosted on IIS 6.0 and Asp.net 2.0

I need to create a web service that will be hosted by a website running IIS 6.0 and Asp.net 2.0. I have never created a web service before now. I have Visual Studio 2008.
What options do I have for creating the service.
Can I create the service using WCF and still have it hosted on Asp.net 2.0?
Do I have to specify any specific properties when I build it so that the service will run on 2.0?
Or must I use ASMX to build the web service?
I have tried building a service in VS2008 both as ASMX and WCF but I am unable to Add Web Reference to either type of service from VS2008 when I am testing how to consume it. I'm certain my lack of experience with Web Services is a big factor, but the more I read, the more uncertain I am of what technology I can use to create this IIS 6.0, Asp.net 2.0 hosted service.
WCF was introduced in .NET 3.5, so you need to use the legacy ASMX technology. Create an ASMX service, and use "Add Web Reference" to consume it. The first time you try that, you'll need to use "Add Service Reference", and then to click the "Advanced" button and then the "Add Web Reference" button. After that, "Add Web Reference" will be available as a command.

Web Service on Netbeans

I have created a Web Service in Net Beans 6.9 and deploy it locally. And I am using it via a java SE application by adding Web Service client in this application. How to obtain the link of the Web Serice so that it can be used from anywhere ?
2) From where to obtain WSDL file of Web Service ?
3) How to host a Web Service on the internet ?
Thank a ton in advance..!!!
You could create a new project of type web application in Netbeans.
In the web application, you will then create a web service (NOT a web service client).
For publishing and testing the web application, you will have to deploy it to a web server (e.g. GlassFish).
After publishing the web application, the WSDL file will be typically located at: http://localhost:<port>/<your web app>/<your service>?wsdl
For GlassFish, the default port is 8080.
If your current Netbeans installation doesn't support web projects or you don't have GlassFish installed, I suggest you download and install the latest version of Netbeans with Java EE support (bundled Apache Tomcat and GlassFish server in the same setup).
http://netbeans.org/downloads/index.html
Hosting SOAP web services on the internet at large has not been terribly successful. For example Google had SOAP based web services initially, and they switched to REST based services in the end. You may want to reconsider and deploy a REST based interface. If the bulk of your code is not embedded in the web service, then you should not have that difficult of a time switching the interface.
To deploy a SOAP or a REST web service, you would need to deploy a 'full' Java EE container (e.g. Glassfissh or JBoss) on a machine with access to the internet. You might virtual hosting e.g. Westhost, Amazon, or there are turnkey solutions like Heroku (note: I'm not endorsing any of the companies listed here; they're just examples). If you just want to deploy a REST based service, any web container will do e.g. Tomcat or Jetty. In addition to services mentioned above you could probably host a rest web service on any service that will let you upload a war file.

SharePoint 2010 Web Part expose web service?

Is it possible for a SharePoint 2010 Web Part to expose a web service (WCF?)?
I want a Web Part to send emails if a certain condition is met. The web part should be hit every 15 mins via a call initiated from a custom in-house scheduler.
Cheers
A web part is just a visual component. It can expose a web service. However, custom web services can be created and deployed to SharePoint where you can access data from a site (a list maybe) and add custom logic to send the email.
Here's a good guide on how to deploy web services to SharePoint.

Creating Web Services in VS 2005

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.