Click here to get back home

my wsdl code

 HomeNewsGroups | Search
 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
my wsdl code Peter 11-23-2008
Posted by Peter on November 23, 2008, 12:01 am
Please log in for more thread options
$wsdl =
"http://webservice1.petersoft.com/WebServiceHelper/service.php?class=testSoapServer&wsdl";
echo "<strong>WSDL file:</strong> ".$wsdl."<br>\n";
$options = Array('actor' =>'http://webservice1.petersoft.com',
                                 'trace' => true);
$client = new SoapClient($wsdl, array('trace'=>true));
echo $client->helloWorld(23);
echo htmlentities($client->__getLastResponse());



My coode doesn't have error. But I cannot get the result from the web
service function call

please help

thanks
from Peter (cmk128@hotmail.com)

Posted by Curtis on November 23, 2008, 2:52 am
Please log in for more thread options
On Sun, 23 Nov 2008 13:01:06 +0800, cmk128@hotmail.com wrote:
> $wsdl =
>
"http://webservice1.petersoft.com/WebServiceHelper/service.php?class=testSoapServer&wsdl";
> echo "<strong>WSDL file:</strong> ".$wsdl."<br>\n";
> $options = Array('actor' =>'http://webservice1.petersoft.com',
>                                  'trace' => true);

You initialize "$options" here, but you don't use it below:

> $client = new SoapClient($wsdl, array('trace'=>true));
> echo $client->helloWorld(23);
> echo htmlentities($client->__getLastResponse());
>
>
>
> My coode doesn't have error. But I cannot get the result from the web
> service function call

You don't use any error handling. Since PHP 5, you can catch SOAP
faults with exceptions. For example:

try {
$client = new SoapClient($wsdl, array('trace'=>true));
echo $client->helloWorld(23);
echo htmlentities($client->__getLastResponse());
} catch ( SoapFault $fault ) {
trigger_error(
"<br>",
E_USER_ERROR
);
}

I tried testing the code, and I got mixed results. Sometimes the
request succeeded, other times, it runs into a SOAP error parsing the
WSDL file. I'm guessing this is a problem on the server end.

> please help
>
> thanks
> from Peter (cmk128@hotmail.com)

--
Curtis
$email = str_replace('sig.invalid', 'gmail.com', $from);

Posted by peter on November 26, 2008, 11:02 am
Please log in for more thread options
On 11$B7n(B23$BF|(B, $B2<8a(B3$B;~(B52$BJ,(B, Curtis
> On Sun, 23 Nov 2008 13:01:06 +0800, cmk...@hotmail.com wrote:
> > $wsdl =
> > "http://webservice1.petersoft.com/WebServiceHelper/service.php?class=t...";
> > echo "<strong>WSDL file:</strong> ".$wsdl."<br>\n";
> > $options = Array('actor' =>'http://webservice1.petersoft.com',
> > 'trace' => true);
>
> You initialize "$options" here, but you don't use it below:
>
> > $client = new SoapClient($wsdl, array('trace'=>true));
> > echo $client->helloWorld(23);
> > echo htmlentities($client->__getLastResponse());
>
> > My coode doesn't have error. But I cannot get the result from the web
> > service function call
>
> You don't use any error handling. Since PHP 5, you can catch SOAP
> faults with exceptions. For example:
>
> try {
> $client = new SoapClient($wsdl, array('trace'=>true));
> echo $client->helloWorld(23);
> echo htmlentities($client->__getLastResponse());
> } catch ( SoapFault $fault ) {
> trigger_error(
> "<br>",
> E_USER_ERROR
> );
> }
>
> I tried testing the code, and I got mixed results. Sometimes the
> request succeeded, other times, it runs into a SOAP error parsing the
> WSDL file. I'm guessing this is a problem on the server end.
>
> > please help
>
> > thanks
> > from Peter (cmk...@hotmail.com)
>
> --
> Curtis
> $email = str_replace('sig.invalid', 'gmail.com', $from);

thanks

Similar ThreadsPosted
WSDL document February 2, 2009, 6:28 am
PHP doesn't support XSD validation through WSDL? April 21, 2007, 10:26 am
New to webservices, wsdl and nusoap April 23, 2007, 9:09 am
Using SoapClient's non-WSDL Mode September 17, 2008, 10:07 am
Status quo of WSDL 2.0 Support in PHP November 4, 2008, 3:11 pm
PHP5 consume web service without wsdl February 14, 2006, 6:41 am
SOAP and auto WSDL writers October 28, 2006, 7:40 pm
SOAP and auto WSDL writers October 28, 2006, 7:41 pm
WSDL / SOAP function namespaces April 23, 2008, 6:20 am
PHP5 + soap extension + WSDL Mode April 4, 2006, 4:44 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Driving a better car - Fuelzilla.com

Cabling site for homeowners and pros alike - Cabling-Design.com

Friends:

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap