Friday, April 08, 2005

Sun's next generation web services offering

Yesterday we released JAXRPC 2.0 Early Access - next gen web services tools and engine. Get it from here.

Main features:
  • Annotations
Pretty much a developer would annotate a remote java interface with @WebService annotation (defined by JSR 181 - Metadata for Java Web Services) and pass it on to wscompile tool of JAXRPC with configuration file to publish his web services endpoint.

import javax.jws.WebService;

@WebService
public class AddNumbersImpl {

/**
* @param number1
* @param number2
* @return The sum
* @throws AddNumbersException
* if any of the numbers to be added is negative.
*/
public int addNumbers(int number1, int number2) throws AddNumbersException {
if (number1 < 0 || number2 < 0) {
throw new AddNumbersException("Negative number cant be added!",
"Numbers: " + number1 + ", " + number2);
}
return number1 + number2;
}

}
  • WSDL -> Java customization
This is mostly applicable to Web Services client or server endpoint that compiles a WSDL. wscompile tool in JAXRPC compiles a WSDL and maps the WSDL defined components to the JAVA equivalent in a standard way that has been defined by the JAXRPC 2.0 specification.
  • Dynamic Client
A client developer can use Dispatch interface to dynamically invoke a remote webservice.
  • Dynamic Service
Provider interface can be used to develop dynamic webservice endpoint.
  • Asynchrony
JAXRPC allows asynchronous invocation of remote webservice endpoint. You can do it in one of the 2 ways: using wscompile with async customization or dyanimcally using Dispatch interface.
  • Improved Handler Framework
JAXRPC provides both Logical as well as Protocl handlers. Logical handlers will have access to only the SOAP payload, everything inside . Where as Protocol handlers will have access to the entires message.

I hope its liked by the developers!



0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home