Adding Web Service Reference from SharePoint lower level site coll

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?TW9vampvbw==?=

    Adding Web Service Reference from SharePoint lower level site coll

    I am having a heck of a time with accessing the Web Services for a
    particular site collection.

    I try to add a Web reference to VS2005 for example.


    The Web service is added with the Web Reference URL set correctly as shown
    above, but in the Lists.disco and Lists.wsdl the /sites/MySite/Subsite is
    always dropped in the IDE. Any thoughts?

    I am going to change the URLS in the files manually, but shouldn't VS2005
    know that I am trying to get the WebReference from /sites/MySite/Subsite/?

    I am using MOSS 2007 as well.

    --
    <moojjoo/>
  • John Saunders [MVP]

    #2
    Re: Adding Web Service Reference from SharePoint lower level site coll

    "Moojjoo" <Moojjoo@discus sions.microsoft .comwrote in message
    news:0F6CF543-101D-4F9B-8751-061790651A0D@mi crosoft.com...
    >I am having a heck of a time with accessing the Web Services for a
    particular site collection.
    >
    I try to add a Web reference to VS2005 for example.

    >
    The Web service is added with the Web Reference URL set correctly as shown
    above, but in the Lists.disco and Lists.wsdl the /sites/MySite/Subsite is
    always dropped in the IDE. Any thoughts?
    >
    I am going to change the URLS in the files manually, but shouldn't VS2005
    know that I am trying to get the WebReference from /sites/MySite/Subsite/?
    >
    I am using MOSS 2007 as well.
    What's in address element of the WSDL?
    --
    --------------------------------------------------------------------------------
    John Saunders | MVP - Windows Server System - Connected System Developer


    Comment

    • John Saunders [MVP]

      #3
      Re: Adding Web Service Reference from SharePoint lower level site

      "FredB" <FredB@discussi ons.microsoft.c omwrote in message
      news:9E1E4EE5-F02A-4612-99BD-2C55ACD16EA7@mi crosoft.com...
      This particular issues caused me to throw a small fit for far too long...
      >
      anyway, i easily fixed it by manually setting the .Url property to the
      correct site...
      >
      i.e.
      myWebRerence.Li sts ws= new myWebReference. Lists();
      ws.Url = "http://site/SUBSITE/_vti_bin/lists.asmx";
      ws.Credentials = System.Net.Cred entialCache.Def aultCredentials ;
      >
      WSS v3 i think is at fault here...
      I've learned a bit more about SharePoint since your previous posts. I have a
      new theory about this now.

      All of the files in a SharePoint site are identical to the files in the
      parent site collection until you customize them. This is true for the .aspx
      pages, isn't it? So why would it not be true for the .asmx files, or even
      any .WSDL files if there are any? Among other things, this implies that the
      URL in any such a file will still be the URL of the site collection.

      At any rate, like I said, the <soap:address in the WSDL is only a hint. You
      should never depend on it being there, or being valid.
      --
      --------------------------------------------------------------------------------
      John Saunders | MVP - Windows Server System - Connected System Developer


      Comment

      Working...