Showing posts with label Web Services. Show all posts
Showing posts with label Web Services. Show all posts

BAM Tool for PHP

Thursday, February 25, 2010

Business Activity Monitoring (BAM), open source tool, can be used to monitor PHP Web services as well.

You can use the generic mode of the tool and monitor Web services as well as all PHP deployments in general.

Here is an article on Business Activity Monitoring - An Introduction to learn more about BAM

Servey: Tools for PHP Web Services?

Saturday, August 22, 2009

This is a servery to find out, what PHP progremmers need the most when it comes to dealing with Web services.

Please feel free to comment on this blog post.

What is your wishlist when it comes to PHP Web servies? What tools are you looking for?

How about something similar to PHP MyAdmin for PHP Web services? Point to the service, and just use it?

What about hosting? Do you have trhoube consuming services from hosted PHP instances?

What about IDE integration? Would you like it to be intergated with, say, Eclipse?

Feel free to let us know.

PHP Web Services - Authentication Based on Client’s IP

Saturday, December 27, 2008

This blog post PHP Web Services - Authentication Based on Client’s IP explains with code samples how a PHP web service can be written to authenticate clients based on their IPs.

RESTful PHP Web Services - Book

Tuesday, October 21, 2008

My book on RESTful PHP Web Services is now available for download from Packt Publishing.

What you will learn from this book

  • Basic concepts of REST architecture
  • Consuming public REST-style services from your PHP applications
  • Consuming RESTful web services, such as those from leading APIs such as Flickr, and Yahoo Web Search
  • Making your own PHP applications accessible to other applications through a RESTful API
  • REST support in the popular Zend framework
  • Debugging RESTful services and clients
  • A case study of designing a RESTful PHP service from the ground up, and designing clients to consume the service

It is also note worthy that there is a dedicated appendix chapter in this book on using WSO2 WSF/PHP.

The right way to Integrate

Friday, August 15, 2008

Do you integrate you PHP application with other applications out there? Is your portal running with PHP and you leverage other third party applications to make your PHP application rich? And what are the technologies you use there?

Web services has been used for some time now to solve integration problems, and PHP can use the same technologies. Most application, including Software as a Service (SaS) applications provide Web services APIs, both SOAP and REST. And WSF/PHP form WSO2 provide a very strong set of APIs for this.

WSO2 itself has an array of PHP based Web applications. The wso2.com corporate Web site, wso2.org developer portal web site as well as an array of other applications that are internal but are integrated to the .com and .org site used an array of PHP applications. And they leverage Web services, and WSF/PHP when it comes to integrate across the various applications. As an example we talks to Jira based support system using Web services API and integrate that to Drupal based developer sites user accounts.

So, not only that WSO2 develop these great products and contribute those to the community, but WSO2 itself use them in production. You can too...

PHP Web Services Training, Support and Consulting

Saturday, July 19, 2008

Did you know that WSO2 provides commercial training, support as well as consulting on PHP Web services?

Yes, the product is open source. But if you are looking for production support or development support, contact WSO2 Inc.

The consultancy services, on how to design your PHP application in the SOA and ROA era would be ideal, if you are looking to either re-engineer or re-structure your PHP application platforms.

SOAP, REST, ESB and SOA, WSO2 is the right partner.

WSF/PHP 1.2.2 & wsdl2php

Thursday, April 24, 2008

The enhancements done to wsdl2php tool to support as much schema constructs as possible is the key highlight of the upcoming WSO2 WSF/PHP 1.2.2 release.

One of the key limitations of the built in SOAP extension is the level of schema support. I have seen many users complaining on this on the PHP SOAP list.

The amount of schema coverage that you get with WSF/PHP also beats out NuSOAP WSDL support. We have done considerable amount of testing for a large number of WSDL files with various schema constructs for WSF/PHP.

I expect the wsdl2php tool be the killer tool that help solve all the problems that PHP users faced with WSDL.

Data Services in PHP

Tuesday, March 25, 2008

The PHP Web services demo site now has a cool Data Services demo. This demo shows how you can expose a database table as a Web service with PHP. You can also sneak a peek into the PHP source to find out how to do that, have a look at the right hand side pane.

If you have any database that you want to expose as either SOAP or a REST service, now you can follow few steps and get the job done.

WSF/PHP team is in the process of enhancing the level of data services support. They are implementing a comprehensive set of classes on top of WSF/PHP to make your data services dreams come true.

PHP Amazon Client Demo

Thursday, March 6, 2008

This demo shows you how to consume the Amazon e-commerce SOAP API with PHP. It is a live demo, that you can view online and if you ever wonder how to do that in PHP, the source code is also available.

There is an associated tutorial too, that you can find in the above link. The tutorial explains step-by-step what you have to do to consume the Amazon API.

Search Mashup with PHP

Tuesday, March 4, 2008

There is an online demo that shows how you can build a simple Mashup with PHP Web services, using both SOAP and REST.

It uses Amazon, Flickr and Yahoo APIs.

This sample demo is built using WSF/PHP. You can also have a look online to see how it is done in PHP. Enjoy!

Article on PHP and .NET Interoperability

Thursday, February 28, 2008

The latest article on WSF/PHP, titled, WSO2 WSF/PHP Interoperability with Microsoft WCF, explains how you can get PHP Web services to work with Windows Communication Foundation.

It clearly explains the steps on how to write a PHP SOAP client to use a public .NET Web service in WSDL mode.

WSDL Mode Enhancements

Tuesday, February 26, 2008

WSDL mode in WSF/PHP is getting improved day by day. Dimuthu has done many improvements, including class map support and array support.

I managed to fix some RPC style related issues and also add support for the 'choice' and 'all' constructs. There are some work to be done in WSDL mode to integrate it, but we can generate code for WSDL mode now.

