troubleshooting Question

How to consume an webservice with complex types from php?

Avatar of abie-hadi
abie-hadi asked on
PHPWeb Services
3 Comments1 Solution929 ViewsLast Modified:
Dear Experts

This is part of my webmethod in c#:


            SqlCommand query = new SqlCommand();

            query.CommandText = "SELECT id,name,email FROM guys";
            query.Connection = client;

            DataSet guysdata = new DataSet("guys");

            SqlDataAdapter readadata = new SqlDataAdapter();

            readdata.SelectCommand = query;


            return guysdata;

I tried to consume it from php with no luck:

$service = new SoapClient('http://localhost/service.asmx?WSDL');

$guys= $service->guys()->guysResult;

If I try to echo $guys I'll get a "Object of class stdClass could not be converted to string". Would you please tell me how to deal with datasets coming from webservices in PHP?.
Rose Babu
Senior Head Of Enterprise Architecture

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros