Skip to main content

Home/ Java Development/ Group items tagged XML

Rss Feed Group items tagged

Hendy Irawan

XStream - a simple library to serialize objects to XML and back again. - 0 views

  •  
    XStream is a simple library to serialize objects to XML and back again. Features Ease of use. A high level facade is supplied that simplifies common use cases. No mappings required. Most objects can be serialized without need for specifying mappings. Performance. Speed and low memory footprint are a crucial part of the design, making it suitable for large object graphs or systems with high message throughput. Clean XML. No information is duplicated that can be obtained via reflection. This results in XML that is easier to read for humans and more compact than native Java serialization. Requires no modifications to objects. Serializes internal fields, including private and final. Supports non-public and inner classes. Classes are not required to have default constructor. Full object graph support. Duplicate references encountered in the object-model will be maintained. Supports circular references. Integrates with other XML APIs. By implementing an interface, XStream can serialize directly to/from any tree structure (not just XML). Customizable conversion strategies. Strategies can be registered allowing customization of how particular types are represented as XML. Error messages. When an exception occurs due to malformed XML, detailed diagnostics are provided to help isolate and fix the problem. Alternative output format. The modular design allows other output formats. XStream ships currently with JSON support and morphing.
Paul Sydney Orozco

http://www.adobocode.com/spring/marshallingunmarshalling-java-objects-into-xml-file-usi... - 0 views

  •  
    The release 3.0 of Spring Framework added the Spring Module OXM which supports the marshalling and unmarshalling of Java objects and XML documents.In this post, we will be using Spring OXM to take a Java object, convert it to a XML-format and save it in the hard-disk as an XML file containing information of that Java object. We will also cover how to retrieve back the serialized state of that XML file and reconstruct it back to it's original state as a Java object.
Hendy Irawan

Apache CXF -- Index - 0 views

  •  
    Apache CXF is an open source services framework. CXF helps you build and develop services using frontend programming APIs, like JAX-WS and JAX-RS. These services can speak a variety of protocols such as SOAP, XML/HTTP, RESTful HTTP, or CORBA and work over a variety of transports such as HTTP, JMS or JBI. CXF includes a broad feature set, but it is primarily focused on the following areas: Web Services Standards Support: CXF supports a variety of web service standards including SOAP, the WS-I Basic Profile, WSDL, WS-Addressing, WS-Policy, WS-ReliableMessaging, WS-Security, WS-SecurityPolicy, WS-SecureConverstation, and WS-Trust (partial). Frontends: CXF supports a variety of "frontend" programming models. CXF implements the JAX-WS APIs (TCK compliant). CXF JAX-WS support includes some extensions to the standard that make it significantly easier to use, compared to the reference implementation: It will automatically generate code for request and response bean classes, and does not require a WSDL for simple cases. It also includes a "simple frontend" which allows creation of clients and endpoints without annotations. CXF supports both contract first development with WSDL and code first development starting from Java. For REST, CXF also supports a JAX-RS (TCK compliant) frontend. Ease of use: CXF is designed to be intuitive and easy to use. There are simple APIs to quickly build code-first services, Maven plug-ins to make tooling integration easy, JAX-WS API support, Spring 2.x XML support to make configuration a snap, and much more. Binary and Legacy Protocol Support: CXF has been designed to provide a pluggable architecture that supports not only XML but also non-XML type bindings, such as JSON and CORBA, in combination with any type of transport. To get started using CXF, check out the downloads, the user's guide, or the mailing lists to get more information!
Hendy Irawan

Jettison - Home - 0 views

  •  
    Jettison is a collection of Java APIs (like STaX and DOM) which read and write JSON. This allows nearly transparent enablement of JSON based web services in services frameworks like CXF or XML serialization frameworks like XStream. There are currently two included conventions for mapping JSON to XML. The first, is BadgerFish which implements the full XML infoset in JSON using various techniques. The second, is called the "mapped" convention. It allows you to manually map XML namespaces to JSON element prefixes. Jettison was developed for usage in XFire and CXF to enable JSON based services. Later it also found its place in Java object serialization with XStream To learn more, see the User's Guide.
Hendy Irawan

HowToConfigureExtendedWADL - Jersey: RESTful Web services made easy - wikis.sun.com - 0 views

  •  
    "This page describes how you can get an extended WADL from your REST app. It aligns mostly with the extended-wadl-webapp sample and uses these features: Add additional doc tags to the WADL Create JAXB beans from xsd - you might also create the schema from your beans Add the grammars element that includes the xsd file from which JAXB beans were generated to the WADL Add javadoc from your resource classes to the WADL, using most of the supported javadoc tags For getting the extended WADL as described above these things have to be done: Configure the maven-jaxb-plugin to create JAXB beans from xsd - this is described here just to describe what's done in the sample. Add the application-doc.xml and application-grammars.xml to the build classpath Configure the maven-javadoc-plugin with the ResourceDoclet provided by the wadl-resourcedoc-doclet artifact to create the resource-doc.xml. Create a subclass of WadlGeneratorConfig that defines/configures the WadlGenerators to use Specify your custom WadlGeneratorConfig in the web.xml as the WadlGeneratorConfig"
anonymous

Organize Projects - Google Web Toolkit - Google Code - 0 views

  • com.google.gwt.gears.Gears
    • anonymous
       
      Gears.gwt.xml does not define andy entry point. It can only be inherits
  • two ways to approach loading them
  • nclude each module with a separate <script> tag
  • ...118 more annotations...
  • Create a top level module XML definition
  • Compile the top level module
  • the second approach will lead to much better end-user performance
  • each module has to be downloaded separately by the end-user's browser
  • each module will contain redundant copies of GWT library
  • conflict with each other during event handling
  • Linkers are divided into three categories, PRE, POST, and PRIMARY
  • one primary linker is run for a compilation
  • everal linkers are provided by Core.gwt.xml, which is automatically inherited by User.gwt.xml.
  • monolithic JavaScript file.
  • cross-site deployment model.
  • standard iframe-based
  • <add-linker name="xs" />
  • The GWT compiler
  • packaging its output with the Linker subsystem
  • responsible for the final packaging of the JavaScript code
  • providing a pluggable bootstrap mechanism
  • re-use an existing Java API for a GWT project,
  • <super-source>
  • "re-root" a source path
  • to emulate part of the JRE not implemented by GWT
  • tells the compiler to add all subfolders of com/example/myproject/jre/
  • to the source path
  • com/google/myproject/gwt/jre/java/util/UUID.java
  • most commonly used elements in the module XML file.
  • <inherits name="
  • herits all the settings from the specified module
  • <entry-point class=
  • Entry points are all compiled into a single codebase
  • when the onModuleLoad() of your first entry point finishes, the next entry point is called immediately.
  • Any number of entry-point classes can be added
  • <source path="
  • resources get copied into the output directory during a GWT compile.
  • client subpackage is implicitly added to the source path
  • <public path="path" />
  • treated as a publicly-accessible resource.
  • resources get copied into the output directory
  • the public subpackage is implicitly added to the public
  • <servlet
  • For RPC, this element loads a servlet class
  • mounted at the specified URL path
  • path=
    • anonymous
       
      monting location
  • class="
    • anonymous
       
      Which servlet class
  • URL path should be absolute
  • @RemoteServiceRelativePath attribute
  • you must configure a WEB-INF/web.xml in your war directory to load any servlets needed.
  • n development mode,
  • <script src="
  • external JavaScrip
  • <stylesheet src="
  • Extends the set of values
  • for an existing client property
  • <replace-with-class>
  • <generate-with-class>
  • <when-property-is
  • three different types of predicates are
  • <when-type-assignable
  • <when-type-is
  • <all>
  • <any>
  • <none>
  • GWT libraries are organized into modules
  • you want to inherit at least the User module
  • contains all the core GWT functionality
  • including the EntryPoint class
  • widgets and panels
  • History feature
  • Internationalization
  • DOM programming, and more
  • Low-level HTTP
  • Use the following syntax to cause an external JavaScript file to be loaded
  • before your module entry point is called.
  • as if you had included it explicitly using the HTML <script
  • loaded before your onModuleLoad() is called.
  • all included scripts will be loaded when your application starts, in the order in which they are declared.
  • associate external CSS files with your module
  • GWT.getModuleBaseURL() + "foo.css" in client code
  • module's public path
  • useful when
  • inheritance makes resource inclusion particularly convenient.
  • If you wish to create a reusable library that relies upon particular stylesheets or JavaScript files, you can be sure that clients
  • see the documentation for FileSet for a general overview
  • <public>
  • <super-source>
  • <source>
  • includes
  • excludes
  • defaultexcludes
  • casesensitive
  • By default, the patterns listed here are excluded.
  • defaultexcludes is true
  • <script src='myApp/myApp.nocache.js'></script>
  • <script> tags always block evaluation of the page
  • <img> tags do not block page evaluation
  • two simultaneous connections
  • The body.onload() event will only fire once all external resources are fetched, including images and frames.
  • GWT selection script
  • like a normal script tag
  • but the compiled script will be fetched asynchronously.
  • Parsing is blocked until externalScriptZero.js is done fetching and evaluating.
  • myApp/myApp.nocache.js completes
  • the compiled scrip
  • (<hashname>.cache.html
  • begins fetching in a hidden IFRAME (this is non-blocking).
  • onModuleLoad() is not called yet, as we're still waiting on externalScriptOne.js
  • body.onload() fires
  • onload='alert("w00t!")
    • anonymous
       
      is the last line executed
  • put the GWT selection script as early as possible
  • because it won't block any other script requests
  • <img> tags are not guaranteed to be done loading when onModuleLoad() is called
  • <script> tags are guaranteed to be done loading when onModuleLoad() is called
  • multiple EntryPoints
  • will all be called in sequence as soon as that module (and the outer document) is ready
  • multiple GWT modules within the same page
  • each module's EntryPoint will be called as soon as both that module and the outer document is ready
  • EntryPoints are not guaranteed to fire at the same time
  • or in the same order
  • in which their selection scripts were specified in the host page
Hendy Irawan

The Castor Project - 0 views

  •  
    Castor is an Open Source data binding framework for Java[tm]. It's the shortest path between Java objects, XML documents and relational tables. Castor provides Java-to-XML binding, Java-to-SQL persistence, and more.
Paul Sydney Orozco

Tutorial On Spring with Hibernate and Java Persistence API - 0 views

  •  
    Sample of using Hibernate Annotations by reducing XML configuration files thus making it simpler to define required metadata directly into our Java code. When using annotations, we no longer need the additional mapping file (*.hbm.xml). The metadata for the ORM is specified in the individual classes.
anonymous

Mit JAXB einfach von XML Daten zu Java Objekten - 0 views

  •  
    XML -> XSD -> JAXB Objects
Hendy Irawan

XOM - 0 views

  •  
    XOM™ is a new XML object model. It is an open source (LGPL), tree-based API for processing XML with Java that strives for correctness, simplicity, and performance, in that order.
Hendy Irawan

jaxen: universal Java XPath engine - jaxen - 0 views

  •  
    "Jaxen is an open source XPath library written in Java. It is adaptable to many different object models, including DOM, XOM, dom4j, and JDOM. Is it also possible to write adapters that treat non-XML trees such as compiled Java byte code or Java beans as XML, thus enabling you to query these trees with XPath too. "
Hendy Irawan

dom4j - Introduction - 0 views

  •  
    "dom4j is an easy to use, open source library for working with XML, XPath and XSLT on the Java platform using the Java Collections Framework and with full support for DOM, SAX and JAXP. "
Hendy Irawan

enunciate - 0 views

  •  
    "Enunciate is an engine for dramatically enhancing your Java Web service API. It's simple. You develop your Web service API using standard Java technologies and attach Enunciate to your build process. Suddenly, your Web service API is boasting some pretty impressive features: Full HTML documentation of your services, scraped from your JavaDocs. Client-side libraries (e.g. Java, .NET, iPhone, Ruby, Flex, AJAX, GWT, etc.) for developers who want to interface with your API. Interface Definition Documents (e.g. WSDL, XML-Schema, etc.) Etc."
Arup Vidyerthy

The NetBeans E-commerce Tutorial - Connecting the Application to the Database - 0 views

  • sun-resources.xml
    • Arup Vidyerthy
       
      This is incorrect. NetBeans generates glassfish-resources.xml
  • items="categories.rows"
    • Arup Vidyerthy
       
      I have items="${categories.rows}"
Hendy Irawan

Articles | OcpSoft - JSF2 | SEO | Bookmarking | Java | Best Practices | Agile - 0 views

  •  
    "The PrettyFaces team is currently working on an alternative way to configure URL mappings. PrettyFaces will soon allow to use annotations instead of the classic XML configuration file to declare mappings. We encourage everyone interested in PrettyFaces to take a look at this new way of configuration and share his or her opinion with us."
anonymous

untitled - 0 views

  • initWidget(uiBinder.createAndBindUi(this));
    • anonymous
       
      To inizialize the "menber variable" whith the widget object described in the XML view despription
  • uiBinder.createAndBindUi(this)
  • GWT compiler won't actually visit this URL to fetch the file, because a copy of it is baked into the compiler
  • ...15 more annotations...
  • @UiField have default visibility
  • UIObject
  • DivElement
  • If your factory method needs arguments, those will be required as attributes.
  • Every widget that is declared in a template is created by a call to GWT.create().
  • @UiConstructor annotation.
  • you can mark your own widgets with
  • CricketScores has no default (zero args) constructor
  • you can define a @UiFactory method on the UiBinder's owner
  • annotate a constructor of CricketScores with @UiConstructor.
  •   @UiFactory
  • public class UserDashboard extends Composite {  interface MyUiBinder extends UiBinder<Widget, UserDashboard> {}  private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);  public UserDashboard() {    initWidget(uiBinder.createAndBindUi(this));  }}
  • use several different XML templates for the same view
  • public interface Display
  • methods can be called to fill in attribute values