If you want to work with WSDL files in PHP, WSF/PHP would be the most comprehensive toolkit out there.

Attachments Interop with .NET

Sunday, February 24, 2008

I have been working on an article on the WSF/PHP interoperability with .NET. I used the samples form the WSE toolkit for .NET and successfully interoperated with the .NET service using PHP client. The idea was to use the MTOM service form .NET as it is and download a binary attachment using a PHP client. This is because, many users of WSF/PHP query consuming .NET services. I faced no issues in making the PHP client talk to the .NET service.

wsdl2php now Supports Server Side

Friday, February 22, 2008

WSO2 WSF/PHP wsdl2php code now supports server side. I added server side support yesterday.

Now users can write both clients and services in WSDL mode with minimal effort. You just have to generate the code and follow the TODO instructions in the generated code.

This feature will be available with the upcoming 1.2.1 release.

WSF/PHP Solutions Site

Tuesday, February 19, 2008

We are working on a site to host some working solutions to demo the power of Web services as well as the power of WSF/PHP framework.

The demo site would include a data services demo, a SOA calendar demo, a WS-Security demo and also some .NET interop demos.

wsdl2php for WSF/PHP

Sunday, February 17, 2008

I wrote the initial version of wsdl2php for WSF/PHP WSDL mode over the weekend. You can have a look here: https://svn.wso2.org/repos/wso2/trunk/wsf/php/scripts/wsdl2php.php

The road map for wsdl2php is already being planned.

The next release of WSF/PHP would have this tool. We also plan to host an online version with our proposed WSF/PHP demo site.

Get Real with REST

Sunday, February 3, 2008

WSF/PHP is the only PHP SOAP API out there that enable you to write a single service script and expose that using both as REST and SOAP with a single deployment.

There was this criticism, however, that the level of REST support was not that RESTful. There is good news now. Apache Axis2/C, the heart of WSF/PHP, has improved the REST support to make it more RESTful. WSF/PHP would soon integrate this improved REST features.

The good news is that not only there would be more support for HTTP methods like PUT and DELETE, it would also provide means to map different PHP functions to a custom resource URI. Keep your fingers crossed.

Comparing Hello World

Friday, February 1, 2008

I posted Hello World Services and Hello World Clients with PHP SOAP extension, NuSOAP and WSF/PHP.

NuSOAP looks the most clean, with its natural mapping for PHP types to service request/response serialization. Native SOAP extension again can deal with PHP types, but there are problems when it comes to customizing element names the way we wish.

WSF/PHP code looks more bulky, because of the XML in-out model. However it has the advantage of being able to control the payload the way we wish.

The key point is that, as far as the API is concerned, the three alternatives are not that much apart. They look almost the same. For a service, you define a function and declare that function to be an operation of the service. For a client, you provide the service endpoint and send the request with the required parameters.

One thing to note with SOAP extension and NuSOAP is that you have to register the operations one by one. For small services this is fine. But if you have 5, 10 operations, this would mean multiple calls. With WSF/PHP, you can provide an array of operations.

Anyway, the bottom line is, all three are usable simple for the simple cases.

I would like to visit WS-Addressing with PHP in the near future and see how these Web services framework would support that spec.

Payload Problems? WSF/PHP to the Rescue!

Thursday, January 31, 2008

I am seeing numerous users having payload problems with native SOAP extension and NuSOAP, specially when inter-operating with heterogeneous systems.

The best solution is to use WSF/PHP, the Web services framework with XML in-out model in the heart of its implementation, thanks to Apache Axis2/C.

As PHP users, we would be comfortable working with our own data types such as arrays and classes, and let the SOAP engine handle the serialization completely. WSF/PHP is gradually going there. However, in the mean time, if you run into XML request format problems with other implementations such as .NET, Java, etc. you can always use XML mode.

If you consider native PHP SOAP extension, there is no way to trap the XML payload and manipulate it, and some of the serialization behaviors could not be fine tuned at all. But with WSF/PHP, you can, and it is also written in C. So you have the speed that you want over NuSOAP. I have seen users asking on tweaking XML payload format with NuSOAP as well.

Payload the Way You Want with PHP5 built-in SOAP

Wednesday, January 30, 2008

Say you want this payload:

        <ns1:base>
            <itemsLine xsi:type="ns2:urn:test">
               <name xsi:type="xsd:string">A</name>
               <type xsi:type="xsd:string">D</type>
               <from xsi:type="xsd:string">C</from>
               <fluke xsi:type="xsd:string">D</fluke>
            </itemsLine>
            <itemsLine xsi:type="ns2:urn:test">
               <name xsi:type="xsd:string">E</name>
               <type xsi:type="xsd:string">H</type>
               <from xsi:type="xsd:string">G</from>
               <fluke xsi:type="xsd:string">H</fluke>
            </itemsLine>
         </ns1:base>

 

How do you get this XML to be output by the SoapClient?

You can get this exact payload with the following code:

<?php
class itemsLine{
    function itemsLine($a, $b, $c, $d)
    {
        $this->name = $a;
        $this->type = $d;
        $this->from = $c;
        $this->fluke = $d;
    }
}

$client = new SoapClient(null, array('location' => "http://localhost:9090/soap.php",
                                     'uri'      => "http://test-uri/"));
$item1 = new itemsLine('A', 'B', 'C', 'D');
$item2 = new itemsLine('E', 'F', 'G', 'H');

$var1 = new SoapVar($item1 , SOAP_ENC_OBJECT, "urn:test", "http://soapinterop.org/xsd");
$var2 = new SoapVar($item2 , SOAP_ENC_OBJECT, "urn:test", "http://soapinterop.org/xsd");

$client->base(new SoapParam($var1, "itemsLine"), new SoapParam($var2, "itemsLine"));
?>