 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Matthew Turland's Blog: Splitting PHP Class Files
by Chris Cornutt January 25, 2010 @ 13:23:56
Matthew Turland, in trying to solve a problem from work, needed a way to split out some code into two files to simplify and make it easier to use them individually.
The issue I ran into was due to all the generated PHP classes being housed in a single file. I had to process two WSDL files that had several identical user-defined types in common. As a result, I couldn't simply include the two PHP files generated from them because PHP doesn't allow you to define two classes with the same name.
He used the tokenizer extension to create a simple command-line script that did the splitting for him. This script could potentially be used for splitting out other kinds of files too - "unpacking" them from their combined state. You can download the latest version from Matthew's github account.
voice your opinion now!
tutorial split class file wsdl
PHPBuilder.com: A Look Into Web Services
by Chris Cornutt October 09, 2009 @ 11:47:05
New from PHPBuilder.com today there's an article from Curtis Dicken introducing web services, specifically SOAP-based ones, in PHP applications.
Today, whether you realize it or not, websites all around the world use web services to distribute and receive data. In this article we will take a look at what web services are and the basic concepts on how they are implemented and used.
He starts with the basics - XML and how messages are structured, then on to the SOAP format and an example of a simple message sending domain name information to the remote server. He briefly covers WSDL files (the description for the web service's functionality) and UDDI (Universal Description, Discovery and Integration), a structure to provide a directory of SOAP services for developers to choose from.
voice your opinion now!
webservice soap introduction uddi wsdl
Danne Lundqvist's Blog: SOAP structures in PHP
by Chris Cornutt November 04, 2008 @ 09:33:14
Danne Lundqvist is frustrated with the SOAP functionality that comes native with PHP on one very specific subject - its handling of SOAP structures.
Handling SOAP structures in PHP can sometimes be really annoying. If an interface is defined in the WSDL as returning an array I can't be sure that I will get an array. If there is only one element in the array PHP tries to be clever and turn the wanted array into an object which, too me, isn't really smart. I don't know if this is a problem/limitation on the client side, server side or if it is just me doing something stupid in the wsdl.
He gives an example of the WSDL that was requested and the differing results from a call that returned one Map item verses several (how the objects were returned). In asking for help, it looks like he got some in the comments - an attribute called SOAP_SINGLE_ELEMENT_ARRAYS that can be added to the configuration array when creating the SoapClient object.
voice your opinion now!
soap structure wsdl inconsistent soapsingleelementarrays soapclient php5
PHP Web Services Blog: What is Missing in PHP SOAP Extension?
by Chris Cornutt January 24, 2008 @ 11:22:00
On the PHP Web Services blog today, Sami asks "what's missing from PHP's SOAP extension" that needs to be added or corrected.
PHP SOAP extension is good to get started, to play around with. However, it falls much short in meeting the enterprise demands in the SOA era.
He talks about things missing (like binary file features and lots of security features). He also notes something that most PHP developers love about the extension - the WSDL parsing that makes it so easy to simply call a remote service without having to go through the pain of hacking through it yourself.
voice your opinion now!
soap extension native wsdl security binary file transfer
Tony Bibbs' Blog: PHP5 SOAP Still Has Ways to Go
by Chris Cornutt May 31, 2007 @ 08:44:00
Tony Bibbs takes a look at an increasingly popular bit of functionality in PHP5, the SOAP extension, and notes that it still has a "ways to go".
In my latest round of web services work in PHP5 I was creating a PHP5 client that interacts with our Java-based ERP. The client needs to be a combination of a couple of WSDL's into one, nice, compact and powerful client. It should be noted this client will be distributed via the State of Iowa PEAR channel so it will undoubted by used by other project in our organization and throughout state government so the result needs to have a lot more fit-and-finish than would be typical.
He mentions his expectations for PHP's usage of the protocol, including the automatic generation of variables/methods/etc to help the developer use the remote application easier.
voice your opinion now!
php5 soap extension generation wsdl php5 soap extension generation wsdl
WS02 Oxygen Tank: PHP SOAP Extension
by Chris Cornutt April 10, 2007 @ 13:18:00
From the WS02 Oxygen Tank website, there's a new tutorial focused on the use of the PHP SOAP extension in an application:
This article by Samisa Abeysinghe explains the SOAP extension that can be useful in providing and consuming Web services using PHP. He details the classes of extension, two implementation models of Web services, and also lists a 'Hello World with SOAP Extension'.
True to the summary, they start with an introduction to what SOAP is an how the communication with it is performed (via a handy graphic). They move from there on to the different parts of the SOAP connection in PHP - SoapServer, SoapFault, SoapHeader, SoapParams, and the SoapVal classes.
They explain what WSDL is and how to can help and move quickly into their "Hello World" example - a simple SOAP server that returns, what else, "Hello world" to the calling script (providing both the client and server sides of the equation). They include the raw response so you can get an idea of what kind of message is being passed back and forth.
voice your opinion now!
soap extension tutorial wsdl message helloworld soap extension tutorial wsdl message helloworld
Netmag.co.uk: Make your own Soap
by Chris Cornutt January 09, 2007 @ 09:12:00
From Netmag.co.uk comes a new tutorial looking at working with SOAP messages and responses with PHP:
This issue, we're going to look at my favourite member of the .net trinity: 'Develop'. When working with Google, we had to use Soap and WSDL, two of the simplest methods of defining a strict API for others to build on. We already used the excellent SoapClient class, but there's an equally excellent SoapServer class that also works with WSDL, and we can combine them to share our content with the world, all thanks to PHP.
They start with a look at a sample WSDL document, briefly explaining what the parts are. Following that there's the simple PHP code allows the built-in PHP SOAP functionality (in PHP5) to create a SOAP server that will output/use that WSDL file when clients connect and a simple client that uses the file to define what it can do.
voice your opinion now!
soap server wsdl tutorial client server soap server wsdl tutorial client server
Katy's Homepage: Automatic WSDL Generation in PHP 5
by Chris Cornutt July 31, 2006 @ 05:52:09
One of the things that frustrates SOAP (and other web service) users is the creation of the WSDL files for their service. Learning a whole new "language" just to describe what they're offering seems silly, so the quest began for a method to automatically create this information based off of the service itself.
That's where this post on Katy's homepge comes in. It details updates Katy has made to a class offered by David Griffin called wsdl-writer-0.3.
There have been several attempts to write WSDL auto-generation code for PHP. They typically work by having the developer provide additional data about the types of each argument and return value to each web service defined, for example in comments or arrays.
All of the published solutions are rather limited. Perhaps the best attempt I found is David Giffin's wsdl-writer-0.3, but [it] has some major limitations as it stands. David unfortunately does not maintain wsdl-writer so I have decided to publish my modifications here.
She details the changes, noting updates to interoperability, new features (including native SOAP header support), and a few other bug fixes. A simple code example is also included, showing a sample web service class.
voice your opinion now!
automatic generation wsdl php5 wsdl-writer automatic generation wsdl php5 wsdl-writer
|
Community Events
Don't see your event here? Let us know!
|