Friday Jul 13, 2007

users@metro = users@wsit + users@jax-ws

Metro - the Web services stack in GlassFish - was announced recently. It was basically creating a single entity for two related projects - JAX-WS RI and Project Tango. The next logical step is to create a single place where users can ask questions and search for already existing answers. Here are some of the changes Koshuke made in that direction:

We are working on consolidating the JAX-WS and JAXB and WSIT forums as well.

Technorati: metro webservices wsit jax-ws glassfish

Friday Jun 29, 2007

Screencast #WS6: Eclipse Europa and GlassFish

Eclipse 3.3 (codename Europa) was released earlier today. As mentioned earlier, we have an exciting news for GlassFish developers!

Starting today, Eclipse IDE for Java EE developers has the capability to register GlassFish V1, V2 and V3 containers from within the IDE. It supports web application directory deployment and has a fully integrated debugger.  Ludo published detail instructions on how to configure Eclipse 3.3 for GlassFish, deploy a Web project and debug a JSP. You can also watch the same steps in this screen cast with an additional detail on how to deploy a JAX-WS compliant Web service on GlassFish using Eclipse IDE.

Enjoy it here!



Technorati: eclipse europa glassfish webservices jax-ws screencast

Tuesday Jun 19, 2007

Announcing Metro - Naming the Web Services stack in GlassFish

The GlassFish V2 Web services stack consists of JAX-WS as the core platform and Project Tango (aka Web Services Interoperability Technology, WSIT) as an implementation of key WS-\* specifications on top of it. This stack, so far referred as "JAX-WS RI + Project Tango", now has a new name - Project Metro.

Why name Project Metro ? - JAX-WS, the core platform, uses Tube as a basic processing unit that represents SOAP-level protocol handling code such as MustUnderstand and WS-Addressing processing. Multiple tubes are put together in a sequential fashion to complete the SOAP message handling. Project Tango uses this extensible architecture to implement they key WS-\* specs, such as Reliable Messaging and Atomic Transactions, as Tubes as well. Effectively, all your SOAP messages are moved from one point (client) to another (endpoint), potentially spanning intermediaries, through Tubes. This is a direct correlation to Metro (aka Rapid Transport) that exists all over the world.

What is Metro ? - A picture is worth a thousand words - this shows all the components of Metro.

The two main components of Metro are:

  • JAX-WS - The Core Web services platform
  • WSIT - Implementation of key WS-\* specs and interoperability with .NET 3.0

The Core Web services that provides all the SOAP message functionality, including WS-Addressing and MTOM, is available from JAX-WS. Project Tango implements Security, Reliability and Transactions on this Core layer that interoperate with Windows Communication Foundation. All the applications on Metro can be easily developed using NetBeans 5.5.1 and deployed on GlassFish V2.

How does Metro provide interoperability with .NET 3.0 ? - Metro provides a complete Web services solution for both homogeneous and heterogeneous architectures. For any Web service, there is a Client that invokes an Endpoint. The Endpoint advertises the metadata which the Client uses to bootstrap communication with the Endpoint. This metadata indicates which of the capabilities - security, reliability and transactions - are supported at the Endpoint. For a Metro Client or Endpoint, NetBeans IDE 5.5.1 or later takes care of processing all the details.

 

The figure shows a pair of Client and Endpoint - one using the Metro Web services stack and the other using .NET 3.0. The Metro Client and Endpoint can be deployed on any of the GlassFish V2 supported platforms (Solaris Sparc, Solaris X86, Windows, Linux and MacOS). The .NET 3.0 Client and Endpoint can be deployed on any of the .NET 3.0 supported platforms (Windows Vista, Windows 2003 Server and Windows XP + SP2).

For a homogeneous architecture, where both Client and Endpoint are using Metro, the arrow labeled 1 shows a Metro Client invoking a Metro Endpoint. If this serves your purpose, then all you need is GlassFish V2 for WSIT runtime, NetBeans IDE for tooling and WSIT tutorial.

For a heterogeneous architecture, where only one of Client or Endpoint is using Metro and the other is based on .NET 3.0, the arrow labeled 2 and 3 shows a Metro client can invoke a .NET 3.0 endpoint and a .NET 3.0 client can invoke a Metro endpoint respectively. This use case has been extensively tested as well by participating in multiple plug-fests with Microsoft.

What is the change ? - The biggest change you'll notice is a unified single name for what was called "GlassFish Web services stack" or "JAX-WS RI + Tango" so far. This is only a consolidation of our multiple offerings and is backed up high quality, high-performance and production-ready Web services stack integrated in GlassFish V2. This stack is also tested on Tomcat and has been reported to run on Jetty and JavaSE as well.

Metro Binary 1.0 M5, aligned with Tango Milestone 5, already integrated in GlassFish V2 b50, is available for download. The JAX-WS and Tango binaries and documentation are still available for download but will be aligned with Metro over time.


Discover Metro

Use Metro

Extend Metro

Technorati: webservices glassfish metro wsit jax-ws

Monday Jun 18, 2007

Tango on JavaSE 6

Fabian explained how WSIT features can be configured on Java SE 6 Endpoint API exposed as part of JAX-WS 2.1. In this blog, I start with a Reliable Messaging-enabled endpoint developed using NetBeans IDE 5.5.1 and WSIT plug-in and then provide detailed steps, along with code, to deploy it in Java SE 6.

  1. Create a Reliable Web service endpoint using WSIT plug-in and NetBeans 5.5.1 by watching this screencast.
  2. Download and install WSIT Milestone 5. Copy webservices-api.jar in Java SE 6 'jre\\lib\\endorsed' directory.
  3. All the capabilities enabled at an endpoint, such as Reliable Messaging for this one, are stored in the WSIT configuration file. In NetBeans IDE, expand your Project, 'Web Pages', 'WEB-INF'. The configuration file be named something similar to 'wsit-server.HelloWebService.xml' following the format 'wsit-<packageName>.<ServiceName>.xml'. Here is how the config file looks like:
    	
    <?xml version="1.0" encoding="UTF-8"?> <definitions
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="HelloWebServiceService" targetNamespace="http://server/" xmlns:tns="http://server/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsaws="http://www.w3.org/2005/08/addressing" xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy">
    <message name="sayHello"/>
    <message name="sayHelloResponse"/>
    <portType name="HelloWebService">
    <wsdl:operation name="sayHello">
    <wsdl:input message="tns:sayHello"/>
    <wsdl:output message="tns:sayHelloResponse"/>
    </wsdl:operation>
    </portType>
    <binding name="HelloWebServicePortBinding" type="tns:HelloWebService">
    <wsp:PolicyReference URI="#HelloWebServicePortBindingPolicy"/>
    <wsdl:operation name="sayHello">
    <wsdl:input/>
    <wsdl:output/>
    </wsdl:operation>
    </binding>
    <service name="HelloWebServiceService">
    <wsdl:port name="HelloWebServicePort" binding="tns:HelloWebServicePortBinding"/>
    </service>
    <wsp:Policy wsu:Id="HelloWebServicePortBindingPolicy">
    <wsp:ExactlyOne>
    <wsp:All>
    <wsaws:UsingAddressing xmlns:wsaws="http://www.w3.org/2006/05/addressing/wsdl"/>
    <wsrm:RMAssertion/>
    </wsp:All>
    </wsp:ExactlyOne>
    </wsp:Policy>
    </definitions>
    Copy this config file by the name wsit-server.HelloWebService.xml in META-INF directory in your classpath.
  4. The Web service implementation class looks like:
    package server;

    import javax.jws.\*;

    @WebService(targetNamespace="http://server/")
    public class HelloWebService {
        @WebMethod
        public String hello(@WebParam(name="name")String text) {
            return "Hello " + text;
        }
    }
    As you see, this is a plain JAX-WS Web service endpoint class.
  5. The JAX-WS Endpoint code that starts the Web service endpoint looks like:
    package server;
    
    import java.io.IOException;
    import javax.xml.ws.Endpoint;
    
    public class Main {
    
       private static final int PORT = 58888;
       private static final String HOST = "localhost";
    
       public static void main(String[] args) {
            Endpoint endpoint = Endpoint.create(new HelloWebService());
            String address = "http://" + HOST + ":" + PORT + "/";
            endpoint.publish(address);
            System.out.println("Endpoint hosted at ... " + address);
       }
    }
    
  6. The sequence of commands to deploy the endpoint is:
    "\\Program Files\\Java\\jdk1.6.0_01\\bin\\javac.exe" -d . server\\\*.java
    "\\Program Files\\Java\\jdk1.6.0_01\\bin\\wsgen.exe" -cp . server.HelloWebService
    java -classpath .;\\jax-ws-latest-wsit\\lib\\webservices-rt.jar server.Main
  7. And then you see the following output on the command prompt:
    java -classpath .;C:\\testbed\\jax-ws-latest-wsit\\lib\\webservices-rt.jar server.Main
    Jun 18, 2007 4:46:34 PM [com.sun.xml.ws.policy.jaxws.PolicyConfigParser] parse
    INFO: WSP1049: Loaded WSIT configuration from file:
    file:/C:/workarea/wsit/javase6/META-INF/wsit-server.HelloWebService.xml
    Jun 18, 2007 4:46:34 PM [com.sun.xml.ws.tx.common.TxMapUpdateProvider] update
    INFO: WSTX-COMMON-2005: running in a non Java EE container; disable mapping of Container Managed Transaction EJB to WS-AT Policy assertions due to 'javax/ejb/TransactionManagement'
    Endpoint hosted at ... http://localhost:58888/

