Avz Vicky
Avz Vicky

Reputation: 11

How to implement OCPP protocol with SOAP in php?

I need to integrate the OCPP connection with SOAP in php. I found a lot of examples with OCPP & JSON, but nothing with OCPP & SOAP. Can anyone please share few examples if possible? Thanks!

Upvotes: 0

Views: 1401

Answers (1)

Lucaele
Lucaele

Reputation: 39

Recommend use Json instead of SOAP. Json is most light and more fast.

But if you want to use SOAP with PHP:

$client = new SoapClient($wsdl_path, array(
        'soap_version' => SOAP_1_2,
        'connection_timeout' => 8,
        'cache_wsdl' => WSDL_CACHE_NONE,
        'trace' => 1
    )
);

then

$call = $client->remoteStartTransaction(array(
        'connectorId' => $connectorId,
        'idTag' => $idTag
    )
);

Upvotes: 0

Related Questions