1

I am working on an old project, not currently used, that I pulled from our source backups. I have experience as a Sharepoint user but this is the first time I have been developing for or installing/deploying it.

There is no documentation for this project, at all (infurating), and I am having great trouble working out where some of these files are supposed to be installed on my Sharepoint (WSS3) server.

So...

Research showed me you need:

.disco file (for automatic discovery)
.WSDL file (dynamic endpoint required to map virutal directory to service)
.ASMX file (the ASP webservice)

This guide explained that you should deploy to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI however it mentioned placing wsdisco.aspx & wswsdl.aspx into ISAPI. It doesn't mention where these files are supposed to come from? Should I be renaming the generated WSDL and DISCO files?

I did also read how these files are generated. Register service assembly in GAC & generate with Disco.exe. (I tried to do this myself for a test msdn guide but it errored out generating the files with HTML document does not contain Web service. Apparently I shouldn't need to create any more files to deploy this solution though.)

The files I have are... (some ommisions)

 -- SharepointWebService (website project) --

 -root-
 Service1.asmx
 Service.asmx.cs
 SharepointWebService.csproj
 //...etc
 > Web References
 >>UserProfileSharepointService
 >>> -ContactData.datasource
 >>> -GetUserProfileByIndexResult.datasource
 >>> -Reference.cs
 >>> -Reference.map
 >>> -userprofileservice.disco
 >>> -userprofileservice.wsdl
 >>> -vssver.scc

 >>WebsSharepointService
 >>> -CustomizedPageStatus.datasource
 >>> -Reference.cs
 >>> -Reference.map
 >>> -vssver.scc
 >>> -webs.disco
 >>> -Webs.wsdl

One thing that confuses me about this is that the SharepointWebservice appears to be referecing two other webservices. I was able to find out where they are supposed to be, the virtual directory anyway, by examining the properties.

WebsSharepointService http://moss2003/_vti_bin/Webs.asmx

UserProfileSharepointService http://moss2003/_vti_bin/Userporfileservice.asmx

However the program which utilises the webservice calls on Service1.asmx, which has no WSDL or DISCO files in the solution. I would really really like to know if I have to generate some for this myself, as in they are missing, or if the person who designed this intended something else.

Unfamiliar with this subject so I'd really appreicate some pointers, so I can understand how this is supposed to work. Any small alleviation of my confusion appreciated, thanks!

2 Answers 2

1

If you deploy your web service to the Layouts (_layouts) folder rather than ISAPI (_vti_bin) you don't have to worry about the creating the DISCO and WSDL files.

See Walkthrough: Creating a Custom ASP.NET (ASMX) Web Service in SharePoint 2010 for more information.

4
  • The article I reference in my question suggested that using the layouts folder could cause issues. "Since auto-generated disco and wsdl are unaware of the SharePoint service URL virtualization, results returned by web service become unreliable."
    – Amicable
    May 4, 2012 at 18:20
  • That hasn't been my experience. I've used this technique many times and not had issues. May 4, 2012 at 19:04
  • Ok, thank you Rob. I can't follow your tutorial as we don't have Sharepoint 2010 but will look into it.
    – Amicable
    May 8, 2012 at 8:37
  • @RobWindsor, sorry to brother, have you discovered anything about this alleged issue or is your suggestion still valid? I am currently evaluating which approach to follow to develop a custom web service and your walkthrough seems fittingly easy to follow.
    – SPArcheon
    Dec 12, 2012 at 14:54
1

The wsdisco.aspx and wswsdl.aspx are modified versions of the generated disco and wsdl files. You can use a tool like Sharepoint Discoverter to make the modifications for you.

webs.asmx and userprofileservice.asmx are standard SharePoint web services provided with the product.

Based on the naming of the references for the OOTB web services it seems as if the project was created for SharePoint 2003, so if you're going to use it against SharePoint 2010 it may not be perfect. Just a warning.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.