Category : web-services

To connect to an API I need to make a SOAP call. The documentation says you can make a call like beneath in SoapUI: <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <RelationCreate xmlns="https://Api.perfectview.nl"> <credentials> <ApiKey>APIKEY</ApiKey> <DatabaseId>DatabaseID</DatabaseId> <UserId>UserID</UserId> </credentials> <parentRelationId>guid</parentRelationId> <relationEntityTypeId>guid</relationEntityTypeId> <relationFieldValues> <PvFieldValueData> <Id>guid</Id> <Value>string</Value> </PvFieldValueData> <PvFieldValueData> <Id>guid</Id> <Value>string</Value> </PvFieldValueData> </relationFieldValues> <relationshipEntityTypeId>guid</relationshipEntityTypeId> </RelationCreate> </soap:Body> </soap:Envelope> The call I ..

Read more

<?php $url = parse_url($_SERVER[‘REQUEST_URI’], PHP_URL_PATH); $url_array = explode("/", $url); $action = end($url_array); switch ($action) { case "login": login(); break; case "register": register(); break; } ?> Here I need to remove the .php extension from my URL like I have to type like https://example.com/user.php/login for login page and https://example.com/user.php/register for register page. But I need the ..

Read more

So im trying to insert value into my database but i get an error and i dont know the solution. Postman This is my error log: PDOExceptionrnCode: 42000rnMessage: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the ..

Read more

I’m using a REST API and their sample code is in PHP. I don’t know anything about PHP. I already write a HttpClient code but the response is not what I expected. Here is the PHP code: $data = array("merchant_id" => "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "amount" => 1000, "callback_url" => "http://www.yoursite.com/verify.php", "description" => "خرید تست", "metadata" => [ ..

Read more

$ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"webservcieLink"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "select * from table_name"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $server_output = curl_exec($ch); $xml = new SimpleXMLElement($server_output); $xml = json_decode($xml, true); curl_close ($ch); Error I am getting is : Warning: SimpleXMLElement::__construct(): Entity: line 28: parser error : AttValue: " or ‘ expected Sourc..

Read more