Glassfish 3.1 application.wadl reorder elements - glassfish

I am currently using Glassfish to host a bunch of RESTful Web Services. Glassfish is very helpful and generates a wadl for me. The problem that I'm having is the wadl it generates puts all the resources in a random order.
Our wonderful QA folks (and us developers) use SoapUI to consume the wadl and manually call the web serivices for testing purposes. This process has become frustrating because it is hard to find the web service we want to call because it is not alphabetized. To make it worse every time we add or change a web service we have to re import the wadl into SoapUI which changes the order of the web services.
I have done a lot of digging and have not found a configuration file or property that will tell glassfish to order the wadl before publishing it. I also could not find a way to get SoapUI to reorder the web services to be in alphabetical order. The solution that I came up with is to use JAXB to convert the wadl to Java objects, reorder the Java objects, then convert it back to Java.
What all of this boils down to, is there a way to get Glassfish 3.1 to reorder the wadl to be in alphabetical order or get SoapUI to display the web services in alphabetical order?

Related

Creating a content hub and client application using Piranha CMS

First off, I need to mention that I'm not sure if what I'm trying to achieve is even supported by Piranha CMS (that's partly what I'm trying to determine here). They mention the ability to create a standalone content hub on their website, but my assumptions of what is possible with that model might be incorrect. What I've already done is created an ASP.NET MVC application that is hosting Piranha CMS and I've published it to Azure websites for testing purposes--that part works as expected. The content management interface is the only user facing piece here--it is meant only to serve as the content hub for the client application (just the one for now as this is just proof of concept work).
I am now trying to build a client ASP.NET MVC application that pulls content from the hub. This is where I'm thinking that my assumptions may have been wrong. I was thinking that I'd be able to install the Piranha CMS nuget package(s) on the client as well, and I'd be able to configure the framework to get content from the hub in the same way that it would if the content were hosted on the client site. I realize that I could get the content from the hub using Piranha's REST api, but what I want to do is to be able to use the more friendly entity model based api for this.
So my question is whether it is possible (within reason) to setup Piranha CMS in the way that I've described. If it is, how exactly do I configure the client such that it is aware of the location of the content hub?
There are currently no .net client api consuming the rest services as the simplest scenario would be to deploy .net applications together with the server. In the setups I've done native apps & html5 knockout/angular applications have used the rest api's for getting json data. You should however be able to white such a module, performing the HTTP calls and the deserializing the json without any problems.
Regards
HÃ¥kan

Is the WCF Web.API safe for production applications?

The WCF Web.API hasn't been incorporated into the .NET Framework as of the date of this post. Is it safe to use this library in production code or is it's only usefulness for testing at the moment ?
I'm using it in production.
Albeit it is not allowed at the moment to use it in production at your customers site.
But your customer can get the dependencies using Nuget...
And btw: Web API will be out of band release like ASP.NET MVC is.
While I personally have not implemented a production application with WCF web API, I know several people who have. I have not heard them report any issues that would cause me to question it's production readiness. That being said, WCF Web API is an open source project, so you can browse the code yourself to get a feeling for how sound the code is.

Auto-generate an API Explorer for WCF services

If you have ever used the Flickr API, you'll be familiar with their API Explorer. It is an awesome tool, that allows you to view the documentation for each API method, and the killer feature, being the execution of that API method (with a form to populate any request parameters). It even picks up when you are logged in, and completes the authentication part on your behalf. Gowalla has a similar API Explorer that is also really good.
Are there are tools for WCF that will auto-generate such an API Explorer, free or commercial?
Currently, we use Fiddler to build the JSON requests, but I would like to publish these service contracts, and allow potential developers to play around with them via a web based API explorer.
I am aware of the WCF Web HTTP Service Help Page, which I am using (and is awesome), but it is the API Explorer part that I am interested in.
You may want to look at I/O Docs - an open-sourced interactive documentation system for RESTful web APIs that any API owner can use to deploy for their own documentation. It runs on Node.js and uses Redis as a data store.
https://github.com/mashery/iodocs
Example: developer.klout.com/iodocs, developer.rottentomatoes.com/iodocs
It uses JSON schema based files to define API endpoints, method and parameters. Based on these JSON files, it generates a client interface that developers can use to learn and explore your API. API calls can be executed directly from the documentation interface, producing formatted responses.
It's Open-sourced, so you can be assured of regular updates and improvements. In fact this past weekend, Brandon West from SendGrid (who use I/O docs to power their documentation), created and open sourced the UI to create/edit the JSON schema files for I/O Docs. So you don't have to manually create the JSON files anymore.
https://github.com/brandonmwest/iodoctor
Not exactly what you were looking for, but....
WCF provides something called the WCF Test Client, for this purpose.
If you install Visual Studio, you get it. For example, for VS2008, installed in the usual place, you can find the WCF Test Client (WcfTestClient.exe) in the following location:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\
Take a look at Apigee: http://apigee.com/

Accessing web services in iPhone using SOAP without method names?

I am trying to access a webservice from my server using this tutorial consume web services.. i have been successful in accessing the web service and retrieving a string from it. but in most of the tutorials i have come across we need to give the method names in the web service thru the SOAP actions.. Is there any way in which we can even retrieve the methods that are present in the web service first within our application and then access it using those methods,, so the web service will be more flexible then and we can add more methods later??
You can use WSDL from service and generate proxy. WSDL contains service methods list. Check this
The first thing that springs to mind is to hit the WSDL definition, and search through it for the messages and data types you want.

Triggering SOAP requests in a Maven Mojo

I have a WSDL which I need to trigger some commands from. I need to do this as part of a Maven Plugin (Mojo)
I'm a relative newbie to SOAP so what I want to know is this:
1) Is this possible? Can the SOAP calls be run from a Maven Plugin or does it require a container or something else?
2) If so, what tools should I use to do this? I've read about Apache Axis and have seen that it's capable of building a lot of things from the WSDL itself. Is this the sort of tool I should use? Do Mojos have a built in SOAP executor?
3) If not, what are my alternatives?
Is this possible? Can the SOAP calls be run from a Maven Plugin or does it require a container or something else?
Yes, that's possible, you do not require any kind of container to run a SOAP client.
If so, what tools should I use to do this? I've read about Apache Axis and have seen that it's capable of building a lot of things from the WSDL itself. Is this the sort of tool I should use? Do Mojos have a built in SOAP executor?
I would consider using a JAX-WS stack like JAX-WS RI which is included in Java 6. Much easier and much more elegant. Here are some tutorials to get started:
Introducing JAX-WS 2.0 With the Java SE 6 Platform, Part 1
Creating a Simple Web Service and Client with JAX-WS
Getting Started with JAX-WS Web Services
Developing JAX-WS Web Service Clients
In short, use wsimport to generate and compile the web service artifacts needed to connect to the service and use them from the Mojo.