Return-Path: Delivered-To: apmail-incubator-cxf-commits-archive@locus.apache.org Received: (qmail 98314 invoked from network); 7 Mar 2007 20:20:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Mar 2007 20:20:56 -0000 Received: (qmail 10964 invoked by uid 500); 7 Mar 2007 20:20:58 -0000 Delivered-To: apmail-incubator-cxf-commits-archive@incubator.apache.org Received: (qmail 10855 invoked by uid 500); 7 Mar 2007 20:20:58 -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 10748 invoked by uid 99); 7 Mar 2007 20:20:57 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2007 12:20:57 -0800 X-ASF-Spam-Status: No, hits=-98.6 required=10.0 tests=ALL_TRUSTED,INFO_TLD,NO_REAL_NAME 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, 07 Mar 2007 12:20:41 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 496071A9838; Wed, 7 Mar 2007 12:20:21 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r515734 [1/11] - in /incubator/cxf/trunk/rt: ./ core/src/main/java/org/apache/cxf/endpoint/ databinding/aegis/ databinding/aegis/src/ databinding/aegis/src/main/ databinding/aegis/src/main/java/ databinding/aegis/src/main/java/org/ databind... Date: Wed, 07 Mar 2007 20:20:15 -0000 To: cxf-commits@incubator.apache.org From: dandiep@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070307202021.496071A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dandiep Date: Wed Mar 7 12:20:07 2007 New Revision: 515734 URL: http://svn.apache.org/viewvc?view=rev&rev=515734 Log: First cut at importing Aegis from XFire. Many tests haven't been ported yet. Also checkstyle/pmd aren't up to par so they've been disabled (Its more important to get this in than to spend time renaming variables IMO). The other important thing that hasn't been transferred is support for other databindings like XMLBeans & JiBX. Also, I added a some constructors to ClientImpl to make it easy to create a Client from a URL. Added: incubator/cxf/trunk/rt/databinding/aegis/ (with props) incubator/cxf/trunk/rt/databinding/aegis/.checkstyle (with props) incubator/cxf/trunk/rt/databinding/aegis/.pmd (with props) incubator/cxf/trunk/rt/databinding/aegis/.ruleset (with props) incubator/cxf/trunk/rt/databinding/aegis/pom.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/ incubator/cxf/trunk/rt/databinding/aegis/src/main/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/Aegis.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/Context.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/DatabindingException.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceConfiguration.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceFactoryBean.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/XMLStreamDataReader.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/XMLStreamDataWriter.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/Configuration.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/CustomTypeMapping.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeCreator.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMappingRegistry.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/Type.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeCreator.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeMapping.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeMappingRegistry.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypePropertyInfo.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BigDecimalType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BigIntegerType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BooleanType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/CalendarType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/CharacterType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/DateTimeType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/DateType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/DoubleType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/FloatType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/IntType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/InterfaceInvocationHandler.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/LongType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ObjectType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ShortType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/SqlDateType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/StringType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/TimeType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/TimestampType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/URIType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/XMLBeanTypeInfo.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/CollectionType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/MapType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotatedTypeInfo.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/DurationType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/EnumType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/IgnoreProperty.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/XMLGregorianCalendarType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/XmlAttribute.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/XmlElement.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/XmlParamType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/XmlReturnType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/XmlType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/AbstractXOPType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/AttachmentUtil.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/ByteArrayType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/DataHandlerType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/DataSourceType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/xml/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/xml/DocumentType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/xml/JDOMDocumentType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/xml/JDOMElementType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/xml/SourceType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/xml/XMLStreamReaderType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/Base64.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/CachedOutputStream.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/FastStack.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/JavaUtils.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/STAXUtils.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/ServiceUtils.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/UID.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/XmlConstants.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/date/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/date/XsDateFormat.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/date/XsDateTimeFormat.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/date/XsTimeFormat.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/date/package.html (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/jdom/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/jdom/StaxBuilder.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/jdom/StaxSerializer.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/stax/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/stax/DOMStreamReader.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/stax/DOMStreamWriter.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/stax/DepthXMLStreamReader.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/stax/FragmentStreamReader.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/stax/JDOMNamespaceContext.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/stax/JDOMStreamReader.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/stax/JDOMStreamWriter.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/stax/W3CDOMStreamReader.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/stax/W3CDOMStreamWriter.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/stax/W3CNamespaceContext.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/AbstractMessageReader.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/AbstractMessageWriter.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/MessageReader.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/MessageWriter.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/jdom/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/jdom/AttributeWriter.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/jdom/JDOMReader.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/jdom/JDOMWriter.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/AttributeReader.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/AttributeWriter.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/schema/ incubator/cxf/trunk/rt/databinding/aegis/src/schema/mapping.xsd (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/ incubator/cxf/trunk/rt/databinding/aegis/src/test-resources/ incubator/cxf/trunk/rt/databinding/aegis/src/test-resources/xfire.jpg (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/log4j.properties (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/Book.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/BookDynamicClient.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/BookService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/BookServiceImpl.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/Echo.aegis.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/Echo.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/EchoImpl.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/HeaderTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/bean11.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.aegis.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/AddNumbers.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ArrayService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/BeanService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ComplexService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/DataBean.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/DataService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/Echo.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/EchoOverload.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/EchoOverloadImpl.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/PrimitiveService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/SimpleBean.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/StaticEcho.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/VoidService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/base64/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/base64/BinaryDataService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/base64/BinaryDataTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/base64/binary.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/base64/binaryEmpty.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ns1/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ns1/Complex1.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ns2/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/ns2/Complex2.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedBean1.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedBean2.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedBean3.aegis.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedBean3.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedBean4.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedTypeTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest$CollectionService.aegis.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/ConfigurationTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CurrencyService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CustomStringType.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/DualOutService.aegis.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/DualOutService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/DualOutServiceTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/MapTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/OperationNSTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/TestEnum.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/dto/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/dto/CollectionDTO.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/dto/DTOService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/dto/GetDTO.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/dto/MapDTO.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/dto/MapDTOService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/dto/ObjectDTO.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/echo11.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/xml/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/xml/stax/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/xml/stax/ReaderTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/xml/stax/WriterTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/xml/stax/bean11.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/xml/stax/read1.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/BaseUser.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/Employee.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ExceptionInheritanceTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/GetEmployee.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/InheritancePOJOTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/InheritanceService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ReceiveEmployee.xml (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/intf/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/intf/ChildImpl.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/intf/GrandChildImpl.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/intf/IChild.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/intf/IGrandChild.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/intf/IInterfaceService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/intf/IParent.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/intf/InterfaceInheritanceTest.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/intf/InterfaceService.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws1/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws1/BeanA.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws1/BeanB.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws1/BeanC.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws1/BeanD.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws1/ResultBean.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws1/RootBean.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws1/WS1.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws1/WS1Exception.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws1/WS1ExtendedException.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws1/impl/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws1/impl/WS1Impl.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws2/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws2/WS2.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws2/common/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws2/common/ParentBean.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws2/common/exception/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws2/common/exception/AlreadyExistsException.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws2/common/exception/NotFoundException.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws2/common/pack1/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws2/common/pack1/ContentBean1.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws2/common/pack2/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws2/common/pack2/ContentBean2.java (with props) incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws2/impl/ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/codehaus/xfire/aegis/inheritance/ws2/impl/WS2Impl.java (with props) Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java incubator/cxf/trunk/rt/pom.xml Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?view=diff&rev=515734&r1=515733&r2=515734 ============================================================================== --- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java (original) +++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java Wed Mar 7 12:20:07 2007 @@ -20,6 +20,7 @@ package org.apache.cxf.endpoint; import java.io.IOException; +import java.net.URL; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -29,8 +30,11 @@ import javax.xml.namespace.QName; +import com.ibm.wsdl.extensions.soap.SOAPBindingImpl; + import org.apache.cxf.Bus; import org.apache.cxf.BusException; +import org.apache.cxf.BusFactory; import org.apache.cxf.binding.Binding; import org.apache.cxf.common.i18n.UncheckedException; import org.apache.cxf.common.logging.LogUtils; @@ -58,6 +62,7 @@ import org.apache.cxf.transport.ConduitInitiator; import org.apache.cxf.transport.ConduitInitiatorManager; import org.apache.cxf.transport.MessageObserver; +import org.apache.cxf.wsdl11.WSDLServiceFactory; public class ClientImpl extends AbstractBasicInterceptorProvider implements Client, MessageObserver { public static final String FINISHED = "exchange.finished"; @@ -81,6 +86,66 @@ if (null != c) { initedConduit = c; } + } + + public ClientImpl(URL wsdlUrl) { + this(BusFactory.getDefaultBus(), wsdlUrl, null); + } + + public ClientImpl(URL wsdlUrl, QName port) { + this(BusFactory.getDefaultBus(), wsdlUrl, port); + } + + public ClientImpl(Bus bus, URL wsdlUrl, QName port) { + this.bus = bus; + + WSDLServiceFactory sf = (port == null) + ? (new WSDLServiceFactory(bus, wsdlUrl)) : (new WSDLServiceFactory(bus, wsdlUrl, port)); + Service svc = sf.create(); + + EndpointInfo epfo = findEndpoint(svc.getServiceInfo(), port); + + try { + endpoint = new EndpointImpl(bus, svc, epfo); + } catch (EndpointException epex) { + throw new IllegalStateException("Unable to create endpoint: " + epex.getMessage(), epex); + } + } + + + private EndpointInfo findEndpoint(ServiceInfo svcfo, QName port) { + EndpointInfo epfo; + if (port != null) { + epfo = svcfo.getEndpoint(port); + if (epfo == null) { + throw new IllegalArgumentException("The service " + svcfo.getName() + + " does not have an endpoint " + port + "."); + } + } else { + epfo = null; + for (EndpointInfo e : svcfo.getEndpoints()) { + BindingInfo bfo = e.getBinding(); + + if (bfo.getBindingId().equals("http://schemas.xmlsoap.org/wsdl/soap/")) { + for (Object o : bfo.getExtensors().get()) { + if (o instanceof SOAPBindingImpl) { + SOAPBindingImpl soapB = (SOAPBindingImpl)o; + if (soapB.getTransportURI().equals("http://schemas.xmlsoap.org/soap/http")) { + epfo = e; + break; + } + } + } + + } + } + if (epfo == null) { + throw new UnsupportedOperationException( + "Only document-style SOAP 1.1 http are supported " + + "for auto-selection of endpoint; none were found."); + } + } + return epfo; } public Endpoint getEndpoint() { Propchange: incubator/cxf/trunk/rt/databinding/aegis/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Wed Mar 7 12:20:07 2007 @@ -0,0 +1 @@ +target Added: incubator/cxf/trunk/rt/databinding/aegis/.checkstyle URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/.checkstyle?view=auto&rev=515734 ============================================================================== --- incubator/cxf/trunk/rt/databinding/aegis/.checkstyle (added) +++ incubator/cxf/trunk/rt/databinding/aegis/.checkstyle Wed Mar 7 12:20:07 2007 @@ -0,0 +1,26 @@ + + + + + + + + + \ No newline at end of file Propchange: incubator/cxf/trunk/rt/databinding/aegis/.checkstyle ------------------------------------------------------------------------------ svn:executable = * Added: incubator/cxf/trunk/rt/databinding/aegis/.pmd URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/.pmd?view=auto&rev=515734 ============================================================================== --- incubator/cxf/trunk/rt/databinding/aegis/.pmd (added) +++ incubator/cxf/trunk/rt/databinding/aegis/.pmd Wed Mar 7 12:20:07 2007 @@ -0,0 +1,2 @@ + +truefalse \ No newline at end of file Propchange: incubator/cxf/trunk/rt/databinding/aegis/.pmd ------------------------------------------------------------------------------ svn:executable = * Added: incubator/cxf/trunk/rt/databinding/aegis/.ruleset URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/.ruleset?view=auto&rev=515734 ============================================================================== --- incubator/cxf/trunk/rt/databinding/aegis/.ruleset (added) +++ incubator/cxf/trunk/rt/databinding/aegis/.ruleset Wed Mar 7 12:20:07 2007 @@ -0,0 +1,190 @@ + + + + PMD Plugin preferences rule set + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Propchange: incubator/cxf/trunk/rt/databinding/aegis/.ruleset ------------------------------------------------------------------------------ svn:executable = * Added: incubator/cxf/trunk/rt/databinding/aegis/pom.xml URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/pom.xml?view=auto&rev=515734 ============================================================================== --- incubator/cxf/trunk/rt/databinding/aegis/pom.xml (added) +++ incubator/cxf/trunk/rt/databinding/aegis/pom.xml Wed Mar 7 12:20:07 2007 @@ -0,0 +1,186 @@ + + + 4.0.0 + cxf-rt-databinding-aegis + jar + Apache CXF Aegis Databinding + http://cwiki.apache.org/confluence/display/CXF/Index + + + + org.apache.cxf + cxf-parent + 2.0-incubator-RC-SNAPSHOT + ../../../parent/pom.xml + + + + ../../.. + + + + + org.apache.cxf + cxf-api + ${project.version} + + + org.apache.cxf + cxf-rt-frontend-simple + ${project.version} + + + org.apache.cxf + cxf-rt-transports-local + ${project.version} + test + + + org.apache.cxf + cxf-rt-transports-http + ${project.version} + test + + + org.apache.cxf + cxf-rt-frontend-jaxws + ${project.version} + test + + + + jaxen + jaxen + 1.1 + + + dom4j + dom4j + + + xerces + xmlParserAPIs + + + xerces + xercesImpl + + + xom + xom + + + + + + junit + junit + 3.8.1 + test + + + + javax.mail + mail + 1.4 + test + + + javax.activation + activation + test + 1.1 + + + jdom + jdom + 1.0 + + + stax-utils + stax-utils + snapshot-20040917 + + + + + + codehaus + Codehaus + http://repository.codehaus.org + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + + org.apache.cxf + cxf-buildtools + ${project.version} + + + + + process-sources + process-sources + + false + false + + + checkstyle + + + + + + org.apache.maven.plugins + maven-pmd-plugin + + + org.apache.cxf + cxf-buildtools + ${project.version} + + + + + **/*.java + + + + + process-sources + process-sources + + check + + + + + + + Propchange: incubator/cxf/trunk/rt/databinding/aegis/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/databinding/aegis/pom.xml ------------------------------------------------------------------------------ svn:executable = * Propchange: incubator/cxf/trunk/rt/databinding/aegis/pom.xml ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: incubator/cxf/trunk/rt/databinding/aegis/pom.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/Aegis.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/Aegis.java?view=auto&rev=515734 ============================================================================== --- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/Aegis.java (added) +++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/Aegis.java Wed Mar 7 12:20:07 2007 @@ -0,0 +1,76 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.aegis; + +import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamReader; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.cxf.aegis.type.Type; +import org.apache.cxf.aegis.util.NamespaceHelper; +import org.apache.cxf.aegis.util.XmlConstants; + +/** + * Static methods/constants for Aegis. + * + * @author Dan Diephouse + */ +public class Aegis { + public static final Log LOG = LogFactory.getLog(Aegis.class); + + public static final String CURRENT_MESSAGE_PART = "currentMessagePart"; + + public static final String TYPE_MAPPING_KEY = "type.mapping"; + + public static final String ENCODING_URI_KEY = "type.encodingUri"; + + public static final String WRITE_XSI_TYPE_KEY = "writeXsiType"; + + public static final String OVERRIDE_TYPES_KEY = "overrideTypesList"; + + public static Type getReadType(XMLStreamReader xsr, Context context, Type type) { + String overrideType = xsr.getAttributeValue(XmlConstants.XSI_NS, "type"); + if (overrideType != null) { + QName overrideTypeName = NamespaceHelper.createQName(xsr.getNamespaceContext(), overrideType); + if (!overrideTypeName.equals(type.getSchemaType())) { + Type type2 = type.getTypeMapping().getType(overrideTypeName); + if (type2 == null) { + LOG.info("xsi:type=\"" + overrideTypeName + + "\" was specified, but no corresponding Type was registered; defaulting to " + + type.getSchemaType()); + } else { + type = type2; + } + } + } + return type; + } + + public static Type getWriteType(Context context, Object value, Type type) { + if (value != null && type != null && type.getTypeClass() != value.getClass()) { + List l = (List) context.get(OVERRIDE_TYPES_KEY); + if (l != null && l.contains(value.getClass().getName())) { + type = type.getTypeMapping().getType(value.getClass()); + } + } + return type; + } + +} Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/Aegis.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/Aegis.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/Context.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/Context.java?view=auto&rev=515734 ============================================================================== --- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/Context.java (added) +++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/Context.java Wed Mar 7 12:20:07 2007 @@ -0,0 +1,65 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.aegis; + +import java.util.Collection; +import java.util.HashMap; +import java.util.List; + +import org.apache.cxf.aegis.type.TypeMapping; +import org.apache.cxf.message.Attachment; + +/** + * Holds inforrmation about the message request and response. + * + * @author Dan Diephouse + * @since Feb 13, 2004 + */ +public class Context extends HashMap { + private TypeMapping typeMapping; + private Collection attachments; + private boolean writeXsiTypes; + + public Context() { + } + + public TypeMapping getTypeMapping() { + return typeMapping; + } + + public void setTypeMapping(TypeMapping typeMapping) { + this.typeMapping = typeMapping; + } + + public Collection getAttachments() { + return attachments; + } + + public void setAttachments(Collection attachments) { + this.attachments = attachments; + } + + public boolean isWriteXsiTypes() { + return writeXsiTypes; + } + + public void setWriteXsiTypes(boolean writeXsiTypes) { + this.writeXsiTypes = writeXsiTypes; + } +} Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/Context.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/Context.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/DatabindingException.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/DatabindingException.java?view=auto&rev=515734 ============================================================================== --- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/DatabindingException.java (added) +++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/DatabindingException.java Wed Mar 7 12:20:07 2007 @@ -0,0 +1,131 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.aegis; + +import java.io.PrintStream; +import java.io.PrintWriter; + +/** + * + * + * @author Dan Diephouse + * @since Feb 14, 2004 + */ +public class DatabindingException extends RuntimeException { + private final Throwable cause; + private String message2; + + /** + * Constructs a new exception with the specified detail + * message. + * + * @param message the detail message. + */ + public DatabindingException(String message) { + super(); + this.message2 = message; + this.cause = null; + } + + /** + * Constructs a new exception with the specified detail + * message and cause. + * + * @param message the detail message. + * @param cause the cause. + */ + public DatabindingException(String message, Throwable cause) { + super(message); + this.message2 = message; + this.cause = cause; + } + + /** + * Returns the cause of this throwable or null if the cause + * is nonexistent or unknown. + * + * @return the nested cause. + */ + @Override + public Throwable getCause() { + return this.cause == this ? null : this.cause; + } + + /** + * Return the detail message, including the message from the + * {@link #getCause() nested exception} if there is one. + * + * @return the detail message. + */ + @Override + public String getMessage() { + if (this.cause == null || this.cause == this) { + return message2; + } else { + return message2 + ". Nested exception is " + this.cause.getClass().getName() + ": " + + this.cause.getMessage(); + } + } + + public String getActualMessage() { + return message2; + } + + /** + * Prints this throwable and its backtrace to the specified print stream. + * + * @param s PrintStream to use for output + */ + @Override + public void printStackTrace(PrintStream s) { + if (this.cause == null || this.cause == this) { + super.printStackTrace(s); + } else { + s.println(this); + this.cause.printStackTrace(s); + } + } + + /** + * Prints this throwable and its backtrace to the specified print writer. + * + * @param w PrintWriter to use for output + */ + @Override + public void printStackTrace(PrintWriter w) { + if (this.cause == null || this.cause == this) { + super.printStackTrace(w); + } else { + w.println(this); + this.cause.printStackTrace(w); + } + } + + public void prepend(String m) { + if (this.message2 != null) { + this.message2 = m + ": " + this.message2; + } else { + this.message2 = m; + } + } + + public void setMessage(String s) { + message2 = s; + } +} Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/DatabindingException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/DatabindingException.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java?view=auto&rev=515734 ============================================================================== --- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java (added) +++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java Wed Mar 7 12:20:07 2007 @@ -0,0 +1,334 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.aegis.databinding; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamReader; +import javax.xml.stream.XMLStreamWriter; + +import org.w3c.dom.Node; + +import org.apache.cxf.aegis.Aegis; +import org.apache.cxf.aegis.DatabindingException; +import org.apache.cxf.aegis.type.DefaultTypeMappingRegistry; +import org.apache.cxf.aegis.type.Type; +import org.apache.cxf.aegis.type.TypeMapping; +import org.apache.cxf.aegis.type.TypeMappingRegistry; +import org.apache.cxf.aegis.type.basic.BeanType; +import org.apache.cxf.aegis.util.XmlConstants; +import org.apache.cxf.common.classloader.ClassLoaderUtils; +import org.apache.cxf.databinding.DataBinding; +import org.apache.cxf.databinding.DataReader; +import org.apache.cxf.databinding.DataWriter; +import org.apache.cxf.frontend.MethodDispatcher; +import org.apache.cxf.frontend.SimpleMethodDispatcher; +import org.apache.cxf.service.Service; +import org.apache.cxf.service.factory.ServiceConstructionException; +import org.apache.cxf.service.model.AbstractMessageContainer; +import org.apache.cxf.service.model.FaultInfo; +import org.apache.cxf.service.model.MessagePartInfo; +import org.apache.cxf.service.model.OperationInfo; +import org.apache.cxf.service.model.SchemaInfo; +import org.apache.cxf.service.model.ServiceInfo; +import org.jdom.Attribute; +import org.jdom.Document; +import org.jdom.Element; +import org.jdom.JDOMException; +import org.jdom.output.DOMOutputter; + +public class AegisDatabinding implements DataBinding { + + protected static final int IN_PARAM = 0; + protected static final int OUT_PARAM = 1; + protected static final int FAULT_PARAM = 2; + + private TypeMappingRegistry typeMappingRegistry; + private Map part2Type; + private List overrideTypes; + + public AegisDatabinding() { + super(); + this.typeMappingRegistry = new DefaultTypeMappingRegistry(true); + part2Type = new HashMap(); + } + + @SuppressWarnings("unchecked") + public DataReader createReader(Class cls) { + if (cls.equals(XMLStreamReader.class)) { + return (DataReader)new XMLStreamDataReader(this); + } else { + throw new UnsupportedOperationException(); + } + } + + @SuppressWarnings("unchecked") + public DataWriter createWriter(Class cls) { + if (cls.equals(XMLStreamWriter.class)) { + return (DataWriter)new XMLStreamDataWriter(this); + } else { + throw new UnsupportedOperationException(); + } + } + + public Class[] getSupportedReaderFormats() { + return new Class[] {XMLStreamReader.class, Node.class}; + } + + public Class[] getSupportedWriterFormats() { + return new Class[] {XMLStreamWriter.class, Node.class}; + } + + public TypeMappingRegistry getTypeMappingRegistry() { + return typeMappingRegistry; + } + + public void setTypeMappingRegistry(TypeMappingRegistry typeMappingRegistry) { + this.typeMappingRegistry = typeMappingRegistry; + } + + public void initialize(Service service) { + ServiceInfo endpoint = service.getServiceInfo(); + TypeMapping serviceTM = typeMappingRegistry.createTypeMapping(XmlConstants.XSD, true); + typeMappingRegistry.register(endpoint.getName().getNamespaceURI(), serviceTM); + + service.put(TypeMapping.class.getName(), serviceTM); + + Set deps = new HashSet(); + + for (OperationInfo opInfo : endpoint.getInterface().getOperations()) { + if (opInfo.isUnwrappedCapable()) { + initializeOperation(service, serviceTM, opInfo.getUnwrappedOperation(), deps); + } else { + initializeOperation(service, serviceTM, opInfo, deps); + } + } + + List additional = getAdditionalTypes(service, serviceTM); + + if (additional != null) { + for (Type t : additional) { + if (!deps.contains(t)) { + deps.add(t); + } + } + } + + createSchemas(service, deps); + } + + List getAdditionalTypes(Service service, TypeMapping tm) { + List classes = (List)service.get(Aegis.OVERRIDE_TYPES_KEY); + + this.overrideTypes = classes; + + if (classes != null) { + List types = new ArrayList(); + for (Iterator it = classes.iterator(); it.hasNext();) { + String typeName = (String)it.next(); + Class c; + try { + c = ClassLoaderUtils.loadClass(typeName, Aegis.class); + } catch (ClassNotFoundException e) { + throw new DatabindingException("Could not find override type class: " + typeName, e); + } + + Type t = tm.getType(c); + if (t == null) { + t = tm.getTypeCreator().createType(c); + tm.register(t); + } + if (t instanceof BeanType) { + BeanType bt = (BeanType)t; + bt.getTypeInfo().setExtension(true); + types.add(bt); + } + } + return types; + } + return null; + } + + private void initializeOperation(Service service, TypeMapping serviceTM, OperationInfo opInfo, + Set deps) { + try { + initializeMessage(service, serviceTM, opInfo.getInput(), IN_PARAM, deps); + + if (opInfo.hasOutput()) { + initializeMessage(service, serviceTM, opInfo.getOutput(), OUT_PARAM, deps); + } + + for (FaultInfo info : opInfo.getFaults()) { + initializeMessage(service, serviceTM, info, FAULT_PARAM, deps); + } + + } catch (DatabindingException e) { + e.prepend("Error initializing parameters for operation " + opInfo.getName()); + throw e; + } + } + + protected void initializeMessage(Service service, TypeMapping serviceTM, + AbstractMessageContainer container, int partType, Set deps) { + for (Iterator itr = container.getMessageParts().iterator(); itr.hasNext();) { + MessagePartInfo part = (MessagePartInfo)itr.next(); + + Type type = getParameterType(service, serviceTM, part, partType); + + if (type.isAbstract()) { + part.setTypeQName(type.getSchemaType()); + } else { + part.setElementQName(type.getSchemaType()); + } + + part2Type.put(part, type); + + // QName elName = getSuggestedName(service, op, param) + deps.add(type); + + Set typeDeps = type.getDependencies(); + if (typeDeps != null) { + for (Type t : typeDeps) { + if (!deps.contains(t)) { + deps.add(t); + } + } + } + } + } + + private void createSchemas(Service service, Set deps) { + Map> tns2Type = new HashMap>(); + for (Type t : deps) { + String ns = t.getSchemaType().getNamespaceURI(); + Set types = tns2Type.get(ns); + if (types == null) { + types = new HashSet(); + tns2Type.put(ns, types); + } + types.add(t); + } + + for (Map.Entry> entry : tns2Type.entrySet()) { + Element e = new Element("schema", "xsd", XmlConstants.XSD); + + e.setAttribute(new Attribute("targetNamespace", entry.getKey())); + e.setAttribute(new Attribute("elementFormDefault", "qualified")); + e.setAttribute(new Attribute("attributeFormDefault", "qualified")); + + for (Type t : entry.getValue()) { + t.writeSchema(e); + } + + if (e.getChildren().size() == 0) { + continue; + } + + try { + org.w3c.dom.Document schema = new DOMOutputter().output(new Document(e)); + + SchemaInfo info = new SchemaInfo(service.getServiceInfo(), entry.getKey()); + + info.setElement(schema.getDocumentElement()); + info.setSystemId(entry.getKey()); + + service.getServiceInfo().addSchema(info); + } catch (JDOMException e1) { + throw new ServiceConstructionException(e1); + } + } + + } + + public QName getSuggestedName(Service service, TypeMapping tm, OperationInfo op, int param) { + Method m = getMethod(service, op); + if (m == null) { + return null; + } + + QName name = tm.getTypeCreator().getElementName(m, param); + + // No mapped name was specified, so if its a complex type use that name + // instead + if (name == null) { + Type type = tm.getTypeCreator().createType(m, param); + + if (type.isComplex() && !type.isAbstract()) { + name = type.getSchemaType(); + } + } + + return name; + } + + private Type getParameterType(Service service, TypeMapping tm, MessagePartInfo param, int paramtype) { + Type type = tm.getType(param.getTypeQName()); + + /* + * if (type == null && tm.isRegistered(param.getTypeClass())) { type = + * tm.getType(param.getTypeClass()); part2type.put(param, type); } + */ + + if (type == null) { + OperationInfo op = param.getMessageInfo().getOperation(); + + Method m = getMethod(service, op); + if (paramtype != FAULT_PARAM && m != null) { + + /* + * Note: we are not registering the type here, because it is an + * anonymous type. Potentially there could be many schema types + * with this name. For example, there could be many ns:in0 + * paramters. + */ + type = tm.getTypeCreator().createType(m, param.getIndex()); + } else { + type = tm.getTypeCreator().createType(param.getTypeClass()); + } + + type.setTypeMapping(tm); + + part2Type.put(param, type); + } + + return type; + } + + private Method getMethod(Service service, OperationInfo op) { + MethodDispatcher md = (MethodDispatcher)service.get(MethodDispatcher.class.getName()); + SimpleMethodDispatcher smd = (SimpleMethodDispatcher)md; + return smd.getPrimaryMethod(op); + } + + public Type getType(MessagePartInfo part) { + return part2Type.get(part); + } + + public List getOverrideTypes() { + return overrideTypes; + } +} Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceConfiguration.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceConfiguration.java?view=auto&rev=515734 ============================================================================== --- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceConfiguration.java (added) +++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceConfiguration.java Wed Mar 7 12:20:07 2007 @@ -0,0 +1,34 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.aegis.databinding; + +import java.lang.reflect.Method; + +import org.apache.cxf.aegis.util.NamespaceHelper; +import org.apache.cxf.service.factory.AbstractServiceConfiguration; + +public class AegisServiceConfiguration extends AbstractServiceConfiguration { + + @Override + public String getServiceNamespace() { + return NamespaceHelper.makeNamespaceFromClassName(getServiceFactory().getServiceClass().getName(), + "http"); + } + +} \ No newline at end of file Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceConfiguration.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceConfiguration.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceFactoryBean.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceFactoryBean.java?view=auto&rev=515734 ============================================================================== --- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceFactoryBean.java (added) +++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceFactoryBean.java Wed Mar 7 12:20:07 2007 @@ -0,0 +1,7 @@ +package org.apache.cxf.aegis.databinding; + +import org.apache.cxf.service.factory.ReflectionServiceFactoryBean; + +public class AegisServiceFactoryBean extends ReflectionServiceFactoryBean { + +} Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceFactoryBean.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceFactoryBean.java ------------------------------------------------------------------------------ svn:executable = * Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisServiceFactoryBean.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/XMLStreamDataReader.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/XMLStreamDataReader.java?view=auto&rev=515734 ============================================================================== --- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/XMLStreamDataReader.java (added) +++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/XMLStreamDataReader.java Wed Mar 7 12:20:07 2007 @@ -0,0 +1,100 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.aegis.databinding; + +import java.util.Collection; +import java.util.logging.Logger; + +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamReader; +import javax.xml.validation.Schema; + +import org.apache.cxf.aegis.Aegis; +import org.apache.cxf.aegis.Context; +import org.apache.cxf.aegis.DatabindingException; +import org.apache.cxf.aegis.type.Type; +import org.apache.cxf.aegis.xml.stax.ElementReader; +import org.apache.cxf.common.i18n.Message; +import org.apache.cxf.databinding.DataReader; +import org.apache.cxf.interceptor.Fault; +import org.apache.cxf.message.Attachment; +import org.apache.cxf.service.model.MessagePartInfo; + +public class XMLStreamDataReader implements DataReader { + + private static final Logger LOG = Logger.getLogger(XMLStreamDataReader.class.getName()); + + private AegisDatabinding databinding; + + private Context context = new Context(); + + public XMLStreamDataReader(AegisDatabinding databinding) { + this.databinding = databinding; + } + + public Object read(MessagePartInfo part, XMLStreamReader input) { + Type type = databinding.getType(part); + + type = Aegis.getReadType(input, context, type); + + if (type == null) { + throw new Fault(new Message("NO_MESSAGE_FOR_PART", LOG)); + } + + // I don't think this is the right type mapping + context.setTypeMapping(type.getTypeMapping()); + + ElementReader elReader = new ElementReader(input); + if (elReader.isXsiNil()) { + elReader.readToEnd(); + return null; + } + + try { + return type.readObject(elReader, context); + } catch (DatabindingException e) { + throw new RuntimeException(e); + } + } + + public Object read(QName name, XMLStreamReader input, Class type) { + // TODO Auto-generated method stub + return null; + } + + public Object read(XMLStreamReader input) { + // TODO Auto-generated method stub + return null; + } + + public void setAttachments(Collection attachments) { + context.setAttachments(attachments); + } + + public void setProperty(String prop, Object value) { + // TODO Auto-generated method stub + + } + + public void setSchema(Schema s) { + // TODO Auto-generated method stub + + } + +} Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/XMLStreamDataReader.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/XMLStreamDataReader.java ------------------------------------------------------------------------------ svn:keywords = Rev Date