使用 Web 服务集成 Oracle 和 SharePoint

发布于 2024-09-19 10:43:02 字数 1863 浏览 10 评论 0原文

我一直在尝试创建一个 PLSQL 包,该包将通过其 Web 服务发布到 SharePoint 中。我已经尝试使用 C# 执行此操作并且它有点有效,但是使用 PLSQL 似乎在对 Sharepoint 进行身份验证时遇到问题,因为它使用 Kerberos 和 PLSQL。 NTLM。

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 提供身份验证并通过吗?

提前致谢,

I've been trying to create a PLSQL package that will post into SharePoint through its web services. I've tried doing this using C# and it kind of worked, yet with PLSQL It seems like am having problem authenticating to Sharepoint since it uses Kerberos & NTLM.

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;

Its mostly failing in authentication, Is there any way that I could supply the authentication to SharePoint and passing through?

Thanks in advance,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤芳又自赏 2024-09-26 10:43:28

您可以在 SharePoint 中启用基本身份验证。我遇到了类似的问题,并通过扩展我的 Web 应用程序解决了这个问题:

  • 默认区域:HTTP - 协商
  • Extranet 区域:HTTPS - 协商 + 基本身份验证(HTTPS 以最大限度地降低安全风险)

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

You could enable basic authentication in SharePoint. I had a similar problem and solved it by extending my web application:

  • Default zone: HTTP - Negotiate
  • Extranet zone: HTTPS - Negotiate + Basic authentication (HTTPS to minimize security risk)

That way, you can use the extranet zone for applications that don't support NTLM or Kerberos.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文