JaxB Javadoc on elements of classes generated
I am using JaxB 1.0 and having problems getting Javadoc into the generated classes. I can get the javadoc from the xsd file into the generate class at the class level but not have the get setter level
Below is a listing of what I have been able to get to compile but it does nothing to generate in the class on the following methods.
void setInEjbContext(boolean value);
com.acxiom.arch.configuration.schemaobjects.base.ContainerDatasources getContainerDataSources();
<xsd:element name="UseActivationKeySecurity" type="xsd:boolean" default="true">
<xsd:annotation>
<xsd:appinfo>
<jaxb:property>
<jaxb:javadoc>
When set to true KBA will use SECURITY_ROLE in the activation key params table associated with the service and check security.
</jaxb:javadoc>
</jaxb:property>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
That did not help. I can't get JaxB to put the java doc comments on elements in the generate classes. I can get package level and class level comments but not element level.
Similar Messages
-
Hi,
I would like to generate a java class with getter and setter for this element
with different javadoc for the getter and the setter ?!?!
<xs:element name="civility">
<xs:annotation>
<xs:appinfo>
<jaxb:property>
<jaxb:javadoc>
The javadoc for getter and setter but not for getter ONLY !!
</jaxb:javadoc>
</jaxb:property>
</xs:appinfo>
</xs:annotation>
</xs:element>
It is possible to make this with JAXB ?
Thanks.
STYes, but I don't see how because the jaxb:javadoc tag is for an XML element.
And JAXB will generate the javadoc for related the getter and setter !?!?
An idea ?
Thanks.
ST -
JAXB - generation of extra java class.
Hi Everyone,
JDK 5, JWSDP 1.6
My XML Schema is:
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xsd:element name="Participant">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ParticipantID" type="xsd:string"/>
<xsd:element name="FirstName" type="xsd:string"/>
<xsd:element name="LastName" type="xsd:string"/>
<xsd:element name="Location" type="xsd:string"/>
<xsd:element name="RoleID" type="xsd:string"/>
<xsd:element name="EmailAddress" type="xsd:string"/>
<xsd:element name="MobileNumber" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>When I run JAXB I get an extra Participant.java class generated along with a ParticipantType.java class. Participant.java extends ParticipantType.java. Why is it necessary to generate this extra interface? Wouldn't ParticipantType.java suffice?
TIA,
Claire.probably, but using interfaces reduces the dependencies between client code and jaxb implementation, so as always, interfaces are a good thing.
-
XML Schema Class Generator Problem compiling generated java programs
Hi,
I ran oracg on the po.xsd schema from X3Cs XML Schema Part 0: Primer which successfully generated the java codes. I ran into problems when I compile the generated classes. Here's what I'm getting:
C:\oracle\xml\xdk\demo\java\classgen\Po2>javac -classpath ".;C:\oracle\xml/lib/xmlparserv2.jar;C:\oracle\xml/lib/xschema.jar;C:\oracle\xml/l
ib/classgen.jar;.;C:\Program Files\VicunaJ521\java\lib\collections.jar;C:\Program Files\VicunaJ521\java\lib\vicunalite.jar;C:\Program Files\
XConverter\XConverter.jar;C:\Program Files\XConverter\IDLGenerator.jar; c:\jdk1.2.2\lib\dt.jar;c:\jdk1.2.2\lib\jvm.jar;c:\jdk1.2.2\lib\tools
.jar;c:\oracle\ora81\jdbc\lib\classes12.zip;c:\oracle\ora81\jdbc\nls_charset12.zip;C:\oracle\xml\lib\classgen.jar;C:\oracle\xml\lib\xmlparse
rv2.jar" *.java
.\types\PurchaseOrderType.java:75: Type expected.
public void addComment(null.Comment thecomment)
^
.\types\Items.java:141: Type expected.
public void addComment(null.Comment thecomment)
^
2 errors
Running the demo which comes with oracles version of po.xsd was OK. What's the difference between the po.xsd from oracle and the po.xsd from W3C? Are there any W3C recommendation for XML Schema not supported by Oracle's class generator?Which po.xsd do you use? Would you post it?
Thanks. Here's the copy of the po.xsd from the W3C website. (http://www.w3.org/TR/xmlschema-0/#po.xsd)
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Purchase order schema for Example.com.
Copyright 2000 Example.com. All rights reserved.
</xsd:documentation>
</xsd:annotation>
<xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
<xsd:element name="comment" type="xsd:string"/>
<xsd:complexType name="PurchaseOrderType">
<xsd:sequence>
<xsd:element name="shipTo" type="USAddress"/>
<xsd:element name="billTo" type="USAddress"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="items" type="Items"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
<xsd:complexType name="USAddress">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="street" type="xsd:string"/>
<xsd:element name="city" type="xsd:string"/>
<xsd:element name="state" type="xsd:string"/>
<xsd:element name="zip" type="xsd:decimal"/>
</xsd:sequence>
<xsd:attribute name="country" type="xsd:NMTOKEN"
fixed="US"/>
</xsd:complexType>
<xsd:complexType name="Items">
<xsd:sequence>
<xsd:element name="item" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="productName" type="xsd:string"/>
<xsd:element name="quantity">
<xsd:simpleType>
<xsd:restriction base="xsd:positiveInteger">
<xsd:maxExclusive value="100"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="USPrice" type="xsd:decimal"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="shipDate" type="xsd:date" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="partNum" type="SKU" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Stock Keeping Unit, a code for identifying products -->
<xsd:simpleType name="SKU">
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{3}-[A-Z]{2}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema> -
XML Parser, Class Generator demo problem
Hello,
I have downloaded today the XML Parser and the Class Generator. I have successfully compiled the SampleMain.java coming with the kit. When running it there is a problem with the expected DTD filename input.
The program prints out the needed format as:
Usage: java SampleMain [-root <rootName>] <fileName>
fileName Input file, XML document or external DTD file
-root <rootName> Name of the root Element (required if the input file is an external DTD)
Whatever I try as DTD filename input fails.
I work on Windows-NT!
I have tried running with JDK 1.1.7.a and JDK 1.2.2.
Thanks, Yigal.java SampleMain Widl.xml
or
java SampleMain -root WIDL Widl.dtd
Make you have Widl.xml and Widl.dtd are
in the current directory. Also, remember
Java is case sensitive.
If you are still getting errors, please
post the error message.
null -
XML C++ SDK Class Generator Question
Hello.
I have an XML schema definition file where some elements are defined inside other elements. When I generate classes for this schema I don't get classes for such elements (but only for the outermost level elements). How to use the class generator in this situation ? Do I miss something ?
Thank you.
MarkQuestions related to the XDK products should be posted in the Technologies -> XML -> General Forum. If you like I can move you post to that forum.
-
Hi to all.
My problem is about how to directly load an existing xml file in an in memory structure without building a procedure that creates node by node and put it in the tree.
Is this possible?
Is possible to use the binding mechanism given by the ElementFactory interface of the DOM specification( I think it is not, because the class CGNode does not extend a base class that implements the Element interface
and it seems that doesn't implement that interface itself)?
thanks for anyone paing attenction to my request.I am aware of the type of input the Clas Generator accepts.
I have a DTD, let's call it "sample.dtd," and I need to use this DTD with the Class Generator. Can someone please show me how to instantiate the DTD object and use it with the Class Generator for Java? Thank you.
-Emad
null -
IMPORTANT: XML Class Generator Feature Test
To Those of you who are using our XML Class Generator, we would
really like some feedback regarding your tests of the following
features:
1) validation -- turn it on/off with DTDs
2) character set encoding -- ask them to try different ones
3) DTDs -- included in the XML file and also have it as an
external DTD;
4) XML 1.0 conformance -- see if the XML documents created
conform to the spec;
5) print methods -- try them out
We would like to go production in the near future and need this
feedback.
Thanks,
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
nullPosted reply to:
Re: xml class generator NullPointerException when element type is base64Binary
-Blaise -
Classes generated start with "SMALL" letters
Hi,
For example if on the server side,
@WebService
public class CLASS1
public void getValue(CLASS2 cls2, CLASS3 cls3)
The generated classes..specially CLASS2 and CLASS3 are something like cLASS2 and cLASS3. Any way to control this??
Thanks,
VijayYes The classes generated on the client side start with small case letters.
I am using apt (is that wat u mean when u ask abt the tools?).
I start from java and when I look at the generated wsdl I do see the classes with small case letters.
I use jaxws with jaxb.
I am not sure If I answered your question abt the tools..please let me know.
Thanks a lot for your time.
Vijay -
ANN: XML Class Generator for Java Available
The Oracle XMCL Class Generator for Java is now available as an
initial beta release on the Oracle Technology Network at
http://technet.oracle.com. Select 'xml' from the Technology menu.
The XML Class Generator will generate a set of Java source files
based on an input DTD. The generated Java source files can then
be used to construct, optionally validate, and print a XML
document that is compliant to the DTD specified. This is an early
beta release and has the following features:
* Creates Java Classes from DTDs to enable the programmatic
construction of XML documents.
* Supports validation mode to assist debugging.
* Works with the Oracle XML Parser in Java.
* Creates documents conforming to the W3C XML 1.0
Recommendation.
* Supports creating documents in the following encodings:
UTF-8
UTF-16
ISO-10646-UCS-2
ISO-10646-UCS-4
US-ASCII
EBCDIC-CP-US
ISO-8859-1
Shift_SJIS
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
nullThanks,
Rob
Oracle XML Team wrote:
: First, the link has been fixed. As to your access exception,
we
: have traced it to a difference between JDK 1.1.x and JDK 1.2.
: You can solve it by using a 1.1.x version of the JDK or wait
till
: our production version of our XML Parser becomes available
within
: a week which will work with 1.2.
: Oracle XML Team
: http://technet.oracle.com
: Rob Edagr (guest) wrote:
: : 1) The HREF on the download page for the NT version points
to
: : the version 102 parser not the classgen.
: : 2) After downloading and installing the classgen (by
guessing
: : what the url was) I ran it and get the following
: : C:\jdk1.2\xml\ora\classgen\sample>java SampleMain -root
: : wddxPacket wddx_0090.dtd
: : Exception in thread "main" java.lang.IllegalAccessError: try
to
: : access class oracle/xml/parser/XMLNode from class
: : oracle/xml/classgen/ClassGenerator
: : at oracle.xml.classgen.ClassGenerator.generate
(Compiled
: : Code)
: : at SampleMain.main(SampleMain.java:65)
: : Any idea on what the problem is (same error with sample dtd)
: : Rob
: : Oracle XML Team wrote:
: : : The Oracle XMCL Class Generator for Java is now available
as
: : an
: : : initial beta release on the Oracle Technology Network at
: : : http://technet.oracle.com. Select 'xml' from the
Technology
: : menu.
: : : The XML Class Generator will generate a set of Java source
: : files
: : : based on an input DTD. The generated Java source files can
: : then
: : : be used to construct, optionally validate, and print a XML
: : : document that is compliant to the DTD specified. This is
an
: : early
: : : beta release and has the following features:
: : : * Creates Java Classes from DTDs to enable the
programmatic
: : : construction of XML documents.
: : : * Supports validation mode to assist debugging.
: : : * Works with the Oracle XML Parser in Java.
: : : * Creates documents conforming to the W3C XML 1.0
: : : Recommendation.
: : : * Supports creating documents in the following
encodings:
: : : UTF-8
: : : UTF-16
: : : ISO-10646-UCS-2
: : : ISO-10646-UCS-4
: : : US-ASCII
: : : EBCDIC-CP-US
: : : ISO-8859-1
: : : Shift_SJIS
: : : Oracle XML Team
: : : http://technet.oracle.com
: : : Oracle Technology Network
: Oracle Technology Network
null -
Purchase requisition for service activity / element cannot be generated
Dear SAP MM Experts,
This is a service Creation from the PM order to Purchase Sercive Requisition.
The Error Message Is Generated :Purchase requisition for service activity / element cannot be generated
Diagnosis
Due to the system settings, the system is trying to generate a purchase
requisition for a service activity or a service activity element.
No service package has been created for the activity/element.
As a result, the system cannot generate a purchase requisition.
The activity/element is created or released, but the indicator for
generating a purchase requisition is not set.
Create a service package for the activity/element and then generate a
purchase requisition.
regards,
A SSolved From PM side
-
Classes generated for Human Task UI
Hi All,
I created ADF UI out of a human task (using Automatically generate form option). After generating, I can see lot of .xml files under the HumanTaskForm package, in the newly generated project. I would like to know the way in which these classes (Java Bean) are generated under the HumanTaskForm package.
Also, when I update some values in the UI page at runtime, I am able to see the change , in the response message of the HumanTask. I would like to know, from where the binding information come from, for those UI components, so that they are able to update!
Kindly give me some good documents that would explain me regarding the bean classes generated for HumanTask.
When I searched for the same, I could get the documents regarding the configuration of Human Task only. I need information regarding the Bean classes for Human Task.
Thanks,
Sabarisri. NPlease post on the Jdeveloper and ADF Forum where you will get more help
JDeveloper and ADF -
Schema Class Generator Problem
I'm getting this error msg when I do the following command line:
$java oracle.xml.classgen.oracg -s MySchema.xsd
<Line 455, Column -136>: XSD-2028: (Error) Invalid reference: 'http://www.w3.org/2000/10/XMLSchema:dateTime'
My XSD's header looks like this:
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.5">
Any idea?
Thanks,
Peter ;-)
nullThe problem is due to missing "dateTime" in
class generator datatypes in 9.0.1. This will be updated and in 9.0.2beta (upcoming in few weeks) release.
null -
BADI - Diff. Class generated in Definition and Implementation
Hi all,
When we define a BADI, a BADI class is generated. When we implement the BADI, another class is generated.
1) What is the difference between these 2 classes?
2) As I know, we use the class generated in Implementation to instantiate and call the BADI method in our program. What about the class generated in Definition? What is it used for?
Thanks.I noticed that under Definition, the class generated is with cat= Exit class while under Implementation, the class generated is with cat= general object type. Both can be instantiated for use in ABAP program.
What is the difference/usage of these 2 generated classes? -
Class generated by genInterface ant task does not compile
I am trying to build a web service from existing wsdl using genInterface and topDownAssemble ant tasks.
The wsdl contains following type definition. Java class generated from this type (see below) does not compile. The problem is that there are two class members named
'value'. Is this an issue with Web Services Assembly tool or there is some way to get
around it?
<s:simpleType name="quantityType">
<s:restriction base="s:string">
<s:enumeration value="summation"/>
<s:enumeration value="demand"/>
<s:enumeration value="value"/>
<s:enumeration value="consumption"/>
</s:restriction>
</s:simpleType>
// Version = Oracle WebServices (10.1.3.3.0, build 070610.1800.23513)
public class QuantityType implements java.io.Serializable {
private java.lang.String value;
private static final String _summationString = "summation";
private static final String _demandString = "demand";
private static final String _valueString = "value";
private static final String _consumptionString = "consumption";
public static final java.lang.String summation = new java.lang.String(summationString);
public static final java.lang.String demand = new java.lang.String(demandString);
public static final java.lang.String value = new java.lang.String(valueString);
public static final java.lang.String consumption = new java.lang.String(consumptionString);
public static final QuantityType summation = new QuantityType(_summation);
public static final QuantityType demand = new QuantityType(_demand);
public static final QuantityType value = new QuantityType(_value);
public static final QuantityType consumption = new QuantityType(_consumption);
AndreiPls set debug attribute of JWSC ant task to true or on, e.g.
<jwsc srcdir="." destdir="${output.dir}" debug="on" keepGenerated="true">
</jwsc>
Maybe you are looking for
-
IDVD "error during formatting"
ok so this is my first movie...and I must say I had to figure a lot of things by myself...dispite all of the help from others and what seemed to work for others on forums, discusions, so on and so forth...it didn't help for me...so I ussually have to
-
BRFplus: How to create an instance of User-Defined Expression Type?
Hi, I've created an expression type in a System Application and marked its Access Level as Global. I've created a Class & Interface and assigned it to my Expression Type, and activated it successfully. Now how do use this Expression Type to create
-
Firefox is "unable to connect" to any site, while other broswers can
I've tried clearing my cookies and history, disabling addons/extensions and the firewall, changing/disabling proxy settings, and read several of the articles, but nothing seems to work. I was out of town for 2 days and everything was working fine whe
-
DW 3.0 When I upload htm files they are not always overwriting the files on the server. This is especially true when uploading batches of files, but even with single files they sometimes overwrite the server files and sometimes they don't. Very frust
-
Why does firefox keep changing colors?
Suddenly the Firefox background color keeps changing (blue, tan, gray) I would like to keep it one constant color. How/ why did this happen today when I changed nothing, and how do I fix this?