[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [ciq] RE: CIQ XML Schema Issue & Resolution
Hi Stephen I’ve encountered this problem a few
times in the past while implementing not only CIQ, but some other standards as
well. Normally strong typing is best left to the
implementation. You’ll always need to tweak the schema a little bit to
fit your requirements, be it the Java binding library you’re using,
various flavours of parsers etc. I, for example, had to combine all CIQ
schemas into one in order to implement it in webMethods! Perhaps it would be interesting to have versions
of CIQ schemas ready for implementation for different platforms/libraries (eg
.NET, XMLBeans, webMethods, whatnot). Having said this, I would be hesitant of
putting any of these implementation specifics into the standard itself. This is
the main reason why there are no strong-typed elements in the standard itself
so far. As far as upgrading to future versions of the
standards, there always changes you will have to implement anyway. If you stick
to a consistent data typing approach, you’ll minimise your migration
headaches. This is definitely not a purist approach,
but a practical and pragmatic one borne out of necessity in dealing with lots
of different tools and libraries out there. I hope my comment is helpful. Regards, -- T: 1300 889 850
(+61-3-9667-0124) | F: 1300 791 715 (+61-3-9663-2616) | M: +61-416-174-453 Level 2, 3000 Improve the quality of your services with
WmUnit Unit testing framework for WebMethods
http://www.customware.net/wmunit From: Ram Kumar
[mailto:RKumar@msi.com.au] Hi Stephen, Thank you for your detailed email. Yes, this is a problem with V2.0 and it is already in our list of things to do. The future versions of CIQ will be
strongly data typed. Regards, Ram From: Viens,
Stephen [mailto:Stephen.Viens@LibertyMutual.com] [Please forgive the length of this message. I do
believe you'll find the subject of interest] Ram, CIQ TC, We're leveraging the current CIQ standard schema's to
implement a web service for managing client data. We've included the CIQ
schemas in the WSDL for our service to describe the data managed by the
service. We're using the "WSDL First" method of web service
development which recommends developing the service's WSDL first and
generating service and client code (Java, C#, C++, etc) from that using common
WSDL2Java code generation tools. Unfortunately we've encountered a problem when trying to
generate Java code from the CIQ schemas. We're using two industry
standard WSDL2Java generation tools - Apache Axis 1.1 and IBM WSAD 5.1 - and we've
been presented with the same problem with both. The purpose of this note
is to inform you of the problem and describe how we've worked around it. When type information for an elements character data is not
specified the code generation tools will produce a Java class without a class
variable to contain character data. In other words, the Java generation
tools assume that if type information isn't supplied for an element's character
data then it must be an "attributes only" element. Here's an
example: <xs:element
name="CustomerID" minOccurs="0"
maxOccurs="unbounded"> Here's the Java code generated from the schema snippet above
. You'll note that there is no class variable to hold a CustomerID value - only
the "Type" attribute is represented. public class
CustomerID public
CustomerID() { public
java.lang.Object getType() { public
void setType(java.lang.Object type) { Only when a simpleContent element is specified with type
information for the element's character data (xs:string) will the generation
tools produce Java that includes a class variable and getter/setter methods for
a CustomerID value. Below is an example. This is the same schema snippet
shown above with the addition of the "xs:simpleContent" and
"xs:extension" elements: <xs:element
name="CustomerID" minOccurs="0"
maxOccurs="unbounded"> Here is the Java code that is generated from the modified
schema. You'll notice that a class variable for the CustomerID value is now
present as well as getValue and setValue methods: public class
CustomerID public
CustomerID() {
public java.lang.String getValue() {
public void setValue(java.lang.String value) { public
java.lang.Object getType() { public
void setType(java.lang.Object type) { The way the WSDL2Java tools work makes sense in a way.
How else would they be able to know if an element includes (or does not
include) character data without it being explicitly stated in the schema?
Would the CIQ team consider updating the schemas to include
these changes or at least incorporating these changes into future versions? We have been forced to make many alterations to the CIQ
schemas for our web service to leverage them. We're concerned that we
will have to make all of the same alterations when (if) we decide to upgrade to
a new version of CIQ in the future. Steve Stephen Viens |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]