[Spce-user] Connecting to PORT 2443
Kevin Masse
kmasse at questblue.com
Wed Jan 16 08:18:53 EST 2013
Jon, thank you for all your responses. I wanted to follow up with you on exactly how we resolved our connectivity issue with the Provisioning.wsdl
In addition to the using NUSOAP as described below we have properly placed our https: Certificate from a trusted source so it is no longer self-signed.
Follow the directions in the SIPWISE manual for correcting the path to the certificates.
Locate 10.3. SSL certificates in the manual and complete step by step instructions.
Corrected how we are using the NUSOAP client and configuration.
** Things to remember: oss.log is an excellent way to see exactly what was going wrong. Thank you for the suggestion.
SERVER A = Our management server portal (CentOS6)
SERVER B = SIPWISE (Standard Installation)
<?php
require_once('/PATH-TO-NUSOAP-nusoap/lib/nusoap.php'); <-- I had to get the SOAP library in place on SERVER A for NUSOAP //--not the yum install php-soap
// Create the client instance
$client = new nusoap_client("https://SERVERB:2443/SOAP/Provisioning.wsdl", true);
//$client->soap_defencoding = 'UTF-8'; // We had noticed the client defaults to something else. Doesn't seem to effect either way?
$client->setCredentials("******","*******","basic"); <-- The Login and Pass for the SOAP connection - Username and pass on PORT 2443
// Call the SOAP method
$job = array('authentication' => array('type' => 'admin', 'username' => 'USERNAME-ON-PORT-1443', 'password' => 'PASSWORD-ON-PORT-1443'),'parameters' => array('username' => 'Subscriber-NAME-HERE', 'domain' => 'SIPWISE-DOMAIN-subscriber-is-on'));
$result = $client->call('get_subscriber_preferences',$job); <--This is just a test pull of information for proof of concept, nothing really for production use.
// Check for a fault
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
}
else
{
// Check for errors
$err = $client->getError();
if ($err)
{
// Display the error
echo '<h2>Error</h2><pre>' . $err . '</pre>';
}
else
{
// Display the result
echo '<h2>Result</h2><pre>';
print_r($result);
echo '</pre>';
}
}
?>
That is all,
Thanks again for all who responded.
Kevin
-----Original Message-----
From: spce-user-bounces at lists.sipwise.com [mailto:spce-user-bounces at lists.sipwise.com] On Behalf Of Jon Bonilla (Manwe)
Sent: Monday, January 14, 2013 3:09 PM
To: spce-user at lists.sipwise.com
Subject: Re: [Spce-user] Connecting to PORT 2443
El Mon, 14 Jan 2013 14:56:02 -0500
"Kevin Masse" <kmasse at questblue.com> escribió:
> Thanks for the reply, it was being sent in https:// but we think the
> security cert being self-signed was the issue.
>
> I am working on getting a proper cert on the sipwise server. We have
> a *Wildcard cert account with Godaddy so I just need to follow some
> instructions on getting it on this server.
>
> <?php
>
> $params = array(
> 'authentication' => array('type' => 'webuser', 'username' =>
> 'UNAME******', 'password' => 'U-PASS*****') );
>
> $client = new
> SoapClient("https://<SERVER>:2443/SOAP/Provisioning.wsdl",
> $params);
>
>
> print_r($client->__getFunctions());
> ?>
>
>
> The https:// was there but we are going to remove the security warning
> error and see if that helps.
>
> //OR//
>
> Do you think the cert warning is not the issue?
>
>
There were a couple of examples in the list regarding the usage of Nusoap as soap client. php-soap lib wasn't recommended but I don't remember the reason.
Attaching a sample I've found. No warranties
More information about the Spce-user
mailing list