Hendy Irawan

Spring Security - 0 views

  •  
    Spring Security is a powerful and highly customizable authentication and access-control framework. It is the de-facto standard for securing Spring-based applications Spring Security is one of the most mature and widely used Spring projects. Founded in 2003 and actively maintained by SpringSource since, today it is used to secure numerous demanding environments including government agencies, military applications and central banks. It is released under an Apache 2.0 license so you can confidently use it in your projects. Spring Security is also easy to learn, deploy and manage. Our dedicated security namespace provides directives for most common operations, allowing complete application security in just a few lines of XML. We also offer complete tooling integration in SpringSource Tool Suite, plus our Spring Roo rapid application development framework. The Spring Community Forum and SpringSource offer a variety of free and paid support services. Spring Security is also integrated with many other Spring technologies, including Spring Web Flow, Spring Web Services, SpringSource Enterprise, SpringSource Application Management Suite and SpringSource tc Server.
Hendy Irawan

Shrinkwrap - JBoss Community - 0 views

  • Shrinkwrap provides a simple mechanism to assemble archives like JARs, WARs, and EARs with a friendly, fluent API.
  •  
    Shrinkwrap provides a simple mechanism to assemble archives like JARs, WARs, and EARs with a friendly, fluent API. JavaArchive archive = ShrinkWrap.create(JavaArchive.class,"archive.jar")    .addClasses(MyClass.class,MyOtherClass.class)    .addResource("mystuff.properties"); From there you may deploy directly into any supported integration container like JBoss EmbeddedAS, GlassFish v3 Embedded, Jetty, or OpenEJB.  Or perhaps you'd like to export the archive to a file or exploded directory structure.  Maybe you'd prefer to serialize it over the network to a remote host.  The possibilities are limitless. To boot, ShrinkWrap is the supported deployment mechanism of the Arquillian project, and together we render the testing of true enterprise components amiable as a puppy.  Where Java EE brought a POJO programming model to application development, we've brought it to testing.  You handle your business logic; we'll do the rest. To foster community participation, the majority of documentation and examples are available through our Wiki. Releases are available either via our Downloads section, or through the JBoss Maven Repository, which we recommend is configured in ${userHomeDir}/.m2/settings.xml:
Hendy Irawan

AtomServer 2.3.4 - - 0 views

  •  
    "AtomServer is a generic data store implemented as a RESTful web service. It is designed as a GData-style Atom Store. It is based on the following concepts and protocols; REST. REST is a design pattern. It's not a technology like SOAP or HTTP. REST is a proven design pattern for building loosely-coupled, highly-scalable applications. There are important benefits to sticking to the REST design pattern; Simple. REST is incredibly simple to define. There are just a handful of principles and well defined semantics associated with it. Scalable. REST leads to a very scalable solution by promoting a stateless protocol and allowing state to be distributed across the web. Layered. REST allows any number of intermediaries, such as proxies, gateways, and firewalls. Ultimately REST is just a web site, albeit one that adheres to a design pattern, so one can easily layer aspects such as Security, Compression, etc. on an as needed basis. Atom. Fundamentally, Atom is an XML vocabulary for describing lists of timestamped entries. These entries can be anything, although because Atom was originally conceived to replace RSS, Atom lists are Feeds, and the items in the lists are Entries. Atom is a RESTful protocol. AtomServer stands on the shoulders of giants. It is built on top of several open source projects - most notably, Apache Abdera (a Java-based Atom Publishing framework) and Spring. AtomServer is an Atom Store. Thus, it requires a relational database to run. AtomServer currently supports; PostgresSQL, SQLServer, and HSQLDB. Using HSQLDB, AtomServer requires zero configuration and can run out-of-the-box. While this configuration is suitable for many applications, those that see significant load will likely require a database with better transactional semantics, such as PostgreSQL. AtomServer is easy to use. It deploys as a simple WAR file into any Servlet container. Or alternately, can be used out-of-the-box as a standalone server, running with
Hendy Irawan

Easy restfull JAX-RS webservices and extended WADL on Glassfish v3 (using ant.) - 0 views

  •  
    "So, we are going to look at a restful webservice that is going to generate XML. As you might know, we have the perfect JSR specification for that in the form of JAXB. The needed libraries are already available in Netbeans 6.8. And as you might have guessed, returning JAXB objects from a JAX-RS method is going to integrate naturally and take some strain from our shoulders. No need to marshal and unmarshal by ourself. "
1 - 20 of 32 Next ›
Showing 20 items per page