SharePoint::SOAPHandler perl script works for display not copy -
SharePoint::SOAPHandler perl script works for display not copy -
i'm trying re-create files linux server sharepoint. i've got connection working on display of sharepoint. there 1 file out there view. 401 unauthorized
on copy. why successful on display not copy?
#!/usr/bin/perl utilize authen::ntlm qw(ntlmv2); utilize data::dumper; utilize sharepoint::soaphandler; utilize copytree::vendorproof; utilize copytree::vendorproof::localfileop; delete $env{'https_proxy'}; $sharepointobj = sharepoint::soaphandler ->new; $localfileobj = copytree::vendorproof::localfileop ->new; $sharepointobj->sp_creds_domain('operations.web.myworksite.com:443'); $sharepointobj->sp_creds_user('mydomain\myuserid'); $sharepointobj->sp_creds_password('mypassword'); $sharepointobj->sp_authorizedroot('https://operations.web.myworksite.com:443/sites/ca...'); $cpobj = copytree::vendorproof ->new; print dumper $sharepointobj->fdls('', 'shared documents'); $cpobj -> src('/opt/app/reports/excel/reports_tabs1007.xlsx', $localfileobj); $cpobj -> dst('shared documents/reports_tabs1007.xlsx', $sharepointobj); $cpobj -> cp; print dumper $sharepointobj->fdls('', 'shared documents');
response:
$var1 = 'shared documents/reports_tabs1006.xlsx';
$var2 = 'shared documents/forms';
401 unauthorized @ /opt/app/perl/lib/perl5/sharepoint/soaphandler.pm line 374.
so don't know if got answer, -
there's bug in ntlm.pm... prepare it, edit ntlm.pm , find line:
$domain = substr($challenge, $c_info->{domain}{offset}, $c_info->{domain}{len});
and replace code with:
$domain = &unicode($domain);
perl
Comments
Post a Comment