1

I'm having a lot of trouble trying to get the php for a soap wsdl request working. I came across wsdl2phpgenerator which sounds like it generates the code for the service you want? Problem is I can't figure out how to use it. I'm running WAMP on my local machine. How do i install and use, the instruction don't seem to make a lot of sense to me.

David
  • 139
  • 3
  • 15

1 Answers1

0

I guess you use windows when you use WAMP. You should not run the wsdl2phpgenerator through apache. You need to run it on the commandline.

step 1: First open the CMD and type:

php --version

If the cmd prints something out like :

PHP 5.4.19 (cli) (built: Aug 23 2013 00:51:43) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

go to step 3:

step 2: add php to windows env path: https://stackoverflow.com/a/9546345/1210773 use the path to your own php installation after this run step 1 to validate php is correctly setup

Step3: run wsdl2phpgenerator move the cmd to the wsdl2phpgenerator dir and run wsdl2php

I found some examples in the wsdl2phpgenerator documentation: https://github.com/wsdl2phpgenerator/wsdl2phpgenerator/wiki/ExampleUsage

Community
  • 1
  • 1
Mibsen
  • 91
  • 4
  • hey thanks for this, think I got it working. i was hoping it would add the headers as well for authentication, but doesn't seem to? – David Mar 27 '14 at 16:33
  • I think you are correct about that. http://stackoverflow.com/a/4393535/1210773 , shows how this works. you can add it to the client – Mibsen Mar 27 '14 at 19:18