That's it, the endpoint now deployed at 'http://localhost:58888/MyService?wsdl' is Reliable Messaging enabled. This endpoint can be invoked using any of the methods shown here.

Technorati: webservices wsit jax-ws glassfish javase6

Sunday May 13, 2007

Salesforce is now JAX-WS enabled!

29,800 customers and 646,000 subscribers of salesforce.com - they can now use fast and furious JAX-WS tools and runtime to access and interact with their applications programmatically. The JAX-WS team at Sun has worked closely with Salesforce team to create QuickStart, Enterprise and Partners (to be hosted soon) bundles using JAX-WS 2.1.1. Each bundle is

  • Self-contained, with all pre-generated client-side artifacts and JAX-WS libraries required to invoke a standard (quickstart, enterprise and partner) WSDL
  • Scripts to invoke the endpoint in the main directory
  • Instructions (in etc directory) on how to re-generate your artifacts if you have a custom WSDL using
    • Scripts in the bin directory
    • A template build.xml (in etc directory) for Ant scripts

salesforce.com processes more API transactions than it does Web browser / UI requests and JAX-WS bundles are very well equipped to handle that. This is the same JAX-WS that is also available in GlassFish v2.

Use these bundles and let us know your feedback.

Read more details here.

Technorati: jaxws webservices salesforce glassfish

Friday Apr 27, 2007

Sun Web Services @ JavaOne 2007

Follow up post from here.

Here is a complete list of Sun Web services technical sessions/birds-of-feather sessions, including date and time, at JavaOne 2007:

Monday May 7, 2007
 10:30am-7:30pm   GlassFish Day
Tuesday May 8, 2007
 6:00pm-7:00pm TS-6411 JSR 311: The Java API for RESTful Web Services
 8:00pm-8:50pm BOF-8034 Extending and Embedding the Java API for XML Web Services (JAX-WS) 2.1 Reference Implementation
Wednesday May 9, 2007
 3:50pm-5:20pm LAB-3350 Make Java Technology and .NET 3.0 Interoperability Work With WSIT
 4:10pm-5:10pm TS-4865 Takes two to Tango: Java Web Services and .NET Interoperability
 7:55pm-8:45pm BOF-6412 Describing RESTful Applications: WADLing with Java
 8:55pm-9:45pm BOF-4612 Java Platform, Enterprise Edition (Java EE): Meet the Experts (Part 2)
