wsdl to php code

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

wsdl to php code

Post by yacahuma »

Hello,

I just created a little wsdl to php code. I am wating for my provider to include soap in my web server so you can try a live demo. It is the first version but I think it works, at least on my samples. I am attaching a code created with it. Le me know what you think.

If you have a public wsdl for my to try please reply to see if my code works.

I will post the live sample as soon as the machine is ready

Thank you
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: wsdl to php code

Post by yacahuma »

I forgot , a client code sample.


BTW , I dont see the text file i just uploaded. humm. Can someone tell me what kind of file can I upload. It does not let me txt or php. Thank you

Code: Select all

 
require_once 'Temperature.php';
 
try
{
  $a = new Temperature('http://coeservice.en.kku.ac.th:8080/TemperatureConvertor/TemperatureConvertorService?wsdl');
  $info  = $a->FahrenheitToCelsius(new FahrenheitToCelsius('10'));
  print_r($info);
}
catch(SoapFault $f)
{
  print_r ($f);
}  
 
 
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: wsdl to php code

Post by yacahuma »

Hello Again, My hosting was gracious enough to install the lastest php version with soap extensions.
Now you can see the generator here

http://www.stccorp.net/soapwriter/soapwriter.php

Let me know what you think.

I only tested it with 5 o 6 wsdls so no promises. Also out of pure coincidence I just found a wsdl generator inside paypal library. The only things is that just generates functions not classes. Maybe is there, I will keep poking at it.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: wsdl to php code

Post by pickle »

You should be able to upload a ZIP file no problem.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply