users@jaxb.java.net

Re: JAXB EXAMPLES

From: Robert Lowe <rmlowe_at_rmlowe.com>
Date: Sat, 03 May 2003 23:41:07 +0800

Have a look at the sample applications in Chapter 10 of the tutorial:

http://java.sun.com/webservices/docs/1.1/tutorial/doc/index.html

If you generated your classes with a previous version you'll need to
regenerate them with the FCS--the old classes won't work.


----- Original Message -----
From: "Ankur Misra" <ankur_at_crimsonlogic.co.in>
To: <JAXB-INTEREST_at_JAVA.SUN.COM>
Sent: Saturday, May 03, 2003 5:11 PM
Subject: JAXB EXAMPLES


Hi
Can any one tell me where I can get example for reading data from XML
using JAB?
I have generated the JAXB classes but don't know how to read in new
released version.

Thanks & regards
Ankur Misra
CrimsonLogic India Pvt Ltd
formerly known as SNS Software Labs Pvt Ltd
(a subsidiary of CrimsonLogic Pte Ltd)
#124, 6th Floor, Surya Chambers, Airport Road,
Bangalore - 560 017, INDIA
Phone No. 5222880/3/5/7/8/9 Extn. No. 1064

-----Original Message-----
From: Discussion list for the Java Architecture for XML Binding
[mailto:JAXB-INTEREST_at_JAVA.SUN.COM] On Behalf Of Mark D. Hansen
Sent: Saturday, May 03, 2003 4:20 AM
To: JAXB-INTEREST_at_JAVA.SUN.COM
Subject: SOAP and JAXB - problems with "mustUnderstand"

I'm having problems with JAXB classes generated from a schema that
extends SOAP. In particular, the "mustUnderstand" attribute does not
seem to be handled properly. The SOAP schema for "mustUnderstand" is:

<xs:attribute name="mustUnderstand">
  <xs:simpleType>
    <xs:restriction base="xs:boolean">
      <xs:pattern value="0|1" />
    </xs:restriction>
  </xs:simpleType>
</xs:attribute>

The JAXB generated class to set/get the "mustUnderstand" attribute end
creating instances such as this when unmarshalled:

<ns2:ReliableMessage
  ns1:mustUnderstand="true"
  xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:ns2="http://schemas.fujitsu.com/rm">

Notice that the result is mustUnderstand="true". BUT THE SOAP
XMLSchema INDICATES THAT THE pattern value="0|1". So, the Unmarshaller
is not working properly. It should be creating an attribute like this:

  ns1:mustUnderstand="1"

Has anyone experienced this problem? Am I understanding JAXB correctly?

Thanks,

- Mark