Answer the question
In order to leave comments, you need to log in
How to connect the SOAP XML API booking service to a wordpress site?
There is a website on WordPress http://dream.advertising
design.rf The layout is almost finished, you need to connect the booking service to search for yachts. There is a paid period of this service, there is their documentation, but it is not possible to connect.
I've never dealt with this problem before, I really need help.
service www.booking-manager.com
documentation https://support.booking-manager.com/hc/en-us/artic...
xml file https://www.booking-manager.com/cbm_web_service2/s..
If I understood correctly, then the connection method is on pages 50 and 51 .
When I try to connect, in the first case, I get the Bad Request
Your browser sent a request that this server could not understand page.
Apache/2.4.25 (Debian) Server at www.booking-manager.com Port 443
in the second one gives an error on this line if (isset($result >out))
How to connect booking service via SOAP XML API to wordpress site?
Answer the question
In order to leave comments, you need to log in
The problem here is that your understanding of the essence of what needs to be done is at odds with the real state of affairs.
Let's put it this way: “connecting a booking service” seems like a one-two task to you: they have a certain WSDL, and you have WordPress, so what would you include in WordPress so that all that information from that site would be beautifully displayed on your page .
SOAP API is an interface that allows you to receive data or logical portions of it. The order in which the SOAP API methods are called, the processing of information, the construction of call logic and the assembly of this data should be handled by you, not WordPress - that is, you need to write some kind of server script that will communicate with the SOAP API, calling methods in the desired one, and in some measure defined by the logic of the service, order.
Those. The SOAP API does not allow you to get some correct data set along with logic in one sitting - this is an interaction that is based on collecting data from a form located on your site, compiling a request in SOAP format, receiving data in the response, if necessary, calling the next SOAP API method(s), processing the response, and substituting the structured data from the response into the same HTML of your page.
Let's say your site visitor wants to get a list of available yachts that meet the conditions (specified by him in the search form on the site) - the client is looking for a yacht in Cyprus, on July 15, for 4 people, price 500-800$, with a coxswain , plus some additional options. After pressing the symbolic button "Search", the data from the form is transferred to a certain server script, which describes the logic of interaction with the SOAP API.
Next, there will be an approximate and possible description of the logic (for details, see the documentation) - how it might look.
Everything above is an approximate scenario, of course. If you look closely at the available methods (they are all described in the documentation), you will get the idea from all this - methods are logically complete units for obtaining / entering information. These are logical blocks that you call in the order that suits your logic - this is the meaning of this kind of API: there is a country - see if there is one in the database, if there is a country in the list of served - then which ports, if there are ports - then what yachts are generally there, if there are yachts, then we look to see if they satisfy the characteristics specified by the user, display them on the page as a list, the user selects detailed information - we take detailed information, display it, the user starts the process - we call the methods of reservation and payment, etc. It all depends on your business logic. Oh sure,
So there is no simple API integration with WordPress here - in order to “throw up” the business logic with “one click”. This is not only layout, but the program logic of multi-step interaction with the user, plus display on the page.
POST /cbm_web_service2/services/CBM HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
Content-Length: 352
Host: www.booking-manager.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cbm="http://cbm.mmk.com">
<soapenv:Header/>
<soapenv:Body>
<cbm:getCompanies>
<cbm:in0>1000</cbm:in0>
<cbm:in1>username</cbm:in1>
<cbm:in2>password</cbm:in2>
</cbm:getCompanies>
</soapenv:Body>
</soapenv:Envelope>
HTTP/1.1 500 Internal Server Error
Date: Mon, 01 Jul 2019 06:58:23 GMT
Server: Apache/2.4.25 (Debian)
Content-Type: text/xml;charset=UTF-8
Connection: close
Transfer-Encoding: chunked
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>XML disabled for company 1000</faultstring>
<detail>
<errorcode>-1</errorcode>
<errormessage>XML disabled for company 1000</errormessage>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question