diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-05-17 17:25:31 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-05-17 17:25:31 +0000 |
commit | 4bb8e8e5de317bb63ace92ed763557f92a3195f4 (patch) | |
tree | 83bd2ead3ea400178ef831e9195c67fd9e6265e2 /sca-java-2.x/trunk/modules | |
parent | 7efd7fcec7f77cade404add439328d8af00bc780 (diff) |
Make sure we use the value element (holding the property value) for conversion
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@945255 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r-- | sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java index 846d45403f..45020676ee 100644 --- a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java +++ b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java @@ -26,7 +26,6 @@ import java.net.URLConnection; import javax.xml.XMLConstants; import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.Source; @@ -89,7 +88,6 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; -import org.xml.sax.SAXException; /** * @version $Rev$ $Date$ @@ -695,7 +693,8 @@ public class ComponentBuilderImpl { // The property has a simple schema type so we can use the // data binding framework to see if the XML value can be transformed // into a simple Java value - Document source = (Document)componentProperty.getValue(); + Document doc = (Document)componentProperty.getValue(); + Node source = (doc == null) ? null : doc.getDocumentElement().getFirstChild(); DataType<XMLType> sourceDataType = new DataTypeImpl<XMLType>(DOMDataBinding.NAME, Node.class, new XMLType(null, componentProperty.getXSDType())); |