Mailinglisten-Archive |
Hallo Liste,
ich nutze den nativen SoapClient von PHP5. Beim erzeugen eines Requests
muss ich einem node (im speziellen fall der funktion) eine attribut
hinzufügen:
so erzeugt es mir soap:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:ns1="urn:ietf:params:xml:ns:netconf:base:1.0">
<env:Body>
<ns1:rpc>
<ns1:get-config>
<ns1:source>
<ns1:running/>
</ns1:source>
</ns1:get-config>
</ns1:rpc>
</env:Body>
</env:Envelope>
und so sollte es aussehen:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:urn="urn:ietf:params:xml:ns:netconf:base:1.0">
<soap:Header/>
<soap:Body>
<urn:rpc message-id="?">
<urn:get-config>
<urn:source>
<urn:running/>
</urn:source>
</urn:get-config>
</urn:rpc>
</soap:Body>
</soap:Envelope>
mal abgesehen davon das statt soap:Envelope env:Envelope dasteht ...
wie bekomme ich aber das message-id="?" da rein?
php:
$running['running'] = new SOAPVar(null, SOAP_ENC_OBJECT, null,null,null,
$client->ns);
$source['source'] = new SOAPVar($running, SOAP_ENC_OBJECT,
null,null,null, $client->ns);
$getconfig['get-config'] = new SOAPVar($source, SOAP_ENC_OBJECT,
null,null,null, $client->ns);
$var = new SOAPVar($getconfig, SOAP_ENC_OBJECT);
$request['parameters'] = $var;
$client->__soapCall($function, $request);
ich hoffe ihr könnt mir helfen
php::bar PHP Wiki - Listenarchive