How to call a web service from Jdeveloper (provided WSDL file or URL)
Create a New Empty Project
Tuesday, February 21, 2012
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:
xjc complains with:
[ERROR] The prefix "jaxb" for element "jaxb:globalBindings" is not
bound.
SOLUTION
========
Missing namespace declaration. There should be something like this:
xmlns:jaxb="URI"
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
compiling is fine unless I try to define jaxb bindings. For instance,
if I try adding this code in the schema:
<xs:annotation> <xs:appinfo> <jaxb:globalBindings generateIsSetMethod="true"> bindingStyle="modelGroupBinding" choiceContentProperty="true" > <xjc:serializable uid="12343"/> <jaxb:javaType name="short" xmlType="xs:long" printMethod="javax.xml.bind.DatatypeConverter.printShort" parseMethod="javax.xml.bind.DatatypeConverter.parseShort"/> </jaxb:globalBindings> </xs:appinfo> </xs:annotation>
xjc complains with:
[ERROR] The prefix "jaxb" for element "jaxb:globalBindings" is not
bound.
SOLUTION
========
Missing namespace declaration. There should be something like this:
xmlns:jaxb="URI"
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"?
SOLUTION:
Write a converter class (see MyConverter below) and added an annotation/appinfo to the xml schema, also shown below.
Source : https://forums.oracle.com/forums/thread.jspa?threadID=1624090
How can I get it to marshall to just "2003-11-24"?
SOLUTION:
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(); cal.setTime(d); return cal; } }
<xsd:schema ...> <xsd:annotation> <xsd:appinfo> <jaxb:globalBindings <jaxb:javaType name="java.util.Calendar" xmlType="xsd:date" printMethod="MyConverter.printCalendar" parseMethod="MyConverter.parseCalendar" /> </jaxb:globalBindings> </xsd:appinfo> </xsd:annotation> ... </xsd:schema>
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.
Answer:
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
The display: none and visibility: hidden CSS properties appear to be the same thing, but they aren't.
Answer:
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
Subscribe to:
Posts (Atom)