1

i just have a little bit basic knowledge on PHP, but I should consume an existing WSDL Webservice using PHP.

As I found out to create the required classes I may use wsdl2php but I could not find a step by step tutorial how to use it on Windows (XAMPP[LITE]).

Does Anybody know a good tutorial?

neubert
  • 15,947
  • 24
  • 120
  • 212
john84
  • 2,431
  • 4
  • 24
  • 30

2 Answers2

0

For people passing by this question, with the same doubts as the OP:

  • Go here (Soruceforge) do download the library
  • Copy the included files (on the current version, these are 3: index.php to include the main file, the main file wsdl2php.php and the class file EasyWsdl2PHPLib.php - you can ignore the .svn directory, of course) in the directory of your choosing under the public_html folder (so that it will be visible by the browser)
  • Using the browser, go to the folder's url (for example, if you put the files into public_html/my_wsdl_decoder/, you can browse to localhost/my_wsdl_decoder/
  • You should view two text inputs and a button: in the "url" input paste the url to the wsdl file you want to "decode", in the "Class name" input the name of the class you will create for your soap management and then press the button
  • In the textarea below, you will see the PHP code that can be copy/pasted in a new file of your future project to be able to use SoapClient to perform requests and get responses

For more information on how to use the generated class, I suppose you will have to get a bit o knowledge on Object-Oriented Programming (or ask a new question here on SO ^.^ )

Erenor Paz
  • 3,061
  • 4
  • 37
  • 44
0

Because wsdl2php generating proxy classes or easywsdl2php just enter the address of the WSDL and the application will generate the library that you will use to write your code.

immobiluser
  • 349
  • 1
  • 2
  • 12