Sharepoint Profile Service - Stumped

S

SirCodesALot

HI All,

I am trying to read data from a Sharepoint web serivce using
Javascript. However, the service always returns the error:
"soap:ClientServer did not recognize the value of HTTP Header
SOAPAction: http://microsoft.com/webservices/SharePointPortalServer/UserProfileService/GetInCommon"

Anyone know what may be wrong, here is the xml call I am using:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://
schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetInCommon xmlns="http://microsoft.com/webservices/
SharePointPortalServer/UserProfileService">
<accountName>domain\login</accountName>
</GetInCommon>
</soap:Body>
</soap:Envelope>

And the ajax part -- I will only post the import parts:

var xmlHttpReq = getHTTPObject();
var strSOAP = "http://microsoft.com/webservices/SharePointPortalServer/
UserProfileService/GetInCommon";
var strURL = "http://ourserver.com/sites/oursite/_vti_bin/
userprofileservice.asmx"
xmlHttpReq.open("POST", strURL, true);
xmlHttpReq.setRequestHeader('Content-Type', 'text/xml;
charset=utf-8');
xmlHttpReq.setRequestHeader('Content-Length', strXML.length);
xmlHttpReq.setRequestHeader('SOAPAction', strSOAP);
xmlHttpReq.send(strXML);


Any ideas?
 
S

SirCodesALot

HI All,

I am trying to read data from a Sharepoint web serivce using
Javascript.  However, the service always returns the error:
"soap:ClientServer did not recognize the value of HTTP Header
SOAPAction:http://microsoft.com/webservices/SharePointPortalServer/UserProfileSe..."

Anyone know what may be wrong, here is the xml call I am using:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://
schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetInCommon xmlns="http://microsoft.com/webservices/
SharePointPortalServer/UserProfileService">
      <accountName>domain\login</accountName>
    </GetInCommon>
  </soap:Body>
</soap:Envelope>

And the ajax part  -- I will only post the import parts:

var xmlHttpReq = getHTTPObject();
var strSOAP = "http://microsoft.com/webservices/SharePointPortalServer/
UserProfileService/GetInCommon";
var strURL = "http://ourserver.com/sites/oursite/_vti_bin/
userprofileservice.asmx"
    xmlHttpReq.open("POST", strURL, true);
    xmlHttpReq.setRequestHeader('Content-Type', 'text/xml;
charset=utf-8');
    xmlHttpReq.setRequestHeader('Content-Length', strXML.length);
    xmlHttpReq.setRequestHeader('SOAPAction', strSOAP);
    xmlHttpReq.send(strXML);

Any ideas?

I found the problem.it wanted the value of the SoapAction: to be in
qoutes!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top