Error parsing response
Following error occurs when signing a PDF document via /esign/advancedly_signed_documents:
"hydra:title": "An error occurred", "hydra:description": "Missing root ID: root.message@cxf.apache.org",
The cause of this is, that the MIME message in the returned webservice response cannot be parsed.
We are currently using PDF-AS version 4.2.0.
fixupHeader gets following data (note the trailing newline):
'
--uuid:38ef08fe-dc87-4186-bfe9-c449eabc3348
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:signSingleResponse xmlns:ns1="http://ws.api.pdfas.egiz.gv.at/"><signResponse><requestID>d5a07e61-3b65-4ff1-a2f6-d8242483bab3</requestID><signedPDF><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:cc35f5d2-d855-49c4-843b-fd6b8eee7dec-5@cxf.apache.org"/></signedPDF><verificationResponse><certificateCode>99</certificateCode><signerCertificate><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:cc35f5d2-d855-49c4-843b-fd6b8eee7dec-6@cxf.apache.org"/></signerCertificate><valueCode>0</valueCode></verificationResponse></signResponse></ns1:signSingleResponse></soap:Body></soap:Envelope>
--uuid:38ef08fe-dc87-4186-bfe9-c449eabc3348
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <cc35f5d2-d855-49c4-843b-fd6b8eee7dec-5@cxf.apache.org>
%PDF-1.6
%����
LONG PDF DATA
--uuid:38ef08fe-dc87-4186-bfe9-c449eabc3348--'
From this data it can't extract the boundary (gets an empty value).
I fixed it in function SoapResponseParser::fixupHeader like this:
$boundary = $this->findBoundary(trim($inputData));
Edited by Guthy, Peter