OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

ciq message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [ciq] RE: CIQ XML Schema Issue & Resolution


Title: FW: CIQ XML Schema Issue & Resolution
Hido,
 
Thanks!  There's always a first for everything I guess!!
 
I'll settle for 95% stable stuff and tweaking the 5% for
those pesky boundary conditions.
 
I've been deploying these scripting engine based solutions for
too many years - so its just second nature at this
point.
 
Bring on the XML!
 
DW.
 
----- Original Message -----
Sent: Monday, January 17, 2005 8:04 PM
Subject: RE: [ciq] RE: CIQ XML Schema Issue & Resolution

David,

 

Thanks for reminding me. I’ve had a look at your work and I must say it looks impressive. I must give it a go next time I need to implement an XML standard! I am yet to work on a non-proprietary data standard where there was no need to change anything.

 

Regards,

 

 

--
Hido Hasimbegovic
eBusiness Consultant | CustomWare Asia Pacific | www.customware.net

T: 1300 889 850 (+61-3-9667-0124) | F: 1300 791 715 (+61-3-9663-2616) | M: +61-416-174-453

Level 2, 222 Latrobe Street

Melbourne VIC

3000 Australia

 

Improve the quality of your services with WmUnit

 

Unit testing framework for WebMethods http://www.customware.net/wmunit

 

 

 


From: David Webber (XML) [mailto:david@drrw.info]
Sent: Tuesday, 18 January 2005 12:00 PM
To: Hido Hasimbegovic; 'Ram Kumar'; 'Viens, Stephen'
Cc: ciq@lists.oasis-open.org
Subject: Re: [ciq] RE: CIQ XML Schema Issue & Resolution

 

Hido,

 

I would also point out - even though I've not started this task yet - that

creating CAM templates to augment the CIQ schemas - allows you to

custom select all those detal application binding details.

 

I presented on CCTS + CAM + Registry to DHS on Friday - and

listed CIQ as a component technology.

 

The PPT and examples are here:

 

Enjoy, DW

 

p.s. One of these weeks life will stop intervening and I'll actually get to doing a specific CIQ example!

       Hopefully these slides here give hints, examples and ideas in the meantime.

----- Original Message -----

Sent: Monday, January 17, 2005 6:15 PM

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,

 

--
Hido Hasimbegovic
eBusiness Consultant | CustomWare Asia Pacific | www.customware.net

T: 1300 889 850 (+61-3-9667-0124) | F: 1300 791 715 (+61-3-9663-2616) | M: +61-416-174-453

Level 2, 222 Latrobe Street

Melbourne VIC

3000 Australia

 

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]
Sent: Tuesday, 18 January 2005 9:35 AM
To: Viens, Stephen
Cc: ciq@lists.oasis-open.org
Subject: [ciq] RE: CIQ XML Schema Issue & Resolution

 

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]
Sent: Tue 1/18/2005 9:33 AM
To: Ram Kumar
Subject: FW: CIQ XML Schema Issue & Resolution

[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">
      <xs:complexType mixed="true">
        <xs:attribute name="Type"/>
        <xs:attributeGroup ref="grPostal"/>
        <xs:anyAttribute namespace="##other"/>
      </xs:complexType>
    </xs:element>

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
    {
      private java.lang.Object type;

      public CustomerID() {
      }

      public java.lang.Object getType() {
        return type;
      }

      public void setType(java.lang.Object type) {
        this.type = 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">
      <xs:complexType mixed="true">
        <xs:simpleContent>
          <xs:extension base="xs:string">
            <xs:attribute name="Type"/>
            <xs:attributeGroup ref="grPostal"/>
            <xs:anyAttribute namespace="##other"/>
          </xs:extension>
        </xs:simpleContent>
      </xs:complexType>
    </xs:element>

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
    {
      private java.lang.String value;
      private java.lang.Object type;

      public CustomerID() {
      }

      public java.lang.String getValue() {
        return value;
      }

      public void setValue(java.lang.String value) {
        this.value = value;
      }

      public java.lang.Object getType() {
        return type;
      }

      public void setType(java.lang.Object type) {
        this.type = 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
Enterprise Architect
Liberty Mutual Insurance Company
Enterprise IT Services (EITS)
stephen.viens@libertymutual.com
603-245-3467 (phone)
603-245-5338 (fax)



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]