Home > Backend Development > PHP Tutorial > Using Web Services to Access J2EE Applications in PHP5 (1)_PHP Tutorial

Using Web Services to Access J2EE Applications in PHP5 (1)_PHP Tutorial

WBOY
Release: 2016-07-13 16:54:16
Original
1086 people have browsed it

Many web developers like PHP's rich functionality and ease of use, but sometimes they need to access business logic already in a J2EE application server. This article will provide some examples of how to use Web services to access J2EE applications through the new SOAP extension in PHP 5, without having to leave the PHP environment or learn a new programming model.
Introduction to PHP, Web Services, and SOAP
This article explains how to access enterprise applications from PHP scripts. You might be a PHP programmer who needs to write code for a departmental web application that provides access to services provided as web services from corporate headquarters. Perhaps you are an experienced J2EE developer who would like to learn more about PHP and its applications. The example in this article is an Enterprise JavaBean (EJB) running on an IBM WebSphere® application server, but this article does not discuss the deployment of Web services. Its main goal is to introduce how to use web services from PHP, which can be applied to various web service implementations.
 What is PHP?
PHP: Hypertext Preprocessor (PHP) is a popular server-side scripting language used to create dynamic web content. The PHP interpreter provides source code or compiled binaries for major platforms, including most Linux® versions, Windows®, Mac OS X, and iSeries®.
There are literally millions of web servers running PHP, and most of them use PHP 4. PHP 5, launched in July 2004, is gradually being adopted. PHP 5 has improved the object model, and the underlying memory management has been redesigned from the perspective of multi-threading and performance. However, be aware of a few modifications that are not backwards compatible, and these are documented in the PHP manual.
 What is Web service technology?
Web services refer to self-contained, modular applications in which clients and services are loosely coupled. Regarding the details of web services, for the purpose of this article, you only need to know the main technologies:
SOAP (Simple Object Access Protocol) defines the messages passed between the client and the server. Messages are in XML format. SOAP is platform, programming language, network and transport layer independent. This article discusses SOAP over HTTP.
WSDL (Web Services Description Language) is an XML-based language used to describe Web services. The description includes the location, format, operations, parameters and data types of the service.
 UDDI (Unified Description, Discovery, and Integration) uses APIs and UDDI Registry implementations to provide a method for storing and retrieving Web service information over the network.
This article includes some examples of SOAP messages and WSDL documents, but does not provide examples of UDDI.
The XMethods website is a useful web services tool where you can find a list of publicly available web services implemented on various server platforms. You can use the examples in this article to easily access services selected from XMethods.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631760.htmlTechArticleMany web developers like the rich functionality and ease of use of PHP, but sometimes they need access to a J2EE application server existing business logic. This article will illustrate through some examples...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template