Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2008

Tip: Looking for answers? Try searching our database.

Adding Web Service Reference from SharePoint lower level site coll

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Moojjoo - 08 Feb 2008 21:07 GMT
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.  
http://URL/Sites/sites/MySite/Subsite/_vti_bin/lists.asmx

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.

Signature

<moojjoo/>

John Saunders [MVP] - 09 Feb 2008 06:50 GMT
>I am having a heck of a time with accessing the Web Services for a
> particular site collection.
[quoted text clipped - 10 lines]
>
> I am using MOSS 2007 as well.

What's in address element of the WSDL?
Signature

--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Moojjoo - 11 Feb 2008 14:28 GMT
John as you can see it drops my /sites/MySite/Subsite/ part of the URL.  This
is from the lists.wsdl file

When the Web service is created the following files are created:

lists.disco
lists.wsdl
Reference.map - Reference.cs

 <wsdl:service name="Lists">
   <wsdl:port name="ListsSoap" binding="tns:ListsSoap">
     <soap:address location="http://xxx.xxxxx.com/_vti_bin/lists.asmx" />
   </wsdl:port>
   <wsdl:port name="ListsSoap12" binding="tns:ListsSoap12">
     <soap12:address location="http://xxx.xxxxx.com/_vti_bin/lists.asmx" />
   </wsdl:port>
 </wsdl:service>
Signature

<moojjoo/>

> >I am having a heck of a time with accessing the Web Services for a
> > particular site collection.
[quoted text clipped - 12 lines]
>
> What's in address element of the WSDL?
Moojjoo - 11 Feb 2008 14:31 GMT
John in addition.  I am just curious if this should or should not be happening?
Signature

<moojjoo/>

> John as you can see it drops my /sites/MySite/Subsite/ part of the URL.  This
> is from the lists.wsdl file
[quoted text clipped - 30 lines]
> >
> > What's in address element of the WSDL?
Moojjoo - 11 Feb 2008 14:41 GMT
John,

I just performed a find a replace of the

http://xxx.xxxxx.com/_vti_bin_/lists.asmx

with

http://xxx.xxxxx.com/ /sites/MySite/Subsite/_vti_bin_/lists.asmx

And my code started working because my code is not consuming the correct
list by GUID.  

I am concerned I have a problem with my VS2005 and trying to program against
Web services. I am hoping there might be something I am missing or I am
concerned there is something not setup correctly with my IDE.

In addition I have to change the URLs in the

Settings.settings
app.config

My thoughts are this should not have been an issue unless I am missing
something.

Signature

<moojjoo/>

> John in addition.  I am just curious if this should or should not be happening?
>
[quoted text clipped - 32 lines]
> > >
> > > What's in address element of the WSDL?
John Saunders [MVP] - 11 Feb 2008 18:08 GMT
> John as you can see it drops my /sites/MySite/Subsite/ part of the URL.
> This
[quoted text clipped - 32 lines]
>> > know that I am trying to get the WebReference from
>> > /sites/MySite/Subsite/?

From the WSDL you've posted, it appears that Visual Studio 2005 is doing the
right thing. It's using the URL specified in the WSDL.

The question is, "Why is SharePoint putting that particular URL into the
WSDL?". You should ask that question on one of the SharePoint  newsgroups,
or one of the SharePoint forums on MSDN.
Signature

--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Moojjoo - 12 Feb 2008 13:45 GMT
John,

I will move this post to the forum for SharePoint, but I still do not
believe this is performing as it should.

I will keep you posted.  
Signature

<moojjoo/>

> > John as you can see it drops my /sites/MySite/Subsite/ part of the URL.
> > This
[quoted text clipped - 39 lines]
> WSDL?". You should ask that question on one of the SharePoint  newsgroups,
> or one of the SharePoint forums on MSDN.
FredB - 15 Mar 2008 19:02 GMT
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.Lists ws= new myWebReference.Lists();
       ws.Url = "http://site/SUBSITE/_vti_bin/lists.asmx";
       ws.Credentials = System.Net.CredentialCache.DefaultCredentials;

WSS v3 i think is at fault here...

> John,
>
[quoted text clipped - 46 lines]
> > WSDL?". You should ask that question on one of the SharePoint  newsgroups,
> > or one of the SharePoint forums on MSDN.
John Saunders [MVP] - 15 Mar 2008 20:18 GMT
> This particular issues caused me to throw a small fit for far too long...
>
[quoted text clipped - 7 lines]
>
> 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.
Signature

--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.