Automatically create test page for RESTful webservice - web-services

I have a bunch of RESTful JSON webservices created with Spring WebMVC and I wonder if there's any library or framework that could automatically generate web pages with forms to call these services and test them.
I know some application servers have web control panels that dynamically generate this kind of form when you deploy webservices to them, but I'm trying to find an open source solution that could be embedded in my web app and deployed a simple Tomcat or Jetty server.

Related

Rest service architecture

I've just completed the "Getting Started with RESTful Web Services" tutorial on NetBeans. So basically, I created a restful service from a database and deployed it, ready for a client to consume.No frameworks or anything were used. A Web Application was created and a rest service from a database was added to it.
Edit: I've also created a very basic Javascript client with a GUI that can access the service.
My question is, what architecture is this project using? It's a RESTful, but is it using MVC/MVVM etc.? How would you describe the architecture within the service?

Should I put laravel web service in the same project with laravel web?

I have almost finished developing a website. Now I want a mobile version. (The mobile version is not a website, but an application that uses some feature of the website.)
So I want to build web services using laravel.
I already learned how to do that and I tested some of them, they are working fine for post and get request.
My problem is that I don't know if I should put the web service in the same project with the web project because in the web project I have CustomerController with route customers and I need to have the same route for the web service.
So the best practice is to build a new project or create the web service in the same project but with different names. for example:
route customersWS is for web service and
route customer is for web
?
Actually I'm working on same kind of projects, (web application for administration and RESTful service form mobile devices), both of them I have put in same project though I could easily and cleanly isolate one from the other, I have created route groupe for RESTful Api so I could avoid conflicting:
Route::group(array('prefix' => 'api/v1', 'before' => 'api.v1.auth'), function(){
Route::controller('customers', 'CustomersControllerApiV1');
}
For api authentication I recommend you to have a look at this article.

Using Apache CXF with Aegis databinding and JAX-WS front-end

I'm new to the web services. Trying to learn something related to Apache CXF. Can anyone please give me an example (along with configuration, so that it can run on any application server say Tomcat) that uses Aegis data binding with JAX-WS as front-end?
I.e. the web service should use Aegis data binding with JAX-WS as front-end. The web service client may use any binding, any front-end, or it may be a simple standalone application also.

How to consume asp.net web service in SharePoint site?

I have asp.net web service application created in VS 2010. I created this web service using ASP.NET Web Service Application template in VS 2010. My InfoPath form consumes my webservice. However to fill out my IP form, I first have to make sure I run my web service, otherwise I get errors like cannot connect to the webservice.
How can I make sure my web services are properly deployed to my SharePoint site that hosts infoPath form services? Please let me know the necessary steps. If my web services are deployed to my SharePoint site then there's no need to manually run my asp.net web service in the browser everytime I need to fill out the form. Thanks.
Here's the error message I got when I tried to browse my custom web service deployed to layouts folder:
http://abcd/_layouts/WebServiceDemo/MyCustomWebService.asmx
I couldn't find relevant message in 14-->LOGS. Any idea what's causing this? Thanks.
My own analysis: Please visit the web.config inside LAYOUTS folder and set Customerros to Off to get more meaningful error message.
I Googled "How to consume asp.net web service in SharePoint site".
The third hit was Walkthrough: Creating a Custom ASP.NET (ASMX) Web Service in SharePoint 2010. The post shows how to create, deploy and consume the service.

Web Service on Netbeans

I have created a Web Service in Net Beans 6.9 and deploy it locally. And I am using it via a java SE application by adding Web Service client in this application. How to obtain the link of the Web Serice so that it can be used from anywhere ?
2) From where to obtain WSDL file of Web Service ?
3) How to host a Web Service on the internet ?
Thank a ton in advance..!!!
You could create a new project of type web application in Netbeans.
In the web application, you will then create a web service (NOT a web service client).
For publishing and testing the web application, you will have to deploy it to a web server (e.g. GlassFish).
After publishing the web application, the WSDL file will be typically located at: http://localhost:<port>/<your web app>/<your service>?wsdl
For GlassFish, the default port is 8080.
If your current Netbeans installation doesn't support web projects or you don't have GlassFish installed, I suggest you download and install the latest version of Netbeans with Java EE support (bundled Apache Tomcat and GlassFish server in the same setup).
http://netbeans.org/downloads/index.html
Hosting SOAP web services on the internet at large has not been terribly successful. For example Google had SOAP based web services initially, and they switched to REST based services in the end. You may want to reconsider and deploy a REST based interface. If the bulk of your code is not embedded in the web service, then you should not have that difficult of a time switching the interface.
To deploy a SOAP or a REST web service, you would need to deploy a 'full' Java EE container (e.g. Glassfissh or JBoss) on a machine with access to the internet. You might virtual hosting e.g. Westhost, Amazon, or there are turnkey solutions like Heroku (note: I'm not endorsing any of the companies listed here; they're just examples). If you just want to deploy a REST based service, any web container will do e.g. Tomcat or Jetty. In addition to services mentioned above you could probably host a rest web service on any service that will let you upload a war file.