Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

    Try

        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
        Debug.WriteLine(ex)
    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
add comment

1 Answer

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(
                            termStoreIds,
                            termSetIds,
                            lcId,
                            oldtimestamp,
                            clientVersion,
                            timeStamp
                           )
share|improve this answer
    
The solution is I should wrap every parameter in my function with XML –  imen Apr 12 '12 at 19:44
add comment

Your Answer

 
discard

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.