D
D
Dos7712016-05-29 18:25:29
Google
Dos771, 2016-05-29 18:25:29

How to implement SOAP client on Bitrix?

Help people ))
I have a working SOAP client code in PHP, now I need to convert this code into a Bitrix SOAP client.

<?php
$client = new SoapClient("http://rates.kazpost.kz/postratesws/postratesws.wsdl");
$result = $client->GetPostRate(
    [
        "MailInfo" => [
            "Product" => "4",
            "MailCat" => "1",
            "SendMethod" => "1",
            "Weight" => "14000",
            "From" => "14",
            "To" => "05"
        ]
    ]
);
echo $result->PostRate;
?>

<?
function TestComponent() 
{
    $client = new CSOAPClient("ws.strikeiron.com", "/relauto/iplookup/DNS");
    $request = new CSOAPRequest( "DNSLookup", "http://tempuri.org/");
    $request->addSOAPHeader( "LicenseInfo xmlns=\"http://ws.strikeiron.com\"",
            array("UnregisteredUser" => array( "EmailAddress" => "[email protected]" ))
        );
    $request->addParameter("server", "www.yandex.ru");
    $response = $client->send( $request );
        
    echo "SOAPRequest: ".htmlspecialchars($client->getRawRequest());
    echo "SOAPResponse: ".htmlspecialchars($client->getRawResponse());
}
?>

First, this is a simple code that is implemented on a PHP notepad, I need to convert this code as Bitrix.
The second example, which was created on Bitrix SOAP, copied information from the Bitrix documentation.
I hope it was clear, if it is not clear, then I apologize, my Russian language is rather weak)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question