wsdl in php

07 Nov

We can use nusoap and pear library to invoke web service … there are some command line tools to consume services and generate/validate wsdl …..

1. wsdl (call method at CLI)

2. soapUI
create wsdl project and use web services

3. wsdl2php
wsdl2php convert service methods as the class like structure

4. SoapClient – PHP
$path_wsdl = “wsdl/svnlabs7.wsdl”;
$client = new SoapClient($path_wsdl, array(‘trace’ => 1));
$request = array(‘….. |wsdl request array| ……’);
$response = $client ->getLog($request);

5. nuSOAP



Posted by on November 7, 2009 in Fedora, Java, Linux, Tips, Web Application, Web Services


Tags: , , , , , , , , , , ,

4 responses to “wsdl in php

  1. diätpillen

    November 27, 2009 at 5:11 am

    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.

  2. Fredrik Wallgren

    November 28, 2009 at 9:39 am


    That is exactly what wsdl2phpgenerator( does.

    It creates a service class that extends PHP’s SOAP client class and generates classes for all complex types in the wsdl file.

    The workflow is:
    1, Generate the classes eg. ./wsdl2php -i -o /path/to/my/project/wsdlFiles
    2, Use the service eg. $client = new Service();
    3, Call function eg. $result = $client->myFunc1(new MyDatatype1(‘value1’, 1));

    That calls the function myFunc1 that takes a MyDatatype1 object. The MyDatatype1 object has two properties, a string and a integer.

  3. yankeedudlizz

    December 9, 2009 at 10:28 pm

    Dear Author !
    I am final, I am sorry, but you could not give more information.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: