I have a situation where I need to retrieve the site title for a site in another web application using client side scripting.

Client site JQuery SOAP calls to the "Webs" web service returns the title as expected for URL's belonging to the web app from which I am making this call. However the same call using a URL from another web app returns 401 errors (unauthorized).

I really don't want to deploy a feature to do this and my goal is to make this all client side.

I have not attempted yet to use the client side api in fear I may run into the same problem so I wanted to post here to see if anyone has thoughts or ideas on how to make this happen.

Thanks for reading!

2 Answers 2


Thanks for confirming that for me Vardhaman. It seems possible however to use the Search Service Web service call with a query like this.

 var queryText = "<QueryPacket xmlns='urn:Microsoft.Search.Query' Revision='1000'>"
                    queryText += "<Query>"
                    queryText += "<Context>"
                    queryText += "<QueryText language='en-US' type='MSSQLFT'>"
                    queryText += "SELECT Path, Title, Description FROM SCOPE() WHERE Path='" + urlArray[i] +"'"
                    queryText += "</QueryText>"
                    queryText += "</Context>"
                    queryText += "</Query>"
                    queryText += "</QueryPacket>";

This returns the following XML which contains all the info I want. I have to assume I will always get one result.

<ResponsePacket xmlns="urn:Microsoft.Search.Response">
        <Document xmlns="urn:Microsoft.Search.Response.Document">
          <Properties xmlns="urn:Microsoft.Search.Response.Document.Document">

I am afraid this wont be possible with the JavaScript Client Object Model as it only works withing the current Site Collection. This is implemented to avoid Cross Domain calls.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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