Webservice-SOAP create document

Do you want to create a native client or integrate with third party applications: webservices are the solution.

Moderator: car031

kentorkskie
Posts: 1
Joined: Fri Feb 08, 2019 5:00 pm

Webservice-SOAP create document

Fri Feb 08, 2019 5:09 pm

I am able to integrate LD(8.2) with my custom application, the issue i have is with creating document with my custom application, the document is created successfully, but the infromation passed using name and stringValue of the attributes Parameter are not passed to the form.
I have attached a screen shot, i dont know if there is something i am during differently. the pdf version of the form is created successfully, but the stringValue are not passed to the form

public function createDocument(){

$authClient = new \SoapClient ('http://xx.x.xx.xxx:8080/services/Auth?wsdl' );
$session_id = $authClient->login (['username' => 'xxxx', 'password' => 'xxxxxxx']);


$formClient = new SoapClient ('http://10.1.13.250:8080/services/Form?wsdl');
$results = $formClient->createDocument(['sid'=>$session_id->return,'formId'=>3358365,
'doc'=>[
'fileName'=>'Kehinde Adedipe',
'creatorId'=>0,
'id'=>0,
'immutable'=>0,
'indexed'=>0,
'nature'=>0,
'pages'=>-1,
'published'=>1,
'publisherId'=>0,
'signed'=>0,
'stamped'=>0,
'status'=>0,
'exportStatus'=>1,
'fileSize'=>0,
'language'=>'en',
'folderId'=>3313774,
'attributes'=>[
['name'=>"surnamebio", 'stringValue'=>'Jesse', 'mandatory'=>0,'position'=>0,'type'=>0,'editor'=>0],
['name'=>"firstnamebio",'stringValue'=>'Ademola','mandatory'=>0,'position'=>2,'type'=>0, 'editor'=>1]
]

]
]);
Attachments
logical_doc.PNG
logical_doc.PNG (91.24 KiB) Viewed 217 times
agaspa
Posts: 663
Joined: Tue Apr 20, 2010 8:24 am

Re: Webservice-SOAP create document

Tue Feb 12, 2019 4:53 pm

Hi kentorkskie,
I tested the method with LD 8.1.1 and it seems to work correctly.

Keep in mind that in the doc array you must specify the templateId element
Without this element the system will not be able to find the template of the document and store the attribute values

See example in attachment
Br.
Alex
Attachments
Logicaldoc-PHP-Form-examples.zip
(1.72 KiB) Downloaded 9 times

Return to “Web Services”

Who is online

Users browsing this forum: No registered users and 1 guest