XML
How to call a webservice directly from Java (without webservice library)
7In this blog I will show you how you can call a webservice programmatically in Java without using a webservice library like JAX-WS or Apache Axis. Normally you would use of course a webservice library, but in some cases this can be useful and quick; for example when you have problems generating a client proxy with a webservice library or if you only need some small specific parts of the SOAP response XML tree.  It shows that a SOAP call is just XML over HTTP, from a plain piece of Java code. Then, I will show you an example how you can use this and make your own servlet webservice-tester like a simple SoapUI in JDeveloper 11.1.1.3.
Turning any XML document into a Java Object graph using JAXB 2.0
0As a followup to my recent article on how to Produce and XML document based on data in a POJO structure using JAXB (http://technology.amis.nl/blog/12499/creating-an-xml-document-based-on-my-pojo-domain-model-how-will-jaxb-help-me) I will describe in this article how to go the reverse route: how to take any XML document and process it into a Java Object graph. I will do that using JAXB.
The steps described in this article are:
- create XSD based on the XML document that I want to turn into Java objects
- generate a JAXB Java class structure based on the XSD
- use JAXB to unmarshall the XML document from file or URL into the Java objects
- retrieve information from the POJOs that are instantiated by the unmarshalling
The tool I use in this article is JDeveloper 11g. However, everything is based on standard technology and will work anywhere (except for the creation of the XSD based on an XML, that is a specific XML IDE feature).
Creating an XML document based on my POJO domain model – how will JAXB help me?
1The 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 >
ODTUG KScope Preview 2011
0Ook dit jaar, namelijk op dinsdag 14 Juni, organiseert AMIS de ODTUG Preview. Het jaarlijkse congres van de ODTUG, de Oracle Development Tools Users Group, vind dit jaar plaats in Longbeach, California van 26 tot en met 30 juni. Het is niet voor iedereen weggelegd om daar naar toe te gaan. AMIS biedt, alweer voor het vijfde achtereenvolgende jaar, aan geïnteresseerden de kans om een selectie van de presentaties die daar te zien zijn bij te wonen. Een aantal Europese sprekers zal tijdens de AMIS ODTUG preview presentatie laten zien die ook in de Verenigde Staten worden gehouden. Tijdens de AMIS ODTUG Preview zullen er drie keer drie parallelle sessies worden gehouden met verschillende onderwerpen zoals APEX, database development, ADF, JHeadstart en SOA.
Programma:
Tijd Track 1 Track 2 Track 3 16:30 Welkom en Registratie 17:00 XFILES, the APEX 4 Version: The Truth is in There…Marco Gralike & Roel Hartman ADF Developers – Make the Database Work for YouLucas Jellema Pipelined Table FunctionsPatrick Barel 18:00 Dinner 19:00 APEX Face/Off – Designing a GUI with APEX Templates and ThemesChristian Rokitta BPMN: The New Silver Bullet?Lonneke Dikmans Building Highly More >
Oracle XBRL Extention – Second Release now available for Download
0The XBRL Extention, a no cost add-on extention on XML-DB targeting the Extensible Business Reporting Language area, is now available for download. This second release ( p12388668_112020_Generic.zip ) of the Oracle XBRL Extension can be downloaded from the Oracle Support site (https://support.oracle.com). Once you have downloaded the file, please follow the instructions in the README.txt file to install the software.
Here are what’s new in the new in this release:
- New routines createStarSchemaFromFact and createStarSchemaFromHC have been added to PL/SQL package DBMS_ORAXBRLV to retrieve the list of table (view) names of a generated star schema.
- New routine DTS_filelist has been added to PL/SQL package DBMS_ORAXBRL to retrieve a discoverable taxonomy set (DTS).
For more info about the Oracle XBRL Extention see also “Oracle XBRL Extension Ready for Download”.
XFILES APEX Community Edition (XACE)
0Roel Hartman and me are currently very busy with our Kaleidoscope 2011 presentation “XFiles, the APEX Version: The Truth is in There…“. During this presentation, we will demonstrate the awesome possibilities you can create when you combine the APEX and XMLDB functionality of the APEX database environment. And as you probably also know, two “no cost options” delivered with your Oracle database. Our first presentation/demo will be on the AMIS Kaleidoscope Preview Sessions on the 14th of June, to test our “setup” and combined presentation for the real thing during Kaleidoscope, in Long Beach, USA, this year.
BackgroundThe demo will demonstrate how to setup database build-in versioning capabilities, based on standard XMLDB functionality, that can be used by or for APEX applications, while making use of the file/folder metaphor of the XDB Repository.
Recent Comments