Python Ricoh打印机向地址b中的smb文件夹共享添加密码

2024-10-01 15:32:44 发布

您现在位置:Python中文网/ 问答频道 /正文

我会把我们所有的打印机文件夹里的RIC写出来。我找到了以下模块并添加了以下文件夹字段远程文件夹.path, remoteFolder.accountName以及远程文件夹.密码. 除了密码,一切正常。我希望有人有这些打印机的经验,可以帮助我的最后绊脚石。在

提前谢谢。在

XML

add_user_xml = """\
<?xml version="1.0" encoding="utf-8" ?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
 <s:Body>
  <m:putObjects xmlns:m="http://www.ricoh.co.jp/xmlns/soap/rdh/udirectory">
   <sessionId>{sessionId}</sessionId>
   <objectClass>entry</objectClass>
   <parentObjectId></parentObjectId>
   <propListList xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:itt="http://www.ricoh.co.jp/xmlns/schema/rdh/commontypes" xsi:type="soap-enc:Array" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://www.ricoh.co.jp/xmlns/schema/rdh/commontypes" xsi:arrayType="">
    <item xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:itt="http://www.ricoh.co.jp/xmlns/schema/rdh/commontypes" xsi:type="soap-enc:Array" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://www.ricoh.co.jp/xmlns/schema/rdh/commontypes" xsi:arrayType="itt:property[9]">
     <item>
      <propName>entryType</propName>
      <propVal>user</propVal>
     </item>
     <item>
      <propName>index</propName>
      <propVal>{index}</propVal>
     </item>
     <item>
      <propName>name</propName>
      <propVal>{name}</propVal>
     </item>
     <item>
      <propName>longName</propName>
      <propVal>{longName}</propVal>
     </item>
     <item>
      <propName>isDestination</propName>
      <propVal>{is_destination}</propVal>
     </item>
     <item>
      <propName>isSender</propName>
      <propVal>{is_sender}</propVal>
     </item>
     <item>
      <propName>mail:</propName>
      <propVal>{mail}</propVal>
     </item>
     <item>
      <propName>mail:address</propName>
      <propVal>{mail_address}</propVal>
     </item>
     <item>
      <propName>remoteFolder:path</propName>
      <propVal>{remoteFolder_path}</propVal>
     </item>
     <item>
      <propName>remoteFolder:accountName</propName>
      <propVal>{remoteFolder_accountName}</propVal>
     </item>     
     <item>
      <propName>remoteFolder:password</propName>
      <propVal>{remoteFolder_password}</propVal>
     </item>     
    </item>
   </propListList>
  </m:putObjects>
 </s:Body>
</s:Envelope>""".strip()

PYTHON

^{pr2}$

我的代码

r.add_user(name='username', displayName='user', 
Folder='\\\\IP here\\Folder', 
Fname='username', Fpass='password')

Tags: org文件夹httpwwwitemsoapjpco

热门问题