Today I would like to tell how to raise the server 1c on linux debian 9 with the publication of web services.
What are 1s web services?
Web services is one of the platform mechanisms used for integration with other information systems. It is a means of supporting SOA (Service-Oriented Architecture), a service-oriented architecture that is a modern standard for integrating applications and information systems. In essence, this is the ability to create an html page with data, which, then, can be accessed by any other application and collected.
Pros - it works quickly (even with a sufficiently large amount of data), relatively convenient.
Cons - your 1s programmer will grumble at you a lot and for a long time, while he will write a web service for your database. The thing is very peculiar in writing.
I won’t tell how to write a
web service ... I’ll tell how to publish it on Linux from the server console, as well as a little about installing 1s server on Linux.
And so, we have debian 9 netinst, proceed:
Install PostgresPro (Please note that it is not free, and is distributed only as part of familiarizing yourself with the features):
Let's say postgresql listen to all addresses and not just localhost
Uncomment and change which addresses to listen to:
...
#listen_addresses = 'localhost'
...
On
...
listen_addresses = '*'
...
Next, let us authorize users from our network
Change:
# IPv4 local connections:
host all all 127.0.0.1/32 md5
on
host all all 192.168.188.0/24 md5
host all all 127.0.0.1/32 md5
You can read more about the various Postgres settings for 1s
here .
Next, we put 1s server.
We upload to the server the archive downloaded from the site 1c (in my case deb64_8_3_15_1534.tar.gz)
A couple more little things:
Now install Apache2
Through the administration console or through the client 1c, we create the database and fill our configuration ...
Now we publish the base:
go to the folder with 1s.
./webinst -publish -apache24 -wsdir Test -dir /var/www/test/ -connstr "Srvr=10.7.12.108;Ref=test;" -confPath /etc/apache2/apache2.conf
We climb into var / www / test / and look at what appeared there.
"
<? xml version = "1.0" encoding = "UTF-8"?>
<point xmlns = " v8.1c.ru/8.2/virtual-resource-system "
xmlns: xs = " www.w3.org/2001/XMLSchema "
xmlns: xsi = " www.w3.org/2001/XMLSchema-instance "
base = "/ Test"
ib = "Srvr = 192.168.188.150; Ref = Test;">
<standardOdata enable = "false"
reuseSessions = "autouse"
sessionMaxAge = "20"
poolSize = "10"
poolTimeout = "5" />
"
These are the schemes that are needed to start 1s web client ... now you can access our test database from the browser at the address “http: // ServerAddress / Test” (register is important! This is Linux) or specify the address “ http: // Server Address / Test ”, and the client will work with the published database.
BUT
And what about web services? (there are two of them in my test configuration: WebBuh for data exchange with accounting and toplog integration with the wms system of the same company).
Well, add a couple of lines to our vrd file ...
<? xml version = "1.0" encoding = "UTF-8"?>
<point xmlns = " v8.1c.ru/8.2/virtual-resource-system "
xmlns: xs = " www.w3.org/2001/XMLSchema "
xmlns: xsi = " www.w3.org/2001/XMLSchema-instance "
base = "/ TestWeb"
ib = "Srvr = IP_addres; Ref = TestWebServ">
<standardOdata enable = "false"
reuseSessions = "autouse"
sessionMaxAge = "20"
poolSize = "10"
poolTimeout = "5" />
# -
<point name="WebBuh" # -
alias="Web_buh.1cws" # Web_buh.1cws - -
enable="true" #
reuseSessions="autouse"
sessionMaxAge="20"
poolSize="10"
poolTimeout="5"/>
<point name="TopLog" #
alias="toplog.1cws" # toplog.1cws
enable="true"
reuseSessions="autouse"
sessionMaxAge="20"
poolSize="10"
poolTimeout="5"/>
save.
And now our web service is available at the address “http: //AddressServer/Test/Web_buh.1cws?”
Why did you have to do it with your hands?
Since our server does not have a graphical shell, running the configurator on it will fail, and, accordingly, publishing using standard tools. The remote configurator, which is on the client, does not publish web services on the server. Therefore, we have to edit the config manually according to the template described above.
Script to generate .vrd - thanks
TihonV