PHP Web Service Primer Tutorial

PHP Web Service Primer Tutorial

PHP Web Service Primer Tutorial


Java Eclipse Web Service Primer Tutorial

Java Eclipse Web Service Primer Tutorial

Here we see the “Hello World” of PHP Web Service Primer Tutorials and will leave a lot of the explanation to the Java Eclipse Web Service Primer Tutorial that did a lot of work in making the Hello.wsdl this tutorial works off, which is explained further down.

This tutorial uses the MAMP framework’s Apache (local) Web Server on a Mac laptop as its network protocol and so HTTP://localhost:8888/Server.php?startclient=y does the whole “shebang” (in programming to say Hello World).

Download and rename to Hello.wsdl as you see fit.

Download and rename to Server.php as you see fit.

Download and rename to Client.php as you see fit.

Thanks to Joel Hainley for this very good tutorial which helped a lot.


Previous relevant Java Eclipse Web Service Primer Tutorial text is shown below (and tutorialized in the second picture above) … its resultant Hello.wsdl does a lot of the legwork for the PHP WebService above:

Web Services allows for communication using the World Wide Web between two devices, as Wikipedia explains below. This tutorial is using Eclipse IDE which works on Mac OS X and Windows, but if you are interested, look at ASP.Net Web Service Primer Tutorial for a Windows only idea.

A web service is a method of communication between two electronic devices over the World Wide Web. A web service is a software function provided at a network address over the web or the cloud, it is a service that is “always on” as in the concept of utility computing.

The W3C defines a “Web service” as:

[…] a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards.[1]

The W3C also states:

We can identify two major classes of Web services:

REST-compliant Web services, in which the primary purpose of the service is to manipulate XML representations of Web resources using a uniform set of “stateless” operations; and
arbitrary Web services, in which the service may expose an arbitrary set of operations.[2]

In this tutorial I wanted to show you the basics and closely followed the Eclipse IDE Java advice of this PDF document by T320 E-business technologies, for whose expertise I am very grateful (thank you, thank you, thank you, thank you).

Eclipse IDE is a great IDE for developing Android Apps via Java as we discussed in Android Application (on Windows) Primer Tutorial, and this time around we are going to use the Mac OS X Eclipse (because we don’t want to hide our eclipse behind a bushel!?). Will show you some information from Wikipedia about Eclipse below.

In computer programming, Eclipse is a multi-language Integrated development environment (IDE) comprising a base workspace and an extensible plug-in system for customizing the environment. It is written mostly in Java. It can be used to develop applications in Java and, by means of various plug-ins, other programming languages including Ada, C, C++, COBOL, Fortran, Haskell, JavaScript, Perl, PHP, Python, R, Ruby (including Ruby on Rails framework), Scala, Clojure, Groovy, Scheme, and Erlang. It can also be used to develop packages for the software Mathematica. Development environments include the Eclipse Java development tools (JDT) for Java and Scala, Eclipse CDT for C/C++ and Eclipse PDT for PHP, among others.

The initial codebase originated from IBM VisualAge.[2] The Eclipse software development kit (SDK), which includes the Java development tools, is meant for Java developers. Users can extend its abilities by installing plug-ins written for the Eclipse Platform, such as development toolkits for other programming languages, and can write and contribute their own plug-in modules.

Released under the terms of the Eclipse Public License, Eclipse SDK is free and open source software (although it is incompatible with the GNU General Public License[3]). It was one of the first IDEs to run under GNU Classpath and it runs without problems under IcedTea.
Contents

This tutorial is a primer tutorial like the “Hello World” tutorial of Web Services accessing a local Apache Tomcat web server on a Mac OS X laptop, but it can easily be used as a starting point for your further investigation, as this is a large LARGE subject area.

Below are some good background reading for the concepts of this tutorial all via Wikipedia:

Maybe you’ll want to read about RESTful Web API as well.

Download and rename to Hello.wsdl as you see fit. This file is 90%+ used as the basis for PHP Web Service Primer Tutorial.

Some personal experience with Web Services and SAP B1 Web Services (ASP.Net) is shown here.

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Networking, Tutorials and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>