<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
We are using the nuSOAP php library to access the Sipwise's Soap
side. But you have to compile the curl module into the php to access
the https url.<br>
<br>
2012.05.23. 15:11 keltezéssel, Juan José Ivars írta:
<blockquote
cite="mid:CAO=uDhqZWhibr1NKts-WFEofpGpD-UR1V8HZ_uz7Ff-5dnsq-w@mail.gmail.com"
type="cite">Hello everybody
<div><br>
</div>
<div><br>
</div>
<div>Could you post an example code in php for accessing XML-RPC
in SipWise?</div>
<div><br>
</div>
<div>I am trying with that:</div>
<div>
<div>$strRequest = utf8_encode(‘</div>
<div>
<?xml version="1.0" encoding="UTF-8"?></div>
<div><methodCall></div>
<div>
<methodName>XMLRPC.Provisioning.get_voip_account_subscriber</methodName></div>
<div> <params><param></div>
<div> <value><struct></div>
<div> <member></div>
<div> <name>authentication</name></div>
<div> <value><struct></div>
<div> <member></div>
<div> <name>type</name></div>
<div>
<value><string>admin</string></value></div>
<div> </member></div>
<div> <member></div>
<div> <name>username</name></div>
<div>
<value><string>administrator</string></value></div>
<div> </member></div>
<div> <member></div>
<div> <name>password</name></div>
<div>
<value><string>administrator</string></value></div>
<div> </member></div>
<div> </struct></value></div>
<div> </member></div>
<div> <member></div>
<div> <name>parameters</name></div>
<div> <value><struct></div>
<div> <member></div>
<div>
<name>id</name></div>
<div>
<value><int>6</int></value></div>
<div> </member></div>
<div> <member></div>
<div> <name>username</name></div>
<div>
<value><string>nobody</string></value></div>
<div> </member></div>
<div> <member></div>
<div> <name>domain</name></div>
<div> <value><string><a
moz-do-not-send="true" href="http://example.com">example.com</a></string></value></div>
<div> </member></div>
<div> </struct></value></div>
<div> </member></div>
<div> </struct></value></div>
<div> </param></params></div>
<div></methodCall></div>
<div>/>‘);</div>
</div>
<div><br>
</div>
<div>
<div>$url = "<a moz-do-not-send="true"
href="https://XX.YY.ZZ.FF:2443/XMLRPC">https://XX.YY.ZZ.FF:2443/XMLRPC</a>";</div>
<div><br>
</div>
<div>$resultado = httpsPost($url, $strRequest);</div>
<div><br>
</div>
<div>var_dump($resultado);</div>
<div><br>
</div>
<div>function httpsPost($Url, $strRequest)</div>
<div>{</div>
<div>$ch=curl_init();</div>
<div>
curl_setopt($ch, CURLOPT_URL, $url);</div>
<div>curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);</div>
<div>curl_setopt($ch, CURLOPT_POST, 1) ;</div>
<div>curl_setopt($ch, CURLOPT_POSTFIELDS, $strRequest);</div>
<div>curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);</div>
<div>curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);</div>
<div>$result = curl_exec($ch);</div>
<div>curl_close($ch);</div>
<div>return $result;</div>
<div>}</div>
</div>
<div><br>
</div>
<div>Best regards.</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Spce-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>
<a class="moz-txt-link-freetext" href="http://lists.sipwise.com/listinfo/spce-user">http://lists.sipwise.com/listinfo/spce-user</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Üdvözlettel,
Szabó János
HFC-Network Kft
E-mail: <a class="moz-txt-link-abbreviated" href="mailto:szabojanos@hfcnetwork.hu">szabojanos@hfcnetwork.hu</a>
Telefon: +36-20/344-4449</pre>
</body>
</html>