Jump to content
Larry Ullman's Book Forums

Recommended Posts

Where can I find a very comprehensive guide to programming client webservices? I find there is very little in books, I have both your books on PHP, but none cover the topic to an extent that I can find solutions to the problems. Most of the information out there, and in your books, is very basic.

In the "PHP Advanced" book you have a small sample on how to create a web service, but you don't show how to create the client, the WSDL, etc.

 

This is a topic that could be expanded on, the lack of information is amazing. I have tried nusoap and it doesn't seem to work either.

 

I am running "PHP Version 5.6.5", and trying to connect to a webservice and I keep getting errors:

 

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.thawedbuffalosolutions.com/AuthenticationWS/AuthenticationService.wsdl': failed to load external entity "http://www.thawedbuffalosolutions.com/AuthenticationWS/AuthenticationService.wsdl" in C:\Apache24\htdocs\dalbum-web\DalbumAuthentication.php:45 Stack trace: #0 C:\Apache24\htdocs\dalbum-web\DalbumAuthentication.php(45): SoapClient->SoapClient('http://www.thaw...' Array) #1 {main} thrown in C:\Apache24\htdocs\dalbum-web\DalbumAuthentication.php on line 45

 

The error always comes from this line:

 

   $client     = new SoapClient($wsdl, $options);

 

Anyway, I wish there was more information in your books about this very important topic.

 

Thank you,

 

Perseus

Share this post


Link to post
Share on other sites
The first thing you need to do is place the instantiation of the SoapClient object within a try catch block. This will help you problem solve the issue you’re having with your script.

 

There is a lot of information online about writing services using PHP. I have no idea where you are in terms of you level of PHP knowledge/learning and I could be doing you a huge disservice by stating get good at searching for information/tutorials online.

 

I had a quick search on google and I got a huge number of useful resources for tutorials; sitepoint seems to have a pretty good 2 part series: creating web services using SOAP and PHP.

 

However, services using SOAP kind of went out of favour back in the day and most developers use REST these days.

 

Personally, I think it’s always good to work through Larry’s books, but after you’ve finished with SOAP I would recommend having a look at creating REST APIs using PHP. There is a tonne of information online.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...