filenet-p8filenet-content-enginefilenet-cpe

Filenet GetContent webservice returns the file incomplete


I am using Filenet 5.2.1 soap webservice GetContent :

http://myserver:9080/wsi/FNCEWS40MTOM.wsdl

and when trying to get content for a file that is larger than 1 MB, the returned response when read as base64 is only for part of the file not the whole file. my request is as follows :

<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>
        <Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext">
            <hd:UsernameToken xmlns:hd="http://schemas.xmlsoap.org/ws/2002/12/secext">
                <hd:Username>myusername</hd:Username>
                <hd:Password>mypassword</hd:Password>
            </hd:UsernameToken>
        </Security>
    </soapenv:Header>
    <soapenv:Body>
        <p857:GetContentRequest validateOnly="0" xmlns:p857="http://www.filenet.com/ns/fnce/2006/11/ws/schema">
            <p857:ContentRequest cacheAllowed="1" id="1" startOffset="0">
                <p857:SourceSpecification classId="Document" itemIndex="0" objectId="{E408981D-FF67-4D91-B7A9-CEBEC4630AB0}" objectStore="myobjectstore" 
                serializationDuplicate="0" xsi:type="p857:ObjectSpecification"/>
                <p857:ElementSpecification elementSequenceNumber="0" itemIndex="0"/>
            </p857:ContentRequest>
        </p857:GetContentRequest>
    </soapenv:Body>
</soapenv:Envelope>

Response :

--A-B--MIME-BOUNDARY--27d99311536fa8c4-18606176189--Y-Z
Content-Transfer-Encoding: binary
Content-Type: application/xop+xml; type="application/soap+xml"; charset=UTF-8
Content-ID: 
<v0-27d99311536fa8c4-18606176189@mtom.p8ce.filenet.com>
    <?xml version="1.0" encoding="UTF-8"?>
    <e:Envelope xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:fn35="http://www.filenet.com/ns/fnce/2005/02/ws/schema" xmlns:fn40m="http://www.filenet.com/ns/fnce/2006/11/ws/MTOM/schema" xmlns:fn40="http://www.filenet.com/ns/fnce/2006/11/ws/schema" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">
        <e:Body>
            <GetContentResponse xmlns="http://www.filenet.com/ns/fnce/2006/11/ws/schema">
                <ContentResponse id="1" i:type="fn40:ContentElementResponse" retrievalName="test.pdf" totalSize="4586622" bufferedSize="1048576" continueFrom="offset=1048576;id={B3795692-DA06-468C-AEC9-523A3715455D};">
                    <SourceSpecification i:type="fn40:ObjectReference" classId="Document" objectId="{E408981D-FF67-4D91-B7A9-CEBEC4630AB0}" objectStore="MCIDEV"></SourceSpecification>
                    <ElementSpecification elementSequenceNumber="0"></ElementSpecification>
                    <Content i:type="fn40:InlineContent">
                        <Binary>
                            <xop:Include href="cid:v1-27d99311536fa8c4-18606176189@mtom.p8ce.filenet.com"></xop:Include>
                        </Binary>
                    </Content>
                </ContentResponse>
            </GetContentResponse>
        </e:Body>
    </e:Envelope>
--A-B--MIME-BOUNDARY--27d99311536fa8c4-18606176189--Y-Z
Content-Transfer-Encoding: binary
Content-Type: application/octet-stream
Content-Id: 
    <v1-27d99311536fa8c4-18606176189@mtom.p8ce.filenet.com>

%PDF-1.4
......
......
......
--A-B--MIME-BOUNDARY--27d99311536fa8c4-18606176189--Y-Z--

Solution

  • The problem was in filenet configuration :

    Inline Content Retrieval Limit default is 1 MB so that filenet webservice itself was returning 1 MB only of the file.

    Increasing the value fixed the issue, but unfortunately the maximum is 10 MB.

    https://www.ibm.com/docs/en/filenet-p8-platform/5.5.x?topic=engine-improving-content-uploads-downloads