Best way to make Linux Web Services? [closed]

2019-02-16 15:31发布

I have a server that is running Ubuntu Linux Server Edition. I once had a Windows Server and it is easy to create web services using ASP.net on Windows. Linux on the other hand does support ASP.net using Mono, but is isn't as full featured as Windows. So what would be the best way to create xml web services on a linux server box?

Thanks

标签: linux service
11条回答
别忘想泡老子
2楼-- · 2019-02-16 15:46

Depends mostly on the web server and web language you run on Linux more than anything else. If you're using Apache Tomcat, look at Axis2 (http://ws.apache.org/axis2/) and CXF (formerly XFire at http://cxf.apache.org/) JBoss has web service support built-in (JBossWS) so it's fairly easy to use and since it's a Java EE server, it uses standard web service code that is portable.

You can also write web services using PHP if you use that on your web server. Apache = IIS PHP or Java EE or JSP or JSF = ASP.Net There are a lot more choices in Linux land...

查看更多
唯我独甜
3楼-- · 2019-02-16 15:46

"So what would be the best way to create xml web services on a linux server box?"

A web framework like Turbogears, Django, Grok, Repoze.BFG, WebPy or such.

查看更多
做个烂人
4楼-- · 2019-02-16 15:48

A web service can be written in any language. A web service is a program that takes request and returns response (xml or json) via http protocol. You can use a web server like Apache or lighthttpd to handle the http(s) and multithreading for you and write a simple script to do the actual work. The script can be written in anything - php, perl, python, shellscript, cgi c++, free pascal cgi etc.

Of course, You can write everything on your own by using TCP sockets, but this is not your goal I guess. For FOSS I'd do it in php, because it`s easy:http://davidwalsh.name/web-service-php-mysql-xml-json If I want it compiled, i'd use FreePascal as in this guide: http://leonardorame.blogspot.com/2010/02/web-20-programming-with-object-pascal.html

Or If I prefer C++, I'd use QTCreator with this guide: http://libqxt.bitbucket.org/doc/tip/tech-web.html

查看更多
Root(大扎)
5楼-- · 2019-02-16 15:52

There are many ways to do this, but given your ASP.NET background why not give the MonoDevelop IDE a go, it has matured a lot and will continue to do so.

Another option is using Eclipse (Java or PHP).

查看更多
叛逆
6楼-- · 2019-02-16 15:53

Linux web development is actually a world of difference from Windows web development. In leau of the bureaucracy of "applications" and "web services" we have scripts you can invoke via Apache, and if you want to get more advanced, daemons that can handle TCP/IP connections.

If you want to use something specific like SOAP, you should mention it in there, but as far as I know, Linux web development isn't service-based like Windows is.

查看更多
The star\"
7楼-- · 2019-02-16 15:56

I came across the same problem recently. I wanted a thin layer to turn my SQL database into a webservice with JSON or XML support. All I wanted to do was to have to write the SQL statements... it seemed a pretty reasonable thing to ask.

However, all the options I found involved installing some sort of enterprisy "do everything" solution. So I ended up writing some "glue" which took SQL statements defined in XML "dataset" definitions, and served a simple, RESTful web service.

I documented my approach here:

http://www.nsquared.co.nz/jarvis-docs/jarvis_guide.odt

If you want to use the framework, I can give you a tarball of the latest release. It's used in three or four small applications currently, 2 ExtJS, 1 Flex, and 1 Asp.Net.

查看更多
登录 后发表回答