Entrepreneur Geek

Nirav Mehta on life, technology and future

Archive for January, 2009

WSDL to PHP – Generate PHP code from a WSDL file

with 3 comments

There are many classes available to generate a WSDL file from PHP. But I wanted to create PHP classes out of a WSDL file. SOAP allows passing complex data around and to write a SOAP client, I need to have classes defined in PHP for these complex data. I did not want to manually go through WSDL and create different data types based on SOAP declarations. As a matter of fact, I wanted something that will create a SOAP Server stub for me out of the WSDL (not just a client!)

Now I did not find something that will create a SOAP Server, but I found two implementations that create a SOAP Client out of WSDL. This is still a good start, and I can do some further hacks to create a SOAP server.

Here are these two approaches:

  • WSDLInterpreter – WSDLInterpreter is a library that creates PHP 5 classes based on a WSDL document. It creates a SOAPClient via XSLT transformations. Unlike other wsdl2php solutions, WSDLInterpreter utilizes the WSDL document as its source of information, as opposed to the native SoapClient interpretation of the WSDL document. This allows for proper class inheritance, naming convention correction, and method overloading with proper method signature verification using strict type checking.
  • wsdl2php – wsdl2php is a very simple tool for PHP 5 to generate client code against a WSDL-file. It uses DOM to parse the WSDL and generates PHP code out of it.

Both approaches generate similar output. And are a great start if you want to use a third party web service in your PHP code.

Written by Nirav

January 28th, 2009 at 4:19 pm

Posted in PHP

Tagged with , ,

One year complete – happily married!

with 2 comments

19th January marked our first wedding anniversary. It’s been a beautiful year. A year filled with lovely moments. We celebrated with two trips. One to Goa just by ourselves and another to Mahabaleshwar with friends from our honeymoon trip.

Riding the jet skiGoa was exciting. Riding a rented bike across the state, water sports on Calangute beach, lazy evening at Baga beach, pani puri at Miramar beach, Candles at Bom Jesus church, late night strolls and a lot of time together. Never will we forget the thrill of Anjuna flea market and Banana ride on the beach. Not even the traffic police who caught us near Tito’s. Dolphins and sight seeing boat ride at Cocoa Beach were not to our expectations but the swimming pool in the hotel made up for it. I think the best part was just being together. Away from usual daily rush. It was superb.

Strawberries!Mahabaleshwar was fun. Super fast trips back and forth in Mitshubishi Tavera, laid back hotel, evening corn at Venna lake, tummies filled with strawberries and chocolate creams, Pratapgadh fort, Panchagini tableau, horse ride and great food. Traffic jams of more than a kilometer on the way to Arthur Seat and Venna Lake, morning walk towards Wilson point and Republic day parades of school children. This was memorable.

I never expected we would celebrate our first anniversary this way! It was awesome!

Thank you Nikita for being my partner!

(click on the images above for more pictures)

Written by Nirav

January 27th, 2009 at 8:45 pm

Posted in Personal

Tagged with , ,

Company Logos after recession

with 6 comments

Ever thought of how different companies will have to change their logos after the recession?

Here are some!

renault-logo xerox-logo nike-logo

Read the rest of this entry »

Written by Nirav

January 15th, 2009 at 10:13 am

Posted in Misc

Tagged with ,