SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

do you have any idea about this type of exception "System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Data at the root level is invalid. Line 1, position 1."

I have receveided this exception when I tried to call the method "GetTermsets" using the web service "taxonomyclientservice.asmx"

Here is the portion of my code:

Dim ts As New TaxonomyService.Taxonomywebservice
    ts.UseDefaultCredentials = True
    ts.Url = SiteUrl + "/_vti_bin/taxonomyclientservice.asmx"
    Dim timestamp As String
    timestamp = String.Empty


        termsetXML = ts.GetTermSets(sspId, termSetId, 1033, DateTime.Now.ToUniversalTime().Ticks.ToString, 0, timestamp)
        Console.WriteLine("This is the XMLstring that contain all the temrs of the term set : {0}", termsetXML)

        Return termsetXML
    Catch ex As Exception
    End Try

The values of sspId and termSetId are of String type and they get values from an other method that I tested and it is working so well.

Unfortunatally, there no programmer in my team to help in such situationI

Thanks so much!

share|improve this question

You have probably found the solution by now, but just in case someone else has the same problem: You should include the tags with the parameters you send to the taxonomywebservice.GetTermSets function.

So, just add your own values for [YourTermStoreId] and [YourTermSetId] and it should do the job.

Here's a code sample:

Dim oldtimestamp As String = "<timeStamp>633992461437070000</timeStamp>"
Dim clientVersion As String = "<version>3</version>"
Dim termStoreIds As String = "<termStoreId>" & [YourTermStoreId] & "</termStoreId>"
Dim termSetIds As String = "<termSetId>" & [YourTermSetId] & "</termSetId>"
Dim timeStamp As String = Nothing

termsetXML = ts.GetTermSets(
share|improve this answer
The solution is I should wrap every parameter in my function with XML – imen Apr 12 '12 at 19:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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