Hi,<div><br></div><div>Not, this don't work. I try with the code attached.</div><div>I use the xml soap instead of the arrays.</div><div>I think all is correct, but I have this error, and I don't have idea why.</div>
<div><span class="Apple-style-span" style="font-family:Times;font-size:medium"><pre>Array
(
[faultcode] => soap:Server
[faultstring] => Can't use string ("666666666") as a HASH ref while "strict refs" in use at /usr/share/perl5/Sipwise/Provisioning/Billing.pm line 1009.
)</pre></span></div><div>This is the code using nusoap</div><div><br></div><div><?php</div><div><br></div><div><div>require_once('lib/nusoap.php');</div><div><br></div><div>$useCURL = '0';</div><div><br>
</div><div>$client = new nusoap_client("https://xx.yy.zz.aa:nnnn/SOAP/Provisioning.wsdl", true, "", "", "USER", "PASSWORD");</div><div>$client ->setCredentials("USER","PASSWORD");</div>
<div><br></div><div>$err = $client->getError();</div><div>if ($err) {</div><div> echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';</div><div> echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';</div>
<div> exit();</div><div>}</div><div><br></div><div>$client->setUseCurl($useCURL);</div><div>$client->useHTTPPersistentConnection();</div><div><br></div><div><br></div><div>// CREATE ACCOUNT</div><div>$params = '</div>
<div> <authentication></div><div> <type xsi:type="xsd:string">admin</type></div><div> <username xsi:type="xsd:string">user</username></div><div>
<password xsi:type="xsd:string">password</password></div><div> </authentication></div><div> <parameters></div><div> <data></div><div> <billing_profile xsi:type="xsd:string">default</billing_profile></div>
<div> <status xsi:type="xsd:string">active</status></div><div> <external_id xsi:type="xsd:string">44444444</external_id></div><div> <subscribers SOAP-ENC:arrayType="xsd:SubscriberWriteArray[]"></div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span> <username xsi:type="xsd:string">666666666</username></div><div> <span class="Apple-tab-span" style="white-space:pre"> </span> <domain xsi:type="xsd:string">xx.yy.zz.aa</domain></div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span> <password xsi:type="xsd:string">2222222</password></div><div> </subscribers><span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div> </data></div><div> </parameters></div><div>';</div><div><br></div><div><span class="Apple-style-span">$result = $client->call('create_voip_account', $params, 'https://xx.yy.zz.aa:nnnn/SOAP', 'https://</span>xx.yy.zz.aa:nnnn<span class="Apple-style-span">/SOAP');</span></div>
<div>echo '<h2>Fault</h2><pre>'; print_r($result); echo '</pre>';</div><div><br></div><div>if ($client->fault) {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>echo '<h2>Fault</h2><pre>'; print_r($result); echo '</pre>';</div>
<div>} else {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$err = $client->getError();</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>if ($err) {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>echo '<h2>Error</h2><pre>' . $err . '</pre>';</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>} else {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>';</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div>}</div><div><br></div><div>echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';</div>
<div>echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';</div><div>echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';</div>
<div><br></div><div><br></div></div><div><br></div><div><br><br><div class="gmail_quote">2012/6/12 Skyler <span dir="ltr"><<a href="mailto:skchopperguy@gmail.com" target="_blank">skchopperguy@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div><br></div><div> Did this work for you?</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div>
<span class="HOEnZb"><font color="#888888">Skyler</font></span><div><div class="h5"><br><br><div class="gmail_quote">On Thu, Jun 7, 2012 at 1:52 PM, Alejandro Rodriguez <span dir="ltr"><<a href="mailto:alejandro@beeztel.com" target="_blank">alejandro@beeztel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Perfect.</p>
<p>I will try. </p>
<p>Regards</p>
<div class="gmail_quote">El 07/06/2012 21:50, "Skyler" <<a href="mailto:skchopperguy@gmail.com" target="_blank">skchopperguy@gmail.com</a>> escribió:<div><div><br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<div><br></div><div> Don't forget to reply-all so everyone can help or know solutions ;)<br><br><div class="gmail_quote">On Thu, Jun 7, 2012 at 1:22 PM, Alejandro Rodriguez <span dir="ltr"><<a href="mailto:alejandro@beeztel.com" target="_blank">alejandro@beeztel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Skyler,<div><br></div><div>With nusoap, all is correct and easy. (I don't think on use this instead of php soap)<div>
<br></div><div>I'm not sure if you can help me with a new question. Create the structure for create_voip_account. I can't create the correct structure.</div>
<div>I receive this message "<span style="font-family:monospace;white-space:pre-wrap;font-size:medium">need a billing profile for the new account"</span></div><div><span style="font-family:monospace;white-space:pre-wrap;font-size:medium"><br>
</span></div></div></blockquote><div><br></div><div> I have this same trouble but not had time to further investigate. I suspect that the 'billing_profile' may require the ID number assigned in the database to be passed where if 'Default Billing Profile' has ID of '3' then pass the '3'.</div>
<div><br></div><div>...just guessing, maybe you can help to confirm this for everyone? :)</div><div><br></div><div>Skyler</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><span style="font-family:monospace;white-space:pre-wrap;font-size:medium">
</span></div><div>Thanks.</div><div><br></div><div><div>$params = array(</div><div> 'authentication' => array('type' => 'admin', 'username' => 'username', 'password' => 'password'),</div>
<div> 'parameters' => array( 'data' => array (</div><div> <span style="white-space:pre-wrap"> </span>'billing_profile' => 'Default Billing Profile',</div>
<div> <span style="white-space:pre-wrap"> </span>'status' => 'active',</div><div> <span style="white-space:pre-wrap"> </span>'external_id' => '44444444',</div>
<div> <span style="white-space:pre-wrap"> </span>'subscribers' => array(</div><div> <span style="white-space:pre-wrap"> </span>'username' => '44444444',</div>
<div> <span style="white-space:pre-wrap"> </span>'domain' => '94.23.232.121',</div><div> <span style="white-space:pre-wrap"> </span>'password' => '2222222'</div>
<div> <span style="white-space:pre-wrap"> </span>)</div><div> <span style="white-space:pre-wrap"> </span>)</div><div> <span style="white-space:pre-wrap"> </span>) </div>
<div> <span style="white-space:pre-wrap"> </span>);</div></div><div><div><div><br></div><div><br></div><div><br></div><div><br><div class="gmail_quote">2012/6/7 Alejandro Rodriguez <span dir="ltr"><<a href="mailto:alejandro@beeztel.com" target="_blank">alejandro@beeztel.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Thanks a lot nusoap :)</p>
<div class="gmail_quote">El 07/06/2012 19:45, "Skyler" <<a href="mailto:skchopperguy@gmail.com" target="_blank">skchopperguy@gmail.com</a>> escribió:<div><div><br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<div><br></div><div> See attached php/soap connection example. This is from a very helpful person on the list some months ago. Maybe it will assist your problem ;)</div><div><br></div><div>Skyler<br><br><div class="gmail_quote">
On Thu, Jun 7, 2012 at 6:47 AM, Alejandro Rodriguez <span dir="ltr"><<a href="mailto:alejandro@beeztel.com" target="_blank">alejandro@beeztel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello, <br><br>I'm trying to use XML-RPC and SOAP with sipwise. But I cant connect with the server with XML-RPC and with SOAP versión everytime I get the message "SOAP-ERROR: Parsing Schema: unexpected in complexType"<br>
<br>Please have you some example in php to usu XML-RPC or with SOAP.<br><br><br>This is my php for load the wsdl in SOAP.<br><br>try<br>{<br>$client = new SoapClient("<a href="https://ipserver:2443/SOAP/Provisioning.wsdl" target="_blank">https://ipserver:2443/SOAP/Provisioning.wsdl</a>",array('login' => "login", 'password' => "password"));<br>
<br>} catch ( SoapFault $fault ) {<br>echo '<pre>';<br>echo var_dump($fault) ;<br>echo '</pre>';<br>exit ;<br>}<br><br><br>Regards<span><font color="#888888"><br>Alejandro<br>
</font></span><br>_______________________________________________<br>
Spce-user mailing list<br>
<a href="mailto:Spce-user@lists.sipwise.com" target="_blank">Spce-user@lists.sipwise.com</a><br>
<a href="http://lists.sipwise.com/listinfo/spce-user" target="_blank">http://lists.sipwise.com/listinfo/spce-user</a><br>
<br></blockquote></div><br></div>
</blockquote></div></div></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>
</blockquote></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>