I am trying to update a Sharepoint (2007) list using SAS (9.3) via PROC SOAP (SAS is living on a Unix GRID). The sharepoint site has basic authentication enabled (since PROC SOAP cannot authenticate through NTLM).
I can successfully pull data down from the Sharepoint list using the XML Libname engine, but I cannot issue via PROC SOAP XML data back to the Sharepoint lists web service. Specifically, I am trying to add and update items within the sharepoint list through 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 have confirmed, through SOAPUI, that the XML passing into the Lists.asmx web service is valid (I can actually create and update list items as expected in Sharepoint when manually executing through SOAPUI.
As the error explicitly states, for some reason, the user authentication being fed into the PROC SOAP is not making it into Sharepoint (I have administrative rights in Sharepoint so I should have the correct rights). What is super confusing about this is that I can feed in the same credentials through XML Libname and pull back data just fine...
** Questions **
- If I am passing in my credentials through PROC SOAP, why am I not able to authenticate to Sharepoint?
- Are there any other work around for passing this XML into Sharepoint (IE: is XML LIBNAME or PROC HTTP able to support this by passing in the XML)?
- Where does the issue lie : in SAS with PROC SOAP (in the way I am invoking the procedure) or with Sharepoint?
...just for completeness, example XML being passed into PROC SOAP can be seen posted below (SOAP 1.1 - which should 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>