PHP, SOAP and communicating with a 3rd party server

Posted on 2012-08-16
Last Modified: 2013-11-19

I'm revisiting a project that reared it's head a couple of years ago but never really progressed. I now have to communicate with a associate business to send requests and receive resulting data to display (products, costs, availability etc.) The 3rd party insists that all requests (and responses) must be in SOAP envelopes.

I've dabbled with CURL and XMLHTTPRequest for comms in the past (not too successfully!) but have little understanding of SOAP despite trawling the web for tutorials for real beginners.

Can anyone point me at some SOAP 101 type resources and tutorials that may guide me through setting up a new soap client to talk with another server and data source?

Can I use SOAP to handle the whole communication process or do I need to invoke XMLHTPRequest / JavaScript etc. to handle the comms?

Would appreciate any advice / lead / feedback as I think I've buried myself so far into these woods that I can't see the trees anymore!!

My site is hosted on an Apache server running PHP and SOAP - so all components seem to be available to me. I have some knowledge of XML and the rudiments of web services.

Thanks in anticipation.

Question by:GaryKevinBanks
    LVL 107

    Expert Comment

    by:Ray Paseur
    Is there any chance that the web service can expose a RESTful API?  The WWW is littered with the rotting carcasses of failed SOAP implementations, but I have never seen a REST service that anyone could not understand immediately.  That is why Yahoo, Google, Facebook and others have abandoned SOAP in favor of REST.  REST is just common sense.  SOAP is a complicated and opaque struggle.
    LVL 16

    Accepted Solution


    Author Comment

    Many thanks for the response Ray - but it HAS to be SOAP I'm afraid.

    Thank you too srosebabu - I'll take a look at those examples, give it all a go and get back to you.
    LVL 26

    Expert Comment

    Possibly of interest: to remote services

    Author Comment

    Thanks arober11 - will take a look. Sorry for the delayed response - I've been out of circulation for a few weeks.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    New Relic recently released its Synthetics product that allows for the creation of performance monitors that periodically test a site's performance. If you wish to test an interactive workflow New Relic employs Selenium WebDriverJS to run those test…
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now