The Holy Java

Building the right thing, building it right, fast

Posts Tagged ‘sdo’

Creating dynamic EMF model from XSDs and loading its instances from XML as SDOs

Posted by Jakub Holý on January 3, 2011

This post describes how to read a dynamic EMF model from a set of XML schema files (XSDs) and how to use that model to transform XMLs to SDO DataObjects or EMF EObjects, all this in a stand-alone environment. Read the rest of this entry »

Posted in Languages | Tagged: , , , , , , | Comments Off

Creating JAX-WS webservice using Service Data Objects (SDO) instead of JAXB-bound POJOs

Posted by Jakub Holý on December 29, 2010

If you need to invoke a logic using Service Data Objects (SDOs) from a JAX-WS webservice under Websphere 7 without the SCA Feature Pack, it is possible to do it similarly to the old approach of generating a JAX-RPC webservice from a WSDL with an SDO facade (actually building on it).

The steps are:

  1. Use RAD to generate a JAX-RPC webservice from a WSDL with an SDO facade.
  2. Implement a JAX-WS webservice accessing directly its input as XML data (i.e. implement is as a WebServiceProvider for message payload)
    • Use Transformer and StreamSource/Result to convert from/to String containing XML
  3. Copy the SDO-related classes from the JAX-RPC webservice to the JAX-WS one, exclude just the JAX-RPC webservice interface and implementation
  4. Adjust the generated EMFSOAPElementUtil – change (de)serialize methods to expect/produce a String instead of SOAPElement
  5. Put it all together in the WS implementation class created in #2
  6. Finishing touches – add conversion of org.eclipse.emf.ecore.xml.type.internal.XMLCalendar to javax.xml.datatype.XMLGregorianCalendar

Read the rest of this entry »

Posted in j2ee, Languages, WebSphere | Tagged: , , , , | Comments Off