问题
headers and soap body set right, with docID requests. see below
headers = {'content-type': 'text/xml','charset':'UTF-8'}
body_ID="""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ucm="http://www.oracle.com/UCM">
<soapenv:Header/>
<soapenv:Body>
<ucm:GenericRequest webKey="cs">
<ucm:Service IdcService="GET_FILE">
<ucm:Document>
<!--Zero or more repetitions:-->
<ucm:Field name="dID">{docID}</ucm:Field>
</ucm:Document>
</ucm:Service>
</ucm:GenericRequest>
</soapenv:Body>
</soapenv:Envelope>""".format(DocID='<DOCID>')
getting error below on requests response
success
<Response [200]>
b'------=_Part_11826_1961656318.1609798653407\r\nContent-Type: application/xop+xml;charset=UTF-8;type="text/xml"\r\nContent-Transfer-Encoding: 8bit\r\nContent-ID: <4522dc33-d0c7-4609-aefb-5f2768a2cde4>\r\n\r\n<?xml version="1.0" encoding="UTF-8" ?>\n<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><ns2:GenericResponse xmlns:ns2="http://www.oracle.com/UCM"><ns2:Service IdcService="GET_FILE"><ns2:Document><ns2:Field name="StatusCode">-1</ns2:Field><ns2:Field name="dID">UCMFA08693968</ns2:Field><ns2:Field name="refreshMonikers"></ns2:Field><ns2:Field name="refreshSubMonikers"></ns2:Field><ns2:Field name="IdcService">GET_FILE</ns2:Field><ns2:Field name="changedMonikers"></ns2:Field><ns2:Field name="StatusMessageKey">!csUnableToDownloadFile!csServiceDataException,DOC_INFO_SUB,QdocInfo</ns2:Field><ns2:Field name="idcToken"></ns2:Field><ns2:Field name="StatusMessage">Unable to download file. Unable to execute service DOC_INFO_SUB and function QdocInfo.\n</ns2:Field><ns2:Field name="dUser">{user replaced}</ns2:Field><ns2:
specific error
StatusMessageKey">!csUnableToDownloadFile!csServiceDataException,DOC_INFO_SUB,QdocInfo</
Able to login with same user/pasword and download manually
回答1:
So dID on wsdl has been set as an integer. The UCM* value is actually the docname and the doctitle would be the filename. The dID value is the UCMFA* value converted to integer. Hope this helps someone getting this problem.
来源:https://stackoverflow.com/questions/65570710/error-on-downloading-files-from-oracle-ucm