Click here to get back home

Convert Soap Call to NuSoap Call

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Convert Soap Call to NuSoap Call Philluminati 06-10-2008
Get Chitika Premium
Posted by Philluminati on June 10, 2008, 8:17 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

try
{
$app = new
SoapClient("accessmanagerreportservice.wsdl")
;

} catch (Exception $a)
{
print "failed to read wsdl";
}

$params = array('sessionKey'=>"blah" ,
'reportName'=>"ClientSumm
aryPerFirewall", 'parameters'=>"FirewallId=477;");
try
{
$answer = $app-
>__soapCall("GenerateReport" ,
array($params));
print "Success";

} catch (Exception $err)
{
print "Fail: " . $err->getMessage();
}
?>

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.

Similar ThreadsPosted
Making Webservice call (SOAP Client) Call Using PHP. July 5, 2007, 9:13 am
Trying to call SOAP Function August 4, 2008, 3:15 pm
SOAP Call with multiple occurences of an element October 2, 2008, 2:09 pm
Call .NET Webservice with PHP -> Convert Data of Dataset to array July 6, 2006, 4:11 am
nuSOAP/SOAP extension complex type problems February 8, 2008, 5:07 am
Call to undefined Call to undefined function: imagettftext() July 5, 2005, 1:17 am
PhP call on conditions July 16, 2005, 6:49 am
HELP! PHP/MySQL Call... July 27, 2005, 9:08 pm
PHP 4.2 Needs To Call Wget October 6, 2005, 5:30 pm
call to method November 28, 2005, 3:56 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap