Ask a questionAsk a question
 

Answerwebservice that uses sharepoint object model

  • Saturday, November 07, 2009 8:36 PM.NET CONFUSED Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I need to create a webservice which uses the sharepoint api.
    Now with aspx you place this in the layouts directory so where do webservice goto in order to use the sharepoint api to query list items ?
    how do i publish this web service ?

Answers

  • Saturday, November 07, 2009 8:57 PMJevgeni Borozna Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    ASMX file to Layouts catalog More details here: http://blogs.msdn.com/jannemattila/archive/2007/09/26/adding-own-custom-web-service-to-sharepoint.aspx
  • Sunday, November 08, 2009 7:57 AMB. Bert Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Webservice files should be deployed to the ISAPI folder. See: http://jamestsai.net/Blog/post/Where-do-you-deploy-custom-SharePoint-web-service-files-to-%28asmx-discoaspx-and-wsdlaspx%29.aspx

    I use WSPBuilder to deploy my webservices (http://www.codeplex.com/wspbuilder)
    • Marked As Answer byCharlie WuModeratorFriday, November 13, 2009 9:55 AM
    • Proposed As Answer byB. Bert Sunday, November 08, 2009 7:57 AM
    •  
  • Sunday, November 08, 2009 9:47 AMSohel Rana Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Do you need this web service for all web applications of the SharePoint? If so then you can follow steps described the link: http://ranaictiu-technicalblog.blogspot.com/2009/11/sharepoint-create-custom-web-service.html .

    If you need to place the web service in a particular web application then you can place the web service in the root directory of your sharepoint web applicaiton (inetput\wwwroot\ss\virtualdirectories\....). And in this case the steps are:

    1. Copy the web service dll in GAC.
    2. Add the dll in safe controls in web.config.
    3. put the .asmx file in any folder in the the web application.
    4. Open the web application file in nodepad and remove the codebehind attribute and change the class attribute in the form "namespace.classname, namespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=zzzzzzzzzzz"


    Thanks
    Sohel Rana

    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

All Replies

  • Saturday, November 07, 2009 8:57 PMJevgeni Borozna Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    ASMX file to Layouts catalog More details here: http://blogs.msdn.com/jannemattila/archive/2007/09/26/adding-own-custom-web-service-to-sharepoint.aspx
  • Sunday, November 08, 2009 7:57 AMB. Bert Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Webservice files should be deployed to the ISAPI folder. See: http://jamestsai.net/Blog/post/Where-do-you-deploy-custom-SharePoint-web-service-files-to-%28asmx-discoaspx-and-wsdlaspx%29.aspx

    I use WSPBuilder to deploy my webservices (http://www.codeplex.com/wspbuilder)
    • Marked As Answer byCharlie WuModeratorFriday, November 13, 2009 9:55 AM
    • Proposed As Answer byB. Bert Sunday, November 08, 2009 7:57 AM
    •  
  • Sunday, November 08, 2009 9:47 AMSohel Rana Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Do you need this web service for all web applications of the SharePoint? If so then you can follow steps described the link: http://ranaictiu-technicalblog.blogspot.com/2009/11/sharepoint-create-custom-web-service.html .

    If you need to place the web service in a particular web application then you can place the web service in the root directory of your sharepoint web applicaiton (inetput\wwwroot\ss\virtualdirectories\....). And in this case the steps are:

    1. Copy the web service dll in GAC.
    2. Add the dll in safe controls in web.config.
    3. put the .asmx file in any folder in the the web application.
    4. Open the web application file in nodepad and remove the codebehind attribute and change the class attribute in the form "namespace.classname, namespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=zzzzzzzzzzz"


    Thanks
    Sohel Rana

    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com