Page 1 of 1
Open Source (Free) alternative to .Net Web Services
Posted: Wed Apr 21, 2010 2:59 pm
by emmbec
Hi guys, I was wondering if you know by any chance an open source alternative to .Net Web Services that I could use with PHP? If not, do you know if .Net Web services can be consumed with PHP, let's say with a jQuery Ajax call??
Thanks!
Re: Open Source (Free) alternative to .Net Web Services
Posted: Wed Apr 21, 2010 3:08 pm
by omniuni
.NET web services seem to be simply small bits of code capable of sending and receiving bits of XML. I think, then, you could use PHP to fetch the resulting XML with something as simple as file_get_contents(). PHP does have XML handling capability built in to some extent:
http://php.net/manual/en/book.simplexml.php.
If that doesn't help, can you please reply and be more specific?
Re: Open Source (Free) alternative to .Net Web Services
Posted: Wed Apr 21, 2010 3:19 pm
by emmbec
omniuni wrote:.NET web services seem to be simply small bits of code capable of sending and receiving bits of XML. I think, then, you could use PHP to fetch the resulting XML with something as simple as file_get_contents(). PHP does have XML handling capability built in to some extent:
http://php.net/manual/en/book.simplexml.php.
If that doesn't help, can you please reply and be more specific?
Yes, I guess to consume the web service that is helpful, but I still want to know if there is another way to create a "Web Service" without using .Net. One thing I forgot to mention is that I have some DLLs which are used by the .Net Web Service so I don't know if there is anything out there that can use the DLL and not be Microsoft...
Thanks!
Re: Open Source (Free) alternative to .Net Web Services
Posted: Wed Apr 21, 2010 3:58 pm
by omniuni
Well, DLL's are just compiled libraries. You can use PHP to easily generate XML. For example, let's say I have a script "xml_weather.php". Rather than delivering an HTML page, it sends XML headers, and delivers XML code. I can use this from another server or another script, but using file_get_contents() and pulling the XML generated by xml_weather.php. If you need to, you can deliver XML like a .NET service to another .NET application, or you can pull XML from a .NET application. In other words, you can slowly replace your DLL's with PHP scripts that do the same thing. Of course, Python/Django, Ruby/Rails, and other open source scripting languages can be used as well for any of these purposes... I'm just using PHP here because it is, after all, a PHP forum.
Re: Open Source (Free) alternative to .Net Web Services
Posted: Thu Apr 22, 2010 4:00 am
by Chris Corbyn
This of any use?
http://www.mono-project.com/Main_Page
EDIT | Sorry, I misread your question.
Re: Open Source (Free) alternative to .Net Web Services
Posted: Thu Apr 22, 2010 7:03 am
by Jenk
PHP Team are working on WSDL consumption/generation. However there are already (it seems from Googling "php wsdl") there are a number of 3rd party libraries for doing this already.