|
Posted by Captain Paralytic on June 10, 2008, 9:05 am
Please log in for more thread options
> I've had a nightmare at work. I have a simple app makes a simple SOAP
> call to a webservice. It all worked fine but when we tried to deploy
> it on the live site there appears to be some version issues. I get
> this error:
>
> Fail: Unknown protocol. Only http and https are allowed.
>
> To solve it I think it would just be easier to rewrite my existing PHP
> code to use NuSoap rather than what I am currently using. Can someone
> help me change this php code into a NuSoap version and tell me what
> I'd need to install on a centos box to make it work? Thanks in
> advance:
>
> <?php
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 try
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $app =3D new
> SoapClient("accessmanagerreportservice.wsdl") =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0;
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } catch (Exception $a)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 print "failed to read wsdl=
";
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $params =3D array('sessionKey'=3D>"blah" ,=
> 'reportName'=3D>"ClientSumm
> aryPerFirewall", 'parameters'=3D>"FirewallId=3D477;");
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 try
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $answer =3D $app->__soapCa=
ll("GenerateReport" =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0,
>
> array($params));
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 print "Success";
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } catch (Exception $err)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 print "Fail: " . $err->get=
Message();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
> ?>
A simple search for NuSoap in google suggests this resource:
http://www.phpbuilder.com/columns/kramberger20031226.php3?page=3D1
I'm amazed you missed it when you did your google search before
posting here.
|