Return-Path: Delivered-To: apmail-incubator-cxf-commits-archive@locus.apache.org Received: (qmail 25152 invoked from network); 31 Oct 2007 19:36:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Oct 2007 19:36:18 -0000 Received: (qmail 29663 invoked by uid 500); 31 Oct 2007 19:36:06 -0000 Delivered-To: apmail-incubator-cxf-commits-archive@incubator.apache.org Received: (qmail 29545 invoked by uid 500); 31 Oct 2007 19:36:06 -0000 Mailing-List: contact cxf-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-commits@incubator.apache.org Received: (qmail 29536 invoked by uid 99); 31 Oct 2007 19:36:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2007 12:36:06 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2007 19:36:31 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B56E01A9832; Wed, 31 Oct 2007 12:35:54 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r590795 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties Date: Wed, 31 Oct 2007 19:35:54 -0000 To: cxf-commits@incubator.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071031193554.B56E01A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Wed Oct 31 12:35:53 2007 New Revision: 590795 URL: http://svn.apache.org/viewvc?rev=590795&view=rev Log: Merged revisions 590664 via svnmerge from https://svn.apache.org/repos/asf/incubator/cxf/trunk ........ r590664 | bimargulies | 2007-10-31 09:33:52 -0400 (Wed, 31 Oct 2007) | 4 lines After a titanous struggle, get the Javascript to generate correct serialization for the cross-namespace element case. This may be working around mistakes in how the XmlSchema gets built, or it may not. I don't know enought JAXB to tell. ........ Modified: incubator/cxf/branches/2.0.x-fixes/ (props changed) incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties Propchange: incubator/cxf/branches/2.0.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=590795&r1=590794&r2=590795&view=diff ============================================================================== --- incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original) +++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Wed Oct 31 12:35:53 2007 @@ -173,7 +173,16 @@ return getService(); } - + + /** + * Code elsewhere in this function will fill in the name of the type of an element but not the reference + * to the type. This function fills in the type references. + * + * This does not set the type reference for elements that are declared as refs to other elements. + * It is a giant pain to find them, since they are not (generally) root elements and the code would + * have to traverse all the types to find all of them. Users should look them up through the collection, + * that's what it is for. + */ private void fillInSchemaCrossreferences() { Service service = getService(); for (ServiceInfo serviceInfo : service.getServiceInfos()) { @@ -203,36 +212,6 @@ } } - } - - // second pass. Fill in based on refs. - for (SchemaInfo schemaInfo : serviceInfo.getSchemas()) { - XmlSchemaObjectTable elementsTable = schemaInfo.getSchema().getElements(); - Iterator elementsIterator = elementsTable.getNames(); - while (elementsIterator.hasNext()) { - QName elementName = (QName)elementsIterator.next(); - XmlSchemaElement element = schemaInfo.getSchema().getElementByName(elementName); - if (element.getSchemaType() == null) { - QName refElementName = element.getRefName(); - if (refElementName != null) { - XmlSchemaElement refElement = - schemaCollection.getElementByQName(refElementName); - if (refElement == null) { - Message message = new Message("REFERENCE_TO_UNDEFINED_ELEMENT", - LOG, - element.getQName(), - refElementName, - service.getName()); - LOG.severe(message.toString()); - } else { - // it is convenient for other consumers if we put the type in place. - // we trust that anything generating XSD will avoid something stupid like: - // as a result. - element.setSchemaType(refElement.getSchemaType()); - } - } - } - } } } } Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties?rev=590795&r1=590794&r2=590795&view=diff ============================================================================== --- incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties (original) +++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties Wed Oct 31 12:35:53 2007 @@ -25,4 +25,3 @@ annotations on the real instance are not available. We suggest overriding the ServiceClass via spring config or \ other configuration. (serviceClass/implementorClass attributes on the endpoint/server spring config entry) REFERENCE_TO_UNDEFINED_TYPE = Schema element {0} references undefined type {1} for service {2}. -REFERENCE_TO_UNDEFINED_ELEMENT = Schema element {0} references undefined element {1} for service {2}. \ No newline at end of file