2010-09-13 47 views
1

我一直在尝试创建一个将通过其Web服务发布到SharePoint中的PLSQL包。我已经尝试使用C#执行此操作,但它与PLSQL一起工作似乎有点问题,因为它使用Kerberos & NTLM对Sharepoint进行身份验证。使用Web服务在Oracle和SharePoint之间进行集成

declare 
soap_request varchar2(30000); 
soap_respond varchar2(30000); 
http_req utl_http.req; 
http_resp utl_http.resp; 
resp XMLType; 
i pls_integer; 
l_len pls_integer; 
begin 
soap_request:= '<?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> 
<GetListAndView xmlns="http://schemas.microsoft.com/sharepoint/soap/"> 
<listName>Events</listName> 
<viewName></viewName> 
</GetListAndView> 
</soap:Body> 
</soap:Envelope> 
'; 
utl_http.set_response_error_check(enable => TRUE); 
utl_http.set_detailed_excp_support(enable => TRUE); 
http_req:= utl_http.begin_request 
('http://deptportal/IT/BSS/b_r/_vti_bin/lists.asmx' 
, 'POST' 
, 'HTTP/1.1' 
); 
utl_http.set_header(http_req, 'Content-Type', 'text/xml'); 
utl_http.set_header(http_req, 'Content-Length', length(soap_request)); 
utl_http.set_header(http_req, 'SOAPAction', ''); 
Utl_Http.Set_Authentication (
r => http_req, 
username => 'username', 
password => 'pass0word', 
scheme => 'Basic', 
for_proxy => false); 
utl_http.set_header(r=>http_req ,name=>'User-Agent',value=>'Mozilla/4.0'); 
utl_http.write_text(http_req, soap_request); 
http_resp:= utl_http.get_response(http_req); 
utl_http.read_text(http_resp, soap_respond); 
utl_http.end_response(http_resp); 
i := 1; 
l_len := length(soap_respond); 
while (i <= l_len) loop 
dbms_output.put_line(substr(soap_respond, i, 60)); 
i := i + 60; 
end loop; 
--return resp.getStringVal(); 
end; 

它主要是身份验证失败,有没有什么办法可以提供身份验证到SharePoint并通过?

由于提前,

回答

2

您可以启用在SharePoint基本身份验证。我有一个类似的问题,并通过延长我的web应用程序解决了这个问题:

  • 默认区域:HTTP - 协商
  • Extranet区域:HTTPS - 协商+基本身份验证(HTTPS,以尽量减少安全风险)

这样,您可以将外联网区域用于不支持NTLM或Kerberos的应用程序。

+0

感谢汤姆,我想你的方法和它的工作。 – 2010-09-14 10:52:23