Open Source (Free) alternative to .Net Web Services

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
emmbec
Forum Contributor
Posts: 112
Joined: Thu Sep 21, 2006 12:19 pm
Location: Queretaro, Mexico

Open Source (Free) alternative to .Net Web Services

Post 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!
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: Open Source (Free) alternative to .Net Web Services

Post 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?
User avatar
emmbec
Forum Contributor
Posts: 112
Joined: Thu Sep 21, 2006 12:19 pm
Location: Queretaro, Mexico

Re: Open Source (Free) alternative to .Net Web Services

Post 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!
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: Open Source (Free) alternative to .Net Web Services

Post 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.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Open Source (Free) alternative to .Net Web Services

Post by Chris Corbyn »

This of any use? http://www.mono-project.com/Main_Page

EDIT | Sorry, I misread your question.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Re: Open Source (Free) alternative to .Net Web Services

Post 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.
Post Reply