function _fillpdf_xmlrpc_request in FillPDF 6
Same name and namespace in other branches
- 7.2 fillpdf.module \_fillpdf_xmlrpc_request()
- 7 fillpdf.module \_fillpdf_xmlrpc_request()
2 calls to _fillpdf_xmlrpc_request()
- fillpdf_merge_pdf in ./
fillpdf.module - Constructs a page from scratch (pdf content-type) and sends it to the browser or saves it, depending on if a custom path is configured or not.
- fillpdf_parse_pdf in ./
fillpdf.module - This function generates the form fields from the specified PDF. It (1) sends a request to the iText servlet to parse the specified PDF, (2) iText returns an XML response with fields-mappings, this module parses the XML response & contsructs the…
File
- ./
fillpdf.module, line 658 - Allows mappings of PDFs to site content
Code
function _fillpdf_xmlrpc_request($url, $method) {
$args = func_get_args();
$result = call_user_func_array('xmlrpc', $args);
$ret = new stdClass();
if (isset($result['error'])) {
drupal_set_message($result['error'], 'error');
$ret->error = true;
}
else {
if ($result == false || xmlrpc_error()) {
$error = xmlrpc_error();
$ret->error = true;
drupal_set_message("There was a problem contacting the Fill PDF service.\n It maybe be down, or you may not have internet access. [ERROR {$error->code}: {$error->message}]", 'error');
}
else {
$ret->data = $result['data'];
$ret->error = false;
}
}
return $ret;
}