Monday, December 31, 2012

WS-I Basic Profile versions

WS-I stands for Web Services Interoperability industry consortium (WS-I). WS-I provides interoperability guidance for core Web Services specifications such as SOAP, WSDL, and UDDI. 

The profile uses Web Services Description Language (WSDL) to enable the description of services as sets of endpoints operating on messages.

WS-I versions are given below:

  1. Version 1.0 of this profile was released in early 2004.
  2.  Version 1.1 published in 2006 does not have the same scope as version 1.0. The part of version 1.0 dealing with serialization of envelopes and their representation in messages has been moved to a new profile called Simple Soap Binding Profile (SSBP)
  3.  Version 1.2 was finalized in November 2010. The main new features are the support for MTOM binary attachments and WS-Addressing
  4.  Version 2.0 was also published in November 2010. It uses SOAP 1.2, UDDI 3 and WS-Addressing
To read more on WS-I please click on this link


 

XML-to-Java mappings used by JAX-WS

In this post i am not going to discuss more details on XML-to-Java object mapping used by JAX-WS.

I will describe, when JAX-WS maps, XML element or attribute declaration to Java primitive wrapper class. Most of the time, during designing/writing schema definition(XSD) for web service, we are not thinking about that XML-to-Java conversion, hence later on it will become a issue while debugging web service.

There are mainly three conditions when XML element or attribute declaration converted to Java primitive wrapper class used by JAX-WS.

  1. When element declaration contains "minCccurs=0" attribute.
  2. When element declaration contains "nillable=true" attribute.
  3. When attribute declaration contains "use=optional" attribute. 
Examples:





In the above element/attribute declaration "short/boolean" primitive datatype is converted to "short/boolean" primitive wrapper class.