Thursday May 10, 2007
 9:35am-11:35am LAB-5410 Using Identity to Secure Web Services
 10:55am-11:55am TS-8897 Designing Service Collaborations: The Design of "Wire"-Centric Integration
 2:50pm-3:50pm TS-4948 Unleashing the Power of JAX-WS RI: Spring, Stateful Web Services, SMTP, and More
 5:30pm-6:30pm TS-8840 Services Interoperability with Java Technology and .NET: Technologies and Tools for Web 2.0
 7:55pm-8:45pm BOF-4108 Reliable, Transacted, and Secure Web Services Between Java and .NET, Using WSIT
Friday May 11, 2007
1:30pm-2:20pm TS-4865 Takes two to Tango: Java Web Services and .NET Interoperability

Note, TS-4865 is a repeat session.

Technorati: Javaone WSIT JAX-WS JAXWS presos

Thursday Apr 05, 2007

JAX-WS in Glassfish - way to go

Redirecting you to Joe Ottinger's (editor of The Server Side) blog.

Technorati: jax-ws glassfish webservices

Friday Mar 09, 2007

Web Services @ JavaOne

JavaOne 2007 complete session schedule is now available.  As I mentioned earlier, this is going to be lots of fun. If you are interested in hearing about Sun's Web services strategy, here is a compilation of all the related sessions:

Session# Title
TS 4865 Takes two to Tango: Java Web Services and .NET Interoperability
TS 4948 Unleashing the Power of JAX-WS RI: Spring, Stateful Web Services, SMTP, and More
TS 6411 JSR 311: The Java API for RESTful Web Services
TS 8840 Services Interoperability with Java Technology and .NET: Technologies and Tools for Web 2.0
BOF 6412 Describing RESTful Applications: WADLing with Java

There is more Web services content that has not been publicly announced yet. I'll update the blog when it is. While we are working to provide you a rich content during this year's presentations, here is an archive of the Web services sessions from JavaOne 2006

Session # Title
TS 1194 Java API for XML Web Services (JAX-WS) 2.0
TS 1222 RESTful Web Services With JAX-WS
TS 1603 Reliable and Transacted Web Services between Java™ Technology-Based Project Tango and Microsoft Indigo
TS 3473 Web Services Security, WS-Trust, WS-Policy, and WS-SecureConversation Using Java™ Web Services Developer Pack
TS 4661 Composable Web Services Using Interoperable Technologies from Sun's "Project Tango"
TS 5540 Making Java™ Technology-Based/.NET Web Services Interoperability Real
TS 9263 Recommendations for Web Services Development

And if you are interested in attending JavaOne 2007 and save $200, then register today.

Technorati: Javaone WSIT JAX-WS JAXWS presos

Tuesday Feb 27, 2007

Screencast #WS4: How to install WSIT plug-in on NetBeans IDE 5.5.1 using Update Center ?

NetBeans 5.5.1 IDE Beta was released earlier this week. Along with it, the WSIT plug-in modules were released as part of Update Center. So now if you want to install WSIT plug-in in NetBeans, you no longer have to manually download the modules and then install them. This screencast shows you how to install the WSIT plug-in on NetBeans IDE 5.5.1 using Update Center.

Enjoy it here.

Technorati: Web services NetBeans GlassFish WSIT JAX-WS screencast

Saturday Feb 24, 2007

Ask The Experts next Week for JAX WS

If you are new to Web services and would like to know how to write a simple Web service; or if you are a veteran and would like to know performance tuning tips on JAX-WS. Please scratch your head and ask your mind for any questions on anything JAX-WS (2.0 or 2.1) because next week is an open invitation to ask Vivek, Kohsuke and Jitu, representation of Sun's JAX-WS engineering team. JAX-WS team is waiting for your questions and will enjoy answering them.

Although the campaign is scheduled for Feb 26 - Mar 2 but I realize you can already submit questions here.

JAX-WS 2.1 bits are available as part of GlassFish v2.

Technorati: JAX-WS Web services GlassFish

About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today