This is a discussion on Implementing soap using PHP within the PHP Programming forums, part of the Web Development category; hi buddies Am new to the soap concept any one please help me to know about that, to implement in ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi Falcon, SOAP is a method of sending and receiving data remotely between a server and client. SOAP is normally transported over the HTTP transport where it is analyzed, executed, and corresponding information returned, back to the client. SOAP libraries exist for every major programming language and performing a SOAP operation is nearly the same easy operation in every language.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| using this we can call any webservices to our sites, But we have to know its wsdl file and the webservice name to call that services
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| Hi Jey W3C Stands for the World Wide Web Consortium The most important work done by the W3C is the development of Web specifications (called "Recommendations") that describe communication protocols (like HTML and XML) and other building blocks of the Web. Regards Falcon ![]() |
| |||
| Hi Jey Each W3C Recommendation is developed by a work group consisting of members and invited experts. The group obtains its input from companies and other organizations, and creates a Working Draft and finally a Proposed Recommendation. In general the Recommendation is submitted to the W3C membership and director, for a formal approval as a W3C Recommendation I think this will help us to know about the W3C Regards Falcon ![]() |
| |||
| Hi buddies WSDL The service supports a single operation called GetLastTradePrice, which is deployed using the SOAP 1.1 protocol over HTTP. The request takes a ticker symbol of type string, and returns the price as a float. Example for WSDL Quote:
Falcon ![]() |
| |||
| Hi buddies WSDL documents can be assigned an optional name attribute of type NCNAME that serves as a lightweight form of documentation. Optionally, a targetNamespace attribute of type URI may be specified. The URI MUST NOT be a relative URI. WSDL allows associating a namespace with a document location using an import statement: <definitions .... > <import namespace="uri" location="uri"/> * </definitions> Regards Falcon ![]() |
| |||
| Hi Buddies WSDL is a language for describing the capabilities of Web services. Proposed by IBM and Microsoft, WSDL combines the best of IBM’s NASSL (Network Accessible Services Language) and Microsoft SOAP Contract Language. WSDL is based on XML and is a key part of the UDDI initiative. The WSDL document specification helps improve interoperability between applications, regardless of the protocol or the encoding scheme. The WSDL 1.1 specification defines WSDL as “an XML grammar for describing network services as collections of communication endpoints capable of exchanging messages.” Essentially, a WSDL document describes how to invoke a service and provides information on the data being exchanged, the sequence of messages for an operation, protocol bindings, and the location of the service. A WSDL document defines services as a collection of endpoints, but separates the abstract definition from the concrete implementation. Messages and port types provide abstract definitions for the data being exchanged and the operations being performed by a service. A binding is provided to map to a concrete set of ports, usually consisting of a URL location and a SOAP binding. Regards Falcon ![]() |
| |||
| Hi Buddies Understanding WSDL A WSDL definition is an XML document with a root definition element from the http://schemas.xmlsoap.org/wsdl/ namespace. The entire WSDL schema is available at http://schemas.xmlsoap.org/wsdl/ for your reference. The definitions element may contain several other elements including types, message, portType, binding, and service, all of which come from the http://schemas.xmlsoap.org/wsdl/ namespace. Regards Falcon ![]() |
| |||
| Hi, I want to implement it in my page for getting some information from other web service Can u give any sample in PHP?
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| hi, I have found a sample for implementing soapclient There should be soap enabled in the server PHP Code:
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| How to create the SOAP server If your PHP installation supports SOAP, creating a SOAP server in PHP is very simple.(If it does not, try installing php-soap.) Here's the source code of our demo SOAP server: PHP Code: Because the URL specified in the WSDL file refers to api, not demoserver.php, we create an URL mapping using an Apache-specific RewriteRule directive. File .htaccess: RewriteEngine On RewriteRule ^api$ demoserver.php
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| In the above sample we need to know what wsdl file contains The WSDL file is an XML file, that consists of five sections: * types: Basically a list of typedefs for use in parameter and result passing. The types may refer to each others forming tuples, arrays and trees, or to XSD types such as xsd:string and xsd:int. * messages: The structure of each query and their relevant response. For queries, the parameters are listed. For responses, the return values are listed. The names of the messages are internal to this WSDL file. * portType: Declares a port by a name, and lists the names of function calls (operations). For each function, it describes which message is used for calling (input) and which message is used for response (output). * binding: It describes the method of passing the input and output for each operation. Typically, they are encoded in SOAP encoding, but they can also be passed raw. * service: For each port declared in portType, it describes the endpoint (address) through which the query is performed.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| hi, i hope you can get more information to work on soap with AJAX and PHP in the following link How to write and use SOAP services in PHP and AJAX It can help us to create and use soap server in our webserver.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
|
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| As i have learned SOAP is a wonderful technology that can help you in developing great applications. Unless you have been living in a cave somewhere without Internet access for the last few years, you have undoubtedly heard of XML, SOAP and Multi-Tiered Application Programming. XML and SOAP, and in turn Multi-Tiered Programming, are technologies that can take you from being a run of the mill code hacker to a professional application developer that actually builds cool things that work and which other people can work on. These technologies enable you to build applications that separate data from presentation, keep things organized and enable your application to scale as your needs and user base increases. If you believe like I do that the Internet is the ultimate building ground of our future, then you have to see that the 'hackish' method in which most applications for the web are built and designed is pitiful. You may be asking, how can XML and SOAP help me to avoid poor application design? Well, by themselves they won't help at all. First and foremost you must get yourself into the mind set that it needs to take place. XML and SOAP are just two tools that will allow you to accomplish your goal. Today we will build a Web Service using SOAP. In doing so, I hope that you will become familiar with the technology so that you can start incorporating it into your future applications.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| here basic terminology regarding soap implementation # XML: "XML is the Extensible Markup Language. It is designed to improve the functionality of the Web by providing more flexible and adaptable information identification." (The XML FAQ other words, XML is a method for describing your data. For the purpose of this tutorial, we will not be directly manipulating any XML. Instead, we will examine the XML resulting from our scripts. The libraries and protocols we will use through this tutorial will handle the XML manipulation for us.%br%%br% # SOAP: Simple Object Access Protocol. "SOAP is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol that consists of three parts: an envelope that defines a framework for describing what is in a message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing remote procedure calls and responses." (http://www.w3.org/TR/2000/NOTE-SOAP-.../)%br%%br%SOAP is what you are here for. We will develop both a client and a server for our SOAP service. In this tutorial, we will be using the NuSOAP library. (http://dietrich.ganx4.com/nusoap/index.php)%br%%br% # WSDL: "WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information." (http://www.w3.org/TR/wsdl)%br%%br%As with XML, we will not be directly any WSDL documents. The wonderful NuSOAP library will generate WSDL documents for us. What you need to know about WSDL is that it is a document that describes a Web Service. It can tell a client how to interact with the Web Service and what interfaces that Web Service provides.%br%%br% # Client: We will define a Client as a script that uses a Web Service.%br%%br% # Server: Conversely, a Server will be defined as a script that provides a Web Service.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| Hi Buddies, Here is one example for soap implementation with NuSoap class. Quote:
Falcon ![]() |
| |||
| Hi Buddies Example for Google search using soap with NuSoap class Quote:
Falcon ![]() |