|
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
|