Posts tagged XML
The challenge is a common one. We have got data in a domain model, based on POJOs. And we need to marshall that data into an XML document. Note that the exact structure of that document is not so important – we will probably translate is somewhere anyway. At this point, all we have is a set of POJO definitions. There is no XSD, no predefined XML structure.
JAXB – the Java Architecture for XML Binding – seems like the technology to turn to. My experience with JAXB has mainly been from the other end: we have XML data, described by an XSD, that we want to turn into Java Objects (unmarshall XML to Java). In that case, we take the XSD that describes the XML, generate Java classes and use JAXB to unmarshall XML into objects based on those classes. The alternative round – taking classes and marshalling them into XML would be just as simple – or even simpler, now would it not?
Well, it was not as straightforward as I hoped it would be. I thought that adding a few JAXB annotations to my existing POJO model would do the trick – but no such luck. Unless I am completely misguided and mistaken, the steps required are:
- create an XSD based on the original POJO model
- generate JAXB annotated More >
In our current webservice project with JAX-WS in Â JDeveloper Â 18.104.22.168 we have a challenge with calling a webservice. This webservice from a remote organisation does not accept specific SOAP header elements our client application creates – although we followed the contract of the WSDL correctly. Of course this webservice must follow it as well as we have to, but for now we donâ€™t have a choice but to make a workaround. Â How can we remove unwanted elements from a SOAP header? In this blog I will show you how you can do that using a JAX-WS SOAPHandler that inspects the SOAP header and removes specific addressing elements. (more…)
For a couple of months I have been discovering the Android platform. As an original Oracle developer I was wondering how an Android app can be connected to an Oracle database. For this purpose I developed an Android app that stores speed traps that users may hit while driving, into an Oracle database. The app also retrieves these speed traps from the database and draws them onto a Google map:
Yesterday evening we had our annual Oracle Open World review at our office in Nieuwegein. Around eighty people attended and all were very involved with the session. Five AMIS employees were at Oracle Open World, and each one covered one area of interest.
Before dinner Lucas gave an overview of the trends and topics that were covered at Oracle Open World. Just to convey the sheer size of OOW, Peter illustrated this by facts (number of people attending, number of lunches served, etc) as well as by photos. I’m still very impressed that they covered a four lane street (Howard street) by a tent, just to serve lunch… amazing. Marco and myself gave an overview of what AMIS was doing at OOW, as well as the Oracle ACE Directors briefing right before OOW started.
There were a number of goodies that we took from Oracle Open World to give away this evening. We decided to do it a little different this year, we organized a BuzzWord Bingo. Each of the attendees was given a bingo sheet with some of the buzzwords that would be covered during our presentations. Before we went for dinner six people had bingo and got their goodies to take home.
This time we had a Mexican Style dinner, very lovely. More >
The Mediator component in SOA Suite 11g has a the option to specify a Java Callout, one for every WSDL operation. The Java Callout refers to a Java Class, either on the SOA Suite's classpath or deployed as part of the SOA Composite application. This class should implement interface oracle.tip.mediator.common.api.IJavaCallout and a convenient way of doing so is by extending AbstractJavaCalloutImpl in package oracle.tip.mediator.common.api.
The Java Callout is invoked by the Mediator on a number of times, prior to and after performing the Routing Rule and each of the cases in it. The Java Callout class can implement a number of methods, one for each specific event or stage in the Mediator process. These methods get access to the input message as well as the transformation result. That means that the callout class can inspect, validate, log, audit and even manipulate these messages, their payloads, headers and properties. Interestingly enough, the methods are not static what I thought might be the case. The first one to be called is an initialize() that has you initialize the callout class instance to prepare the object for further callout processing. This means that all stages More >