Don't forget: Web Services/SOAP isn't the only path to XML from SharePoint
<reposted from May 18, 2004>
A technique we used extensively in STS still applies to WSS: How to get data
from your SharePoint lists in XML format. It's actually quite simple, and you don't
need to use web services to get it.
WSS supports a number of protocols to interact with the data. SOAP and WEBDAV
immediately come to mind for most of you, but you may be forgetting the elusive
URL Protocol (GET). Luckily for you, it's simple to use, and returns data in the
MS-standard rowset stream format.
Rather than go into a bunch of detail, let's put ourselves to work, shall we?
Follow along with these steps, and you'll be pleased with the results, I'm certain.
![]()
- Determine the GUID of a list whose data you need in XML.
- Navigate to the allitems.aspx view of the list in question
- Click the "Modify Settings and Columns" link on the left side
- Copy the List's GUID (including curly braces) from the address bar
- Construct the URL to retrieve the list's data in XML format (it's case sensitive,
be careful!)- The requested object is http://servername/sitename/_vti_bin/owssvr.dll
- The object will expect three parameters: Cmd, List and XMLDATA (case
sensitive) - Since we're displaying items (in XML format), the value of the Cmd parameter
should be Display - We want to grab the list whose GUID we determined in step one; the value
of the List parameter is this GUID (including curly braces) - Of course, we want XML data to be returned; the value of the XMLDATA
parameter will be TRUE - Putting this together, we get a URL that looks like this:
- http://server/site/_vti_bin/owssvr.dll?Cmd=Display&List={E1D9FED5-2531-413F-8C0F-CAA5C6280E51}&XMLDATA=TRUE
- Sit back and marvel at how easy it is to get a rowset out of SharePoint
without using the Object Model or the Web Services. You can point a Data View
web part to this URL and grab data from another SharePoint site without adding
the whole site to your DV catalog listing.
You may find that it doesn't return EVERY field. That's right: It returns fields
that are defined in the default "allitems" view of that particular list. If you
want more fields, you have two choices:
- Modify the allitems.aspx view to show more fields (easy)
- Pass an additional URL parameter, View, with the GUID value of the view
whose fields you want to return (a little more involved/tedious)
Did you like this tip? Comment!
I hate Murphy, but I love SharePoint Blogs users and bloggers!
How does it go again? "The worst thing will happen at the worst possible time." That's the most often-seen definition of Murphy's law, right?
Right.
So, imagine if you will. You've been selected as a speaker at TechEd in Orlando, Florida. You arrive on a Sunday, have a nice dinner and some drinks with friends you haven't seen in months (and may not see again until the next big conference), and unwind. The hotel? It's nice; it has its quirks, but it's Orlando and the hotel has lots of flowers around it and a nice fountain and ... you get the point. That first day, the tension is already melting. Good friends, good food, good drinks, good weather. You go to bed the first night, ready and rarin' to start your week at Tech Ed with a bang. The alarm is set for 7PM so you can shower and catch the keynote before hitting the expo floor for the morning's "swag tour".
Your phone, set to beep only if messages arrive from your spouse or from your server monitoring system, starts beeping before the sun even rises.
"Server down."
To quote Starbuck (and, well, pretty much every other lead character in Battlestar Galactica): "Frak me."
I don't know about you, but I hate waking up that way. I prefer to wake up before the alarm goes off, slowly roll out of bed, and crawl into the shower. I'm not a morning person at all.
I'll speed up the story now. No sense reliving the whole tragedy. Here's the fast-forward version: Server crashes, catastrophic RAID failure. Backups, tested monthly (and last tested three weeks ago) are useless. I rebuild the array and run some software that recovers files from their original stripes, and recover a surprising number of files. They're all pretty mangled, and most of them are useless. I don't really have the time or the focus to start new servers from scratch while I'm in Orlando. Not that the servers were in my house or anything (they weren't, of course, we're not some fly-by-night operation here), but a hotel room with a slow network connection is not the best place to do your best technical work.
Thursday afternoon comes, and I'm dangerously close to a breakdown. I've been knee-deep in server doo-doo for days. Todd and Matt (two of the greatest trainers in the world, I should add) dive into the muck with me and both of them say (alternately), "Dude, take a break, we'll help you clean this up." It's hard to let go, but I can see that I'm minutes away from a full-blown freak-out. I quietly put down the laptop lid, put on some shorts and sandals, and drive to Epcot to ride Mission Space four times. Then, off to the attendee party at Universal Studios Islands of Adventure.
Friday didn't seem as bad. It got better, too, because my wife and son arrived to spend a long weekend with me in Florida. We saw my mom and step-dad, went to a few tourist traps, and all-in-all had a great time.
When I get home, I have one full day before I need to leave again to teach a class. SharePoint Experts and SharePoint Bootcamp come back online during that time. Then, I spend my evenings and Father's Day weekend getting as much content back into SharePoint Blogs as possible (thanks again to Dan Larson and Glenn Barry from NewsGator for their help in recovering old content), and here we are.
I said that I hate Murphy, and I do: His laws suck out loud. But YOU guys are another story; the readers and bloggers here at SharePoint Blogs are part of the the greatest technology community on this planet. Every e-mail I've received has been supportive and appreciative. Every phone call and blog comment cheers me on. I can't thank you guys enough for your patience, your understanding, and your support! It's been a bumpy road, and we still have some ways to go, but the outpouring of support I've received by e-mail has given me the energy to keep going.
So, from the bottom of my heart, THANK YOU.
You guys rock.
TechEd 2007. I am /so/ going to make my mark.
I'm really pumped about TechEd! I've built up my session calendar (I can't miss some of the great sessions planned by Andrew Connell, Heather Solomon, and Shane Young), and I've been working and polishing my planned demos for my very own session. If you've seen me present SharePoint Designer before, you should know: My TechEd session, "Microsoft Office SharePoint Designer: It's for Developers, Too!" has some all new material that you haven't seen before, and won't see again! Be sure to arrive 10-15 minutes early to get a good seat and to have some pre-session fun with your fellow attendees -- I've got something fun lined up for the pre-show! This session (OFC324) will be in S310A at 8:45AM on Wednesday, June 6.
I'm also moderating a "birds of a feather" session called "Geeks with ADD: It's an advantage!" If you or a loved one has ADD (or AD/HD, which is either the same thing or a slightly different thing -- that depends on who you ask), and you want to learn how to manage the deluge of communications and tasks that a technology-driven life brings down, you should come by this session. There will be no PowerPoint, just a group of like-minded ADDers who want to share their experiences and advice. I will have my laptop there to show a few ideas for using Outlook 2007 to help with time and task management, if anybody is interested in seeing that. The purpose of this session, though, is to better understand the positive role that ADD can have on a geek's life. I'm hoping to hear some of your stories; how has your differently-wired brain solved a problem that stumped everyone else around you? What creative endeavors do you pursue? There are a lot of positive aspects of ADD, so let's learn how to take advantage of them! This session (BOF69) will be in N220F at 7:45PM on Tuesday, June 5. (Non-ADDers are VERY welcome to attend -- you'll learn a lot about what it really means to have ADD. Here's a hint: It doesn't mean that you can't pay attention!)
See you in Orlando next week, everybody!
I'm going to be a dad … again! :)
Thought I'd post here to let everyone know: the missus and I are going to have another baby! (Well, she's going to have the baby; I'm going to bring the chocolates for the nurses.
) The kiddo is due to arrive around December 11, and we couldn't be happier! We went for a Doppler yesterday to hear the baby's heartbeat, and the doctor couldn't find it. He was concerned that we had misjudged the pregnancy length, and ordered an ultrasound. So we got a sneak peek at the little one before we expected! As it turns out, everything is fine with the mini-Miller. ![]()
You can get a better look, too -- the picture on the left is linked to the bigger version.
As you might expect, this will change a few things, most notably how often I'm traveling toward the end of this year. Look for some job opening announcements in the next few weeks.
Fix those SIDs!
(I'm not sure why this isn't showing up under my blog, but I'm working on it!)
Thanks to my good friend Jeremy McMahan for finding the suser_sid() function for me -- My original solution was a crazy mix of linked servers and the Directory Services provider for OLEDB!
Ever migrate your SharePoint site to a totally new environment and discover that your efforts to re-create your Active Directory were all for nothing, since all the users got new SIDs? Symptoms like: The administrator of the server can log in, but nobody else can, even though you're SURE their usernames and passwords are right.
Here's a script that'll fix that up for you in a jif. Open Query Analyzer and run it against the content database for your site, and it will update all the SIDs for your users to the SID that is reported for that user by Active Directory.
Big fat disclaimer: Microsoft does NOT support ANY modifications to your SharePoint databases. That's not to say they won't support your SharePoint site, but if this operation breaks your server, Microsoft won't help you. I'm not responsible for the results, either, while we're on the subject of passing the buck. BACK UP YOUR DATABASE.
Okay, now that we've gotten that mumbo-jumbo out of the way, here's the code.
DECLARE @login varchar(40), @systemid varbinary(128) DECLARE curUsers CURSOR LOCAL FOR SELECT tp_login, tp_systemid FROM userinfo where tp_deleted = 0 OPEN curUsers FETCH NEXT FROM curUsers INTO @login, @systemid WHILE @@FETCH_STATUS = 0 BEGIN PRINT 'Resetting user ' + @login + ' to new SID ' PRINT suser_sid(@login) UPDATE UserInfo SET tp_systemid = suser_sid(tp_login) WHERE CURRENT OF curUsers FETCH NEXT FROM curUsers INTO @login, @systemid END CLOSE curUsers DEALLOCATE curUsers GO
Vote for Pedro! Er, I mean, me!
TechĂșEd is coming! One of the great things at this conference is a series of sessions called "Birds of a Feather". These are not presentations, but more of an intimate round table focused on some topic of interest to attendees. You can find sessions on accessibility in web design, MOSS publishing sites, Agile software development, and even non-technical discussions designed to encourage camaraderie with your fellow geeks. In order for a session to land on the schedule, it needs votes! You can visit the Birds of a Feather voting page now and cast your votes for Birds of a Feather sessions you think would make a great addition to the line up.
I've submitted a session I'm calling "Geeks with ADD: It's an ADDvantage!". Here's the abstract:
During this BOF session, all attendees are welcome to join a discussion centered around AD/HD (attention deficit/hyperactivity disorder), also known as ADD. ADDers know that there are a lot of misconceptions about ADD, and we all face our own unique challenges with time and task management. Let's talk about how we can simplify our technological lives, and take ADDvantage of all the positives that ADD can give. Non-ADDers are welcome, you'll learn a lot about what ADD *really* means! Here's a hint: It doesn't mean that we can't pay attention!
If you or someone you know and love has AD/HD or ADD (the terms are used interchangeably by some, though both acronyms are not really accurate!), or you just want to learn what being a geek with ADD is really all about, vote for this session! Let's talk, and wipe away the common misconceptions about this "alternative brain wiring"! You don't necessarily have to attend the session if you vote on it, but you can show your support for the topic by casting your vote anyway. ![]()
See you in Orlando!
Welcome to SharePoint Experts, Heather Solomon!
Heather Solomon, the well-known SharePoint MVP and SharePoint design genius has recently joined the SharePoint Experts family. She is continuing to expand her private SharePoint branding business, Solomon Creative (THE go-to company for your SharePoint branding needs), but has also joined forces with SharePoint Experts to create the first class devoted 100% to SharePoint branding!
Yes, that's right. Currently slated for 3Q 2007, SharePoint Experts will offer the SharePoint Branding Bootcamp, authored and delivered by Heather Solomon. We're thrilled to have her on board! Stay tuned to this blog (and, no doubt, her blog as well!) for more details on this class as it is written. If you're interested in getting updates on the status of this class, or you want to be notified when we offer tickets for this great new training option, be sure to join the SharePoint Bootcamp training mailing list.
It's going to be a great year, folks! And welcome aboard, Heather!
AC is going to blow you away.
I know this may constitute a minor NDA violation (I don't think he'll REALLY mind), but while I was at the MVP Summit, Andrew showed me a killer STSADM extension he's been working on. I don't want to give it away and steal his thunder, but I have to say: Prepare to say, "thank you, Andrew, for you have saved my SharePoint sites!"
It's that good.
Last I heard, he's supposed to be finishing it up in a week or two. Don't bug him about it, but when you see it, don't say I didn't tell you how amazing it was. Make sure you're sitting down when you run it for the first time.
Tech Ed 2007 — I'll be there, will you?
I am honored to be selected as one of the speakers for this year's Tech Ed conference in beautiful and sunny Orlando, FL, June 4 - 8. I'll be presenting a session on SharePoint Designer, and its suitability for developers. This will be a special version of this session, geekier than ever.
This year's conference is sure to be one of the biggest, since it's the first Tech Ed since the launch of Office 2007, Vista and the new SharePoint Products and Technologies. I'm VERY excited to be going, and I hope to see a lot of you there! If you're thinking of going, I'd recommend signing up as early as you can. The event WILL sell out, and it will be difficult to get a good hotel room if you wait. There is a $200 discount if you sign up before April 7.
SharePoint Experts is Hiring Writers, Trainers and Contractors
Hey, folks! Just wanted to pass along that SharePoint Experts is hiring for all sorts of positions right now.
- Technical writers
- Must have significant SharePoint experience, V2/2003 and V3/2007
- Samples will be required
- Hourly rate for contract writing
- Part time is okay
- Trainers
- Must have significant SharePoint experience, V2/2003 and V3/2007
- CMS/WCM, InfoPath 2007 and/or Office 2007 experience a plus
- Must be a good writer, you'll be writing your own curriculum
- Writing samples will be required
- Must have social skills greater than that of a baked potato
- Oh, and a healthy sense of humor
- You'll need a fun-loving spirit, and a desire to entertain and educate simultaneously
- Our non-compete isn't very restrictive
- Part time okay
- Contractors
- Must have significant SharePoint experience, V2/2003 and V3/2007
- Could be development, branding, architecture -- it varies
- We'll keep you on file as a contractor, and offer gigs to you as they match your skills
- Pay rates vary from project to project
- Part time okay
How do you apply? By reading these instructions carefully. If you don't follow these instructions, your application will not be considered!
- Use the "e-mail" link on my blog (it's on the right side) to contact me
- Put "Hire me!", without the quotes, with the "!" sign as the subject
- In the body, tell us what you're looking to do for us, and if you have samples online that you'd like us to see, include URLs.
- We won't ask for your resume unless we like what you wrote in this space. Be creative and fun.
Or be serious and direct. Be yourself! Don't just say "hire me" (your subject already says that if you followed the directions
), tell us why you want a job!
We'll get back to you within a few days and, if it looks like you'd be a good fit for our team, we'll ask for your resume. We're accepting applications from all over the world. If you want to be part of the rapidly growing SharePoint Experts team, get in touch with us today!