[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

PHP and Soap

Posted on 2016-10-25
3
Medium Priority
?
93 Views
Last Modified: 2016-11-21
Trying to figure out what I don't know and what to ask a vendor.

Trying to consume a private web service.  I have been given a sample request xml file, sample response xml and a wsdl.  Given the private nature of this service I can't provide the sample files.  I know, difficult to help if one can't see specifics.  

General web search shows example of soap client but not sure I understand how to apply.  I have an instance of a new soap client but not sure what to do next.
0
Comment
Question by:SpyderDesigns
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 total points
ID: 41859495
First thing to do is ask the publisher of the web service if they have a RESTful interface.  If so, use that instead of SOAP.  If not, ask the publisher of the web service if they have PHP examples.  If so, follow those examples.  If not, look for a different problem to solve.

Some of my colleagues say SOAP is the devil.  I don't go quite that far, but I know from experience that the internet is littered with the rotting husks of failed SOAP projects.  In contrast, I've never met anyone who could not immediately understand and use a REST API.

SOAP, more SOAP, SOAP compared to REST, SOAP after understanding REST, REST
0
 

Author Comment

by:SpyderDesigns
ID: 41860459
Agreed on REST preference.  If I were in a windows environment, I would fire up visual studio and this would probably be an easier.  Thanks
0
 
LVL 27

Expert Comment

by:skullnobrains
ID: 41861997
rest is obviously easier.

with soap, you can use functions such as http://php.net/manual/fr/soapclient.getfunctions.php which will list the available functions and gettypes which will give an idea regarding their parameters... if the doc you have is insufficient printing those 2 arrays and reading through the wsdl usually gives a good hint regarding how to use the api

then you use http://php.net/manual/fr/soapclient.call.php pretty much in the same way you'd use call_user_function() in order to call a local function
1

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question