diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-01-14 21:54:36 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-01-14 21:54:36 +0000 |
commit | db95d49e14867fe95470193ec9d8c98b28947e49 (patch) | |
tree | 25ea7836686a28a0d865c8bde341f9123ecedb05 /branches/sca-java-1.x/modules | |
parent | 734d1d84e2b097d334bf57331f14af0ee250ca0c (diff) |
TUSCANY-2463 - Properly register default attribute processor to handle extended attributes
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@734525 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules')
2 files changed, 23 insertions, 4 deletions
diff --git a/branches/sca-java-1.x/modules/contribution-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor b/branches/sca-java-1.x/modules/contribution-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor new file mode 100644 index 0000000000..86bc58665b --- /dev/null +++ b/branches/sca-java-1.x/modules/contribution-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor @@ -0,0 +1,19 @@ +# 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. + +# Implementation class for the attribute processor extension +org.apache.tuscany.sca.contribution.processor.xml.AnyAttributeProcessor;qname=http://www.w3.org/2001/XMLSchema#anyAttribute,model=java.lang.Object diff --git a/branches/sca-java-1.x/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java b/branches/sca-java-1.x/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java index 29c2af7513..9a5f1b363a 100644 --- a/branches/sca-java-1.x/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java +++ b/branches/sca-java-1.x/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java @@ -55,7 +55,7 @@ public class ExtensibleStAXAttributeProcessor private static final Logger logger = Logger.getLogger(ExtensibleStAXAttributeProcessor.class.getName()); - private static final QName UNKNOWN_ATTRIBUTE = new QName(Constants.SCA10_TUSCANY_NS, "unknown"); + private static final QName ANY_ATTRIBUTE = new QName(Constants.XMLSCHEMA_NS, "anyAttribute"); private XMLInputFactory inputFactory; private XMLOutputFactory outputFactory; @@ -149,13 +149,13 @@ public class ExtensibleStAXAttributeProcessor //handle extension attributes without processors - processor = (StAXAttributeProcessor<?>)processors.getProcessor(UNKNOWN_ATTRIBUTE); + processor = (StAXAttributeProcessor<?>)processors.getProcessor(ANY_ATTRIBUTE); if (processor == null) { Location location = source.getLocation(); if (logger.isLoggable(Level.WARNING)) { logger.warning("Could not find Default Attribute processor !"); } - warning("DefaultAttributeProcessorNotAvailable", processors, UNKNOWN_ATTRIBUTE, location); + warning("DefaultAttributeProcessorNotAvailable", processors, ANY_ATTRIBUTE, location); } return processor == null ? null : processor.read(attributeName, source); @@ -181,7 +181,7 @@ public class ExtensibleStAXAttributeProcessor } //handle extension attributes without processors - processor = (StAXAttributeProcessor<?>)processors.getProcessor(UNKNOWN_ATTRIBUTE); + processor = (StAXAttributeProcessor<?>)processors.getProcessor(ANY_ATTRIBUTE); if(processor == null) { if (logger.isLoggable(Level.WARNING)) { logger.warning("No Default StAX processor is configured to handle " + model.getClass()); |