Hi,
I have some XML Schema that I am using for both a JAXB-based
configuration file setup and also within the WSDL describing a JAX-RPC
Web service.
Here is part of the schema.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="
http://www.w3.org/2001/XMLSchema"
xmlns:tns="
http://www.agmodel.net/SpatialSchema"
elementFormDefault="qualified"
targetNamespace="
http://www.agmodel.net/SpatialSchema">
<xs:complexType name="Location2D">
<xs:sequence>
<xs:element name="latitude" type="xs:double" />
<xs:element name="longitude" type="xs:double" />
</xs:sequence>
</xs:complexType>
...
</xs:schema>
JAXB generates a interface "Location2D" and an implementation
(*impl.Location2DImpl), but JAXRPC generates a class Location2D.
My understanding of the JAXRPC spec is that I couldn't use the JAXB
generated Location2D interface as a parameter in my RPC Remote
interface, neither could I have a JAXB Location2D reference within any
object used as a parameter.
I would like to map the JAXB and JAXRPC generated Location2Ds to an
immutable Location2D of my own. At present I plan to keep the two
children in separate packages and write a mapToImmutable and
unmapFromImmutable method for each. I wondered, however, whether there
were any thoughts of aligning JAXB and JAXRPC a little closer. To the
layman there would seem to be considerable overlap in the work they must
do.
Regards
Matthew Laurenson
National Agriculture Research Center
Japan