Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 37400 invoked from network); 31 May 2005 23:29:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 May 2005 23:29:21 -0000 Received: (qmail 530 invoked by uid 500); 31 May 2005 23:29:18 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 499 invoked by uid 500); 31 May 2005 23:29:18 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 482 invoked by uid 99); 31 May 2005 23:29:18 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from onenetom19.sge.net (HELO onenetom19.sge.net) (152.91.1.19) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 31 May 2005 16:29:16 -0700 Received: from onenetvs14.sge.net (onenetvs-om [152.91.1.17]) by onenetom19.sge.net (Postfix) with ESMTP id E27D6AEB7 for ; Wed, 1 Jun 2005 09:28:51 +1000 (EST) Received: from onenetvs14.sge.net (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id 10006FD2C for ; Wed, 1 Jun 2005 09:29:12 +1000 (EST) Received: from onenetim2.sge.net (onenetim-vs.sge.net [152.91.1.9]) by onenetvs14.sge.net (Postfix) with ESMTP id F3C51F1D1 for ; Wed, 1 Jun 2005 09:29:11 +1000 (EST) Received: from iceberg.sge.net (iceberg.sge.net [152.91.9.131]) by onenetim2.sge.net (Postfix) with SMTP id C0055C207 for ; Wed, 1 Jun 2005 09:29:11 +1000 (EST) Received: by iceberg.sge.net (Postfix, from userid 5) id A4B30296A5; Wed, 1 Jun 2005 09:29:11 +1000 (EST) Received: from nodnsquery(155.187.160.31) by iceberg.sge.net via csmap (V6.0) id srcAAAh7aO6B; Wed, 1 Jun 05 09:29:11 +1000 Received: from email-filter1 (email-filter1 [155.187.160.110]) by proxy.ea.gov.au (8.12.10.Beta2/8.12.8) with ESMTP id j4VNTA9C012151 for ; Wed, 1 Jun 2005 09:29:10 +1000 (EST) Received: from parkes-05.deh.gov.au ([155.187.160.26]) by email-filter1 with InterScan Messaging Security Suite; Wed, 01 Jun 2005 09:26:34 +1000 Received: from EA-MTA by parkes-05.deh.gov.auwith Novell_GroupWise; Wed, 01 Jun 2005 09:29:10 +1000 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.1 Date: Wed, 01 Jun 2005 09:28:57 +1000 From: "David Levy" To: Subject: abstract types and substitution groups Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-imss-version: 2.025 X-imss-result: Passed X-imss-scores: Clean:67.28228 C:2 M:10 S:5 R:5 X-imss-settings: Baseline:2 C:2 M:2 S:2 R:2 (0.0100 0.0100) X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Developerinos, I've got a problem which I thought was pretty obvious, but I've had to work out a pretty backwards method to achieve my end, and figured there must be an easier way. I've got a Java class which will be the base for my WSDL file. Generating the WSDL is giving me no problems, but I'm having a sticking point with DTO's which are abstract. Say I've got an abstract class called "AbstractCar" and then an implementation of that called "BasicCar". In my method signatures for the exposed methods, I utilize AbstractCar, staying away from whatever implementation is actually passed over the wire. The problem comes in when I wish to pass a BasicCar over the wire. There are a few problems I've hit when trying to do this: 1.) The WSDL's type schema has no knowledge of BasicCar 2.) Any auto generated WSDD has no knowledge of type mappings for BasicCar 3.) Any stubs generated from the WSDL have no knowledge of BasicCar, but will try and generate stubs for AbstractCar only. Doing some research, I was impressed to find that XML Schema lets us model extentions similar to the OOP world via "substitutionGroups". Further, it also lets us declare an abstract XML type abstract. Thinking about this, maybe it would be possible to add some new functionality to the Java2WSDL generator which: 1.) Declares an abstract java class as abstract in the WSDL 2.) Takes in new parameters so implementations can be listed for particular classes. Looking at the Ant method signature, it could be something like: The output for this in the resulting WSDL would be something like this: .... .... In order to currently get this functionality, I have to do a pretty awful combination manual tweeking and auto generation so thought if anyone has come up against this and knows a relatively easy way to get this working, please, don't hold back. Thanks for your time. David Levy