I am trying to update the Sharepoint list (2007) using SAS (9.3) via PROC SOAP (SAS lives on Unix GRID). Basic authentication is enabled on the sharepoint site (since PROC SOAP cannot authenticate through NTLM).
I can easily pull data from a Sharepoint list using the XML Libname mechanism, but I cannot transfer XML PROC SOAP data back to the Sharepoint list web service. In particular, I am trying to add and update items in a sharepoint list via http://[intranet_site]/sites/IT/_vti_bin/Lists.asmx
SAS LOG Output:
18399 %let RESPONSE=RESPONSE; 18400 proc soap in=REQUEST 18401 out=&RESPONSE 18402 url="http://[intranet_site]/sites/IT/_vti_bin/Lists.asmx" 18403 webusername="[username]" 18404 webpassword="[password]" 18405 webdomain="[domain]" 18406 SOAPACTION="http://schemas.microsoft.com/sharepoint/soap/UpdateListItems" 18407 ; 18408 run; ERROR: org.springframework.ws.client.WebServiceTransportException: Unauthorized [401]
I confirmed through SOAPUI that the XML passed to the List.asmx web service is valid (I can actually create and update list items as expected in Sharepoint when executed manually through SOAPUI.
Since the error clearly indicates that for some reason, user authentication provided in PROC SOAP does not turn it into a Sharepoint (I have administrator rights in Sharepoint, so I must have the correct rights). What is confusing about this is that I can pass the same credentials through XML Libname and distract the data just fine ...
** Questions **
- If I pass my credentials through PROC SOAP, why can't I authenticate to Sharepoint?
- Is there any other job to transfer this XML to Sharepoint (IE: XML LIBNAME or PROC HTTP capable of supporting this by passing to XML)?
- What is the problem: in SAS with PROC SOAP (in how I call the procedure) or using Sharepoint?
... for completeness only, the XML example passed to PROC SOAP can be seen below (SOAP 1.1 - which must be supported by PROC SOAP):
<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> <UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/"> <listName>{851DDBB5-1765-444D-9012-0210F006A4AF}</listName> <updates> <Batch OnError="Continue" ListVersion="1"> <Method ID="1" Cmd="New"> <Field Name='ID'>NEW</Field> <Field Name='Title'>DUMMY</Field> [...shortened for space...] </Method> </Batch> </updates> </UpdateListItems> </soap:Body> </soap:Envelope>
source share