Tuesday, February 21, 2012

How to invoke a web service using JDeveloper (given a WSDL)

How to call a web service from Jdeveloper (provided WSDL file or URL)

Create a New Empty Project

Thursday, February 9, 2012

The prefix "jaxb" for element "jaxb:globalBindings" is not bound.

I'm using xjc to compile XML Schema into JAXB objects and the
compiling is fine unless I try to define jaxb bindings. For instance,
if I try adding this code in the schema:

<jaxb:globalBindings generateIsSetMethod="true">
choiceContentProperty="true" >

<xjc:serializable uid="12343"/>
<jaxb:javaType name="short"

xjc complains with:
[ERROR] The prefix "jaxb" for element "jaxb:globalBindings" is not


Missing namespace declaration. There should be something like this:
Just look for the other namespace definitions (i.e. xmlns:s) and
add the above attribute to the end.

Source : http://www.velocityreviews.com/forums/t137983-problem-in-xjc-with-recognizing-jaxb-prefix.html

xsd:date maps to java.util.Calendar

My schema has an element of type xs:date, which jaxb maps to a java.util.Calendar. If I create a Calendar object with Calendar.getInstance(), it marshalls to "2003-11-24-05:00".

How can I get it to marshall to just "2003-11-24"?

Write a converter class (see MyConverter below) and added an annotation/appinfo to the xml schema, also shown below.

public class MyConverter
    static final SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
    static public String printCalendar(Calendar c)
        return df.format(c.getTime());

    static public Calendar parseCalendar(String c) throws ParseException
        Date d = df.parse(c);
        Calendar cal = Calendar.getInstance();
        return cal; 

<xsd:schema ...>
<jaxb:javaType name="java.util.Calendar" xmlType="xsd:date"

Source : https://forums.oracle.com/forums/thread.jspa?threadID=1624090

Sunday, February 5, 2012

What's the difference between display: none and visibility: hidden?

Question: What's the difference between display: none and visibility: hidden?
The display: none and visibility: hidden CSS properties appear to be the same thing, but they aren't.

These two style properties do two different things.

visibility: hidden hides the element, but it still takes up space in the layout.

display: none removes the element completely from the document. It does not take up any space, even though the HTML for it is still in the source code.

You can see the effect of these style properties on this page. I created three identical swatches of code, and then set the display and visibility properties on two so you can see how they look.

Source: http://webdesign.about.com/od/css/f/blfaqhidden.htm