Hello All,

I would like to add a new record in the bpm'online cotact section. Using webservice ntegration so that I have created on console application in visual studio 2012, I was getting the error like "Terrasoft namespace or name not found and The type or namespace name script does not exist". Can anyone please provide me the way to add these two references in visual studio.

File attachments

Like

2 comments

Dear Amol,

In case you have your system deployed on-side, please, follow the links in the article to download the needed namespaces:

  • Terrasoft.Core.dll is a main class library of the application server kernel. Can be found by the following path: [Directory with the installed application]\Terrasoft.WebApp\bin\Terrasoft.Core.dll
  • Terrasoft.Nui.ServiceModel.dll class library the application services. Can be found by the following path: [Directory with the application installed]\Terrasoft.WebApp\bin\Terrasoft.Nui.ServiceModel.dll.

https://academy.bpmonline.com/documents/technic-sdk/7-8/dataservice-adding-records

However, in case your application is in cloud, please, contact bpm'online support team for the neccessary .dll files. 

ok thanx

Show all comments

Hello All,

I would like to create and use webservices for integration BPM'Online with any external application, so for that i was going with authentication service application in bpm'online academy and I have created the client code in visual studio 2012 using C#. I have provided my own login details of BPM'Online to the authentication service fuction in client code it shows me result as true its right, but when i have passed correct username and wrong password it again showing the same result, can anybody provide a way to do it correctly. It will be helpful for me to move further. And when i hit the "http://123362-demo04.bpmonline.com/ServiceModel/AuthService.svc/Login" url it shows me 

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

Requested URL: /ServiceModel/AuthService.svc/Login

File attachments

Like

1 comments

Dear Amol,

Please use https instead of http. The site will be accessible then. 

Best regards,

Diana Adams

Show all comments

Hi guys:

I have problem when call  authentication service (AuthService.svc) from other Server with PHP.The call return a new login form (with user and pass) instead of the creation of cookie auth.

Please your help... Thanks a lot

Manuel

The code is:

$url = "http://***:82/0/ServiceModel/AuthService.svc/Login";
$post = "UserName=***r&UserPassword=***";
print_r($url);
print_r($post );

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url );
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post );
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
echo $result;

?>

Like

4 comments

Try this.



<?php

    // Auth

    $url = 'https://some-site.bpmonline.com/ServiceModel/AuthService.svc/Login';

    $requestData["UserName"] = "MyLogin";

    $requestData["UserPassword"] = "MyPass";

    $jcres = json_encode($requestData);

    $ch = curl_init($url);

    curl_setopt($ch, CURLOPT_COOKIEJAR,'cookie.txt');

    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");

    curl_setopt($ch, CURLOPT_POSTFIELDS, $jcres);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    curl_setopt($ch, CURLOPT_HTTPHEADER, array(

    'Content-Type: application/json',

    'Content-Length: ' . strlen($jcres))

    );

    $result = curl_exec($ch);

    curl_close($ch);

    

    // Call something

    $urlGetCardInfo = 'https://some-site.bpmonline.com/0/ServiceModel/EntityDataService.svc/Le…';

    $ch = curl_init($urlGetCardInfo);

    curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');

    curl_setopt($ch, CURLOPT_COOKIEJAR,'cookie.txt');

    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    $result = curl_exec($ch);

    curl_close($ch);

    echo "";

    echo var_dump($result);

?>

Dear Manuel,

We do not provide support regarding PHP scripts, since the main two programming languages used in bpm'online are JavaScript and C#. However, please see the example below. which can help you call the authentication service from external resources:

<?php
 // Auth
 $url = 'https://demo.bpmonline.com/ServiceModel/AuthService.svc/Login';
 $requestData["UserName"] = "Login";
 $requestData["UserPassword"] = "password";
 $jcres = json_encode($requestData);
 $ch = curl_init($url);
 curl_setopt($ch, CURLOPT_COOKIEJAR,'cookie.txt');
 curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
 curl_setopt($ch, CURLOPT_POSTFIELDS, $jcres);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 curl_setopt($ch, CURLOPT_HTTPHEADER, array(
 'Content-Type: application/json',
 'Content-Length: ' . strlen($jcres))
 );
 $result = curl_exec($ch);
 curl_close($ch);
 
 // Call something
 $urlGetCardInfo = 'https://demo.bpmonline.com/0/ServiceModel/EntityDataService.svc/LeadCollection?$select=';
 $ch = curl_init($urlGetCardInfo);
 curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
 curl_setopt($ch, CURLOPT_COOKIEJAR,'cookie.txt');
 curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 $result = curl_exec($ch);
 curl_close($ch);
 echo "";
 echo var_dump($result);
?>

 

Also, here is a supporting matterial regarding external requests to bpm'online:

https://academy.bpmonline.com/documents/technic-sdk/7-8/authenticating-external-requests-bpmonline-web-services

https://academy.bpmonline.com/documents/technic-sdk/7-8/working-bpmonline-objects-over-odata-protocol-using-http-request

Have a nice day!

{"Code":0,"Message":"","Exception":null,"PasswordChangeUrl":null,"RedirectUrl":null} is returned for success, and the cookies are created.  It does seem a success message should be created, instead of an empty string. very miss leading.  I got these results using postman.

I'm working on classings to connect to bpm'online. One of those classes I developed in PHP.

I have published a repository on Github with the source code.

https://github.com/idevol/bpmonline-dataservice-connectors

Show all comments