Content available at: http://blogs.sun.com/arungupta/entry/java_ee_6_glassfish_31
Java Web Services and XML
Google seem to be inventing a JSON variant of WADL.
JAX-WS 2.2 is integrated into JDK 7 b100
JAX-WS endpoints are hosted using Grizzly's HTTP implementation and this extension uses standard JAX-WS 2.2 HTTP SPI
This is a new series of blogs which will cover what is new in JavaEE 6 with respect to WebServices
One of the new features of JavaEE 6 is ability to package ejb in a war. The EJB specification has always required that enterprise beans
be packaged in an enterprise module called an ejb-jar file.
Since it is common for Java EE web applications to use enterprise beans, this packaging requirement can...
1) Basic understanding about web service
2) Knowledge of base 64 encoding
3) Knowledge of MTOM
Refer resource section for information on these topics.
Web service has been evolved from simple request-response mechanism to object oriented style support...
I decided to write down the answer for some questions which my book's readers email me or ask me via twitter in my weblog so everyone can benefit from the answers. Here is the answer to the first question which involves custom security realms.
GlassFish supports 5 types of security realms out of the box which are sd follow:
File Realm: Usefull for development and testing purposes. GlassFish...
Last week saw the release of WADL tools for Ruby, Python and C#.
In which our hero makes Jersey dance in ways that probably make the Jersey authors take to their sick beds with a headache.
This week is my last at Oracle, next week I'll be starting a new job with Mitre.
I started looking around for a "Plan B" prior to the Sun acquisition closing in February, mainly due to uncertainty about whether I'd be offerred a position with Oracle. A friend introduced me to an excellent opportunity at Mitre and, after a couple of rounds of interviews and a lot of thought, Plan B...
Recently a user in GlassFish forum asked about developing JAX-WS web service in an OSGi bundle. Here is a complete sample demonstrating the same. You can download it from here.
As the above diagram shows, we have three components, viz:
1) osgi-service.jar: This is an OSGi bundle which provides a service to other bundles. It contains two POJOs, viz:
a) an interface called sahoo.hybridapp.jaxws1.service.Watch
b) an implementation of the same interface called sahoo.hybridapp.jaxws1.service.WatchImpl.
This bundle also contains a bundle activator called sahoo.hybridapp.jaxws1.service.Activator, which is responsible for registering an instance of WatchImpl in OSGi service registry.
2) web-service.war: This is a Web Application Bundle. A Web Application Bundle is a hybrid application - it's both a Java EE archive as well as an OSGi bundle. In this case, it is a war file as well as an OSGi bundle. It's a war file, because it contains a Servlet based JAX-WS end point. It's an OSGi bundle, because we want to make use of OSGi service in the implementation of our web service. It contains a single class called sahoo.hybridapp.jaxws1.webservice.WatchWebService which is defined like this:
The MANIFEST.MF of web-service.war looks like this:
3) web-service-client.jar: This is a plain jar file which makes use of JAX-WS stack of Java SE environment to invoke our web service. It has a single class called sahoo.hybridapp.jaxws1.webserviceclient.Main. The rest of the classes that are part of this jar are generated by wsdl compiler as part of build.
How to build, deploy and test:
Step 1: Start GlassFish
Step 2: Build and deploy the service bundles
mvn clean install
This will produce two OSGi bundles called osgi-service/target/osgi-service.jar and web-service/target/web-service.war. Deploy these two OSGi bundles to GlassFish by simply copying them to domain1/autodeploy/bundles/ dir as shown below:
cp osgi-service/target/osgi-service.jar web-service/target/web-service.war $glassfish.home/domains/domain1/autodeploy/bundles/
GlassFish will automatically detect that web-service.war is a WAB and will perform necessary deployment of EE artifacts as a result of which a web service end point will be available. You can see something like this appearing in server.log:
WS00018: Webservice Endpoint deployed
WatchWebService listening at address at http://localhost:8080/hybridapp.jaxws1.web-service/WatchWebServiceService
Step 3: Build and run the client
Once the web service is available, run
mvn -f web-service-client/pom.xml
to build web-service-client.jar. This is because the WSDL url, as specified in web-service-client/pom.xml, is not available until the web service is deployed.
To test, simple run:
java -jar web-service-client.jar
You shall see it will print the current time as obtained from the web service which in turn obtrains it from the OSGi service.
Enjoy developing OSGi enabled Java EE applications in GlassFish.
If you are using Ant 1.7.1 for developing Web Services with JAX-WS/JAXB, I suggest you to move to the latest version Ant 1.8.0.
Content available at: http://blogs.sun.com/arungupta/entry/spark_it_2010_trip_report
I've extended the declarative hyperlinking module to support creation of HTTP Link headers.
JAX-WS RI team is pleased to announce the release of 2.2.1 version
Announcing the release of Apache Pivot version 1.5.
This a rather long article covering OpenESB (Open ESB) administration and management along with discussing a complete sample application shows how to develop solutions based on OpenESB
Java EE Security refcard is available for download. This refcard covers Java EE 6 security and discuss how each application server supports the specs. The refcard covers authentication, authorization, and transport security in Web Application, EJB application and web services by introducing the concept and the related annotations and deployment descriptors which help us realize the concept.
Java User Groups
Last week's kickoff of FESI's research program went very well. There are a number of folks (>500) who are now following this blog on Java.net, and a number who have gotten involved. While we wait for more folks, we'll be researching new technologies, the first being NOSQL databases.
If the kind of topics we're research interests you, please feel free to join the project;...