How to create in PHP using "nusoap" a Web Service to work with the TR-069 protocol (CWMP)

Asked

Viewed 15 times

-3

I need help to build a web service type ACS, which communicates with the customers CPE sent auto configuration information.

The client’s CPE (Router/Modem) consumes this information from the Web Service and autoconfigures.

The protocol is TR-069(CWMP).

I am currently testing the lib "nusoap" in PHP, but I could not make it work.

If anyone can give me a light thank you.

My current code is this:

<?php
require_once('lib/nusoap.php');


// Define path to server application
$serverpath = 'http://192.168.0.110/Server_Soap/nusoap.php?wsdl';


// Create client object
$SOAPClient =  new soapclient($serverpath);
/***************************************************/

$SOAPACTION  = "http://192.168.0.110/Server_Soap/nusoap.php?wsdl";


$BODY = '
<soap-env:Envelope 
     
     xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
     xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:cwmp="urn:dslforum-org:cwmp-1-0">

    <soap-env:Header>
        <cwmp:ID soap-env:mustUnderstand="1">0</cwmp:ID>
    </soap-env:Header> 

    <soap-env:Body>
        <cwmp:GetParameterNames>
            <ParameterPath>Object.</ParameterPath>
                <NextLevel>0</NextLevel>
        </cwmp:GetParameterNames>
    </soap-env:Body>
</soap-env:Envelope>
';

$SOAPMESSAGE =  $SOAPClient->serializeEnvelope($BODY, $HEADER, array(), 'document', 'literal');
$RESULT = $SOAPClient->send($SOAPMESSAGE, $SOAPACTION);
print_r($RESULT);

echo '<h2>Request</h2><pre>' . htmlspecialchars($SOAPClient->request, ENT_QUOTES) . '</pre>';
// echo '<h2>Response</h2><pre>' . htmlspecialchars($SOAPClient->response, ENT_QUOTES) . '</pre>';
// echo '<h2>Debug</h2><pre>' . htmlspecialchars($SOAPClient->debug_str, ENT_QUOTES) . '</pre>';
  • Please edit the question to limit it to a specific problem with sufficient detail to identify an appropriate answer.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.