Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8610325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:06:18+00:00 2026-06-12T04:06:18+00:00

I am trying to access a taxonomy web service provided by SharePoint from PHP

  • 0

I am trying to access a taxonomy web service provided by SharePoint from PHP but so far am not having much luck.

I managed to get it working with the list webservice but this service is being much more difficult.

One of the differences that this service has is an output parameter and I don’t know how to deal with that.

Here is the core code I am using.

$params = array('sharedServiceIds' => '<termStoreId>66e3f3ae-573a-4dab-b86a-5175f01ca3b5</termStoreId>',
                    'termSetIds' => '<termSetId>e7df9a5c-a760-4247-96ed-e4c125fad54a</termSetId>',
                    'lcid' => 1033,
                    'clientTimeStamps' => '<timeStamp>633992461437070000</timeStamp>',
        'clientVersions' => 1,
                    );



//echo file_get_contents($wsdl, FILE_TEXT, stream_context_create(array('http' => array('timeout' => 1))), 0, 1);

$rawXMLresponse = null;
try{
    $rawXMLresponse = $soapClient->GetTermSets($params);//->GetListItemsResult->any;
}
catch(SoapFault $fault){
    echo 'Fault code: '.$fault->faultcode;
    echo 'Fault string: '.$fault->faultstring;
}

echo "Printing response<br>\n";
print_r($rawXMLresponse);

I am getting the following fault code and message

Fault code: soap:ServerFault string: Server was unable to process request. ---> Data at the root level is invalid. Line 1, position 1.

Now in my SharePoint logs I get this error

TaxonomyClientService: Get term sets failed: System.Xml.XmlException: Data
 at the root level is invalid. Line 1, position 1.    
 at System.Xml.XmlTextReaderImpl.Throw(Exception e)    
 at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()    
 at System.Xml.XmlTextReaderImpl.ParseDocumentContent()    
 at Microsoft.SharePoint.Taxonomy.Internal.CommonUtilities.GetIntsFromXml(String ints)    
 at Microsoft.SharePoint.Taxonomy.WebServices.TaxonomyClientService.GetTermSets(String sharedServiceIds, String termSetIds, Int32 lcid, String clientTimeStamps, String clientVersions, String& serverTermSetTimeStampXml)

I have this working in a c# desktop application so I know the service is working.

I don’t know what to do to get this to work from php.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:06:19+00:00Added an answer on June 12, 2026 at 4:06 am

    Ok so I spent over a full day on this problem to notice I didn’t format the clientVersions parameter correctly

    'clientVersions' => 1,
    

    Should be

    'clientVersions' => '<version>1</version>',
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to access a web service from a remote computer. I managed to
I'm trying to access YouTube from within an iOS app, but the iOS SDK
trying to access http://forum.worldoftanks.eu/index.php?app=members using apache HttpClient but keep getting 403. Can anyone help
im trying to access a php rest service on a different server with silverlight,
I'm trying access our TFS server when VPN'd from home but it only gives
Trying to access a Servlet from a button on HTML page //Html Page FORM
I am trying to access all the data from database listOfFolder table folder and
Hi I'm trying to access a WCF service which returns a JSON Array using
I'm trying to access the resources of a derived abstract class (from PhoneApplicationPage) in
I've written a PHP script to access the latest item from the wordpress database,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.