Everything SharePoint and XAML

My continuous learning of SharePoint, XAML, Silverlight, Windows Phone 7, Windows 8, Office, VSTO, C#…

Error Referencing SlideLibrary.asmx

Posted by Steve Pietrek on January 14, 2009

I am putting together a quick prototype where I want to have slide library integration in PowerPoint. I understand there is already PowerPoint integration in PowerPoint 2007 for slide libraries; however, it requires a higher version of PowerPoint (Enterprise and Ultimate) and the OOTB functionality does not meet my needs. Doing research yesterday, there is little information on the slide library web service (/_vti_bin/SlideLibrary.asmx). This link contains some good information on how the PowerPoint team is accessing SharePoint using the slide library web service (see image below). I have worked with a few of the SharePoint web services but never the Slide Library one. I did run into one issue when adding the reference which I wanted to document in this post.

SharePoint 2007/PowerPoint 2007

SharePoint 2007/PowerPoint 2007

Below are the steps I followed for creating a test console project.

  1. Open Visual Studio 2008.
  2. Create a new console application.
  3. In Solution Explorer, right-click on References, and select the Add Service Reference option.
  4. Click the Advanced button on the Add Service Reference dialog.
  5. Click the Add Web Reference button on the Service Reference Settings dialog. This should display the familiar Add Web Reference dialog from Visual Studio 2005.
  6. Click the Web services on local machine link to browse for the correct Slide Library web service.
  7. Click the correct Slide Library and change the Web reference name to SlideLibraryService. Click the Add Reference button to add the reference.
  8. The web reference should now be added.
  9. If you attempt to new-up the SlideLibrary object; however, the symbol cannot be resolved.
  10. Updating the web reference will display the error below. Hmm, not very helpful.
The custom tool ‘MSDiscoCodeGenerator’ failed.  Schema item ‘complexType’ named ‘ArrayOfString’ from namespace ‘http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/’.

 

To resolve the issue, we need to do a little more research to figure out why the error is occurring.

  1. Open the SlideLibraryService folder in Windows Explorer.
  2. OK, no SlideLibrary.cs file. That explains why the SlideLibrary object symbol is not resolved.
  3. Open the Visual Studio 2008 Command Prompt and change directory (cd) to the SlideLibraryService folder.
  4. Type the following command to manually create the CS file: wsdl slidelibrary.wsdl /out:slidelibrary.cs
  5. Ahh, you will start receiving the error below that complex type ArrayOfString has already been declared.
  6. Open SlideLibrary.wsdl in an editor (I use NotePad++).
  7. Search for ArrayOfString and you will notice there are two complexType blocks for ArrayOfString.
  8. Delete the second ArrayOfString complexType block and save the SlideLibrary.wsdl file.
  9. Run the following wsdl command: wsdl slidelibrary.wsdl /out:slidelibrary.wsdl
  10. The SlideLibrary.cs file should now be created.
  11. In Visual Studio 2008, click the Show All Files button in Solution Explorer.
  12. Include the slidelibrary.cs file in the project.
  13. Recompile and you should be good to go.
Error: Schema item ‘complexType’ named ‘ArrayOfString’ from namespace ‘http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/’.  – The complexType ‘http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/: ArrayOfString’ has already been declared.
Advertisements

Sorry, the comment form is closed at this time.

 
%d bloggers like this: