summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk')
-rw-r--r--sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java2
-rw-r--r--sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java16
-rw-r--r--sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java2
-rw-r--r--sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java12
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java5
-rw-r--r--sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java5
-rw-r--r--sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java2
-rw-r--r--sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringImplementationProcessor.java5
-rw-r--r--sca-java-2.x/trunk/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java2
-rw-r--r--sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java7
10 files changed, 31 insertions, 27 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
index 8f8158776f..7d72e685cd 100644
--- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
+++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
@@ -224,7 +224,7 @@ abstract class BaseAssemblyProcessor extends BaseStAXArtifactProcessor {
* @param reader
*/
protected void readTargets(Reference reference, XMLStreamReader reader) {
- String value = reader.getAttributeValue(null, TARGET);
+ String value = getURIString(reader, TARGET);
ComponentService target = null;
if (value != null) {
for (StringTokenizer tokens = new StringTokenizer(value); tokens.hasMoreTokens();) {
diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
index 3558b191cb..16874ff0d2 100644
--- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
+++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
@@ -182,7 +182,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
composite = assemblyFactory.createComposite();
composite.setSpecVersion(Constants.SCA11_NS);
- composite.setName(new QName(getString(reader, TARGET_NAMESPACE), getString(reader, NAME)));
+ composite.setName(new QName(getURIString(reader, TARGET_NAMESPACE), getString(reader, NAME)));
if (!isSet(reader, TARGET_NAMESPACE)) {
// spec says that a composite must have a namespace
@@ -204,7 +204,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
// Read an <include>
include = assemblyFactory.createComposite();
include.setName(getQName(reader, NAME));
- include.setURI(getString(reader, URI));
+ include.setURI(getURIString(reader, URI));
include.setUnresolved(true);
composite.getIncludes().add(include);
@@ -294,7 +294,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
compositeReference.setName(getString(reader, NAME));
readMultiplicity(compositeReference, reader);
readTargets(compositeReference, reader);
- String promote = reader.getAttributeValue(null, Constants.PROMOTE);
+ String promote = getURIString(reader, Constants.PROMOTE);
if (promote != null) {
for (StringTokenizer tokens = new StringTokenizer(promote); tokens.hasMoreTokens();) {
String refName = tokens.nextToken();
@@ -332,7 +332,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
// Read a <component><property>
componentProperty = assemblyFactory.createComponentProperty();
property = componentProperty;
- String source = getString(reader, SOURCE);
+ String source = getURIString(reader, SOURCE);
if (source != null) {
source = source.trim();
}
@@ -361,7 +361,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
//throw ce;
}
}
- componentProperty.setFile(getString(reader, FILE));
+ componentProperty.setFile(getURIString(reader, FILE));
//handle extension attributes
this.readExtendedAttributes(reader,
@@ -411,7 +411,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
component.setAutowire(getBoolean(reader, AUTOWIRE));
}
if (isSet(reader, URI)) {
- component.setURI(getString(reader, URI));
+ component.setURI(getURIString(reader, URI));
}
//handle extension attributes
@@ -426,12 +426,12 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
wire = assemblyFactory.createWire();
ComponentReference source = assemblyFactory.createComponentReference();
source.setUnresolved(true);
- source.setName(getString(reader, SOURCE));
+ source.setName(getURIString(reader, SOURCE));
wire.setSource(source);
ComponentService target = assemblyFactory.createComponentService();
target.setUnresolved(true);
- target.setName(getString(reader, TARGET));
+ target.setName(getURIString(reader, TARGET));
wire.setTarget(target);
// Read @replace
diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java
index 629c9e255f..006b80ee31 100644
--- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java
+++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java
@@ -95,7 +95,7 @@ public class DefinitionsProcessor extends BaseStAXArtifactProcessor implements S
name = reader.getName();
if (DEFINITIONS_QNAME.equals(name)) {
definitions = definitionsFactory.createDefinitions();
- targetNamespace = reader.getAttributeValue(null, TARGET_NAMESPACE);
+ targetNamespace = getURIString(reader, TARGET_NAMESPACE);
definitions.setTargetNamespace(targetNamespace);
} else {
Object extension = extensionProcessor.read(reader, context);
diff --git a/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java b/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java
index be5673bc60..1a2fea2d25 100644
--- a/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java
+++ b/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java
@@ -218,13 +218,13 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St
}
// Read initial context factory
- String initialContextFactory = reader.getAttributeValue(null, "initialContextFactory");
+ String initialContextFactory = getURIString(reader, "initialContextFactory");
if (initialContextFactory != null && initialContextFactory.length() > 0) {
jmsBinding.setInitialContextFactoryName(initialContextFactory);
}
// Read JNDI URL
- String jndiURL = reader.getAttributeValue(null, "jndiURL");
+ String jndiURL = getURIString(reader, "jndiURL");
if (jndiURL != null && jndiURL.length() > 0) {
jmsBinding.setJndiURL(jndiURL);
}
@@ -407,7 +407,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St
}
private void parseDestination(XMLStreamReader reader, JMSBinding jmsBinding, Monitor monitor) throws XMLStreamException {
- String name = reader.getAttributeValue(null, "jndiName");
+ String name = getURIString(reader, "jndiName");
if (name != null && name.length() > 0) {
jmsBinding.setDestinationName(name);
}
@@ -433,7 +433,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St
}
private void parseConnectionFactory(XMLStreamReader reader, JMSBinding jmsBinding, Monitor monitor) throws XMLStreamException {
- String name = reader.getAttributeValue(null, "jndiName");
+ String name = getURIString(reader, "jndiName");
if (name != null && name.length() > 0) {
jmsBinding.setConnectionFactoryName(name);
} else {
@@ -453,7 +453,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St
}
private void parseResponseDestination(XMLStreamReader reader, JMSBinding jmsBinding, Monitor monitor) throws XMLStreamException {
- String name = reader.getAttributeValue(null, "jndiName");
+ String name = getURIString(reader, "jndiName");
if (name != null && name.length() > 0) {
jmsBinding.setResponseDestinationName(name);
}
@@ -479,7 +479,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St
}
private void parseResponseConnectionFactory(XMLStreamReader reader, JMSBinding jmsBinding, Monitor monitor) throws XMLStreamException {
- String name = reader.getAttributeValue(null, "jndiName");
+ String name = getURIString(reader, "jndiName");
if (name != null && name.length() > 0) {
jmsBinding.setResponseConnectionFactoryName(name);
} else {
diff --git a/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java b/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
index 2966a1ef81..c266ab33de 100644
--- a/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
+++ b/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
@@ -36,6 +36,7 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.PolicySubjectProcessor;
import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory;
+import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
import org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
@@ -60,7 +61,7 @@ import org.apache.tuscany.sca.policy.PolicyFactory;
*
* @version $Rev$ $Date$
*/
-public class WebServiceBindingProcessor implements StAXArtifactProcessor<WebServiceBinding>, WebServiceConstants {
+public class WebServiceBindingProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<WebServiceBinding>, WebServiceConstants {
private ExtensionPointRegistry extensionPoints;
private WSDLFactory wsdlFactory;
@@ -135,7 +136,7 @@ public class WebServiceBindingProcessor implements StAXArtifactProcessor<WebServ
// Read a qname in the form:
// namespace#wsdl.???(name)
Boolean wsdlElementIsBinding = null;
- String wsdlElement = reader.getAttributeValue(null, WSDL_ELEMENT);
+ String wsdlElement = getURIString(reader, WSDL_ELEMENT);
if (wsdlElement != null) {
int index = wsdlElement.indexOf('#');
if (index == -1) {
diff --git a/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java b/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java
index 1cfb30ac6d..a199f6874c 100644
--- a/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java
+++ b/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java
@@ -29,6 +29,7 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.contribution.java.JavaImport;
import org.apache.tuscany.sca.contribution.java.JavaImportExportFactory;
+import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
import org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
@@ -45,7 +46,7 @@ import org.apache.tuscany.sca.monitor.Problem.Severity;
*
* @version $Rev$ $Date$
*/
-public class JavaImportProcessor implements StAXArtifactProcessor<JavaImport> {
+public class JavaImportProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<JavaImport> {
private static final String SCA11_NS = "http://docs.oasis-open.org/ns/opencsa/sca/200912";
private static final QName IMPORT_JAVA = new QName(SCA11_NS, "import.java");
@@ -105,7 +106,7 @@ public class JavaImportProcessor implements StAXArtifactProcessor<JavaImport> {
} else
javaImport.setPackage(packageName);
- String location = reader.getAttributeValue(null, LOCATION);
+ String location = getURIString(reader, LOCATION);
javaImport.setLocation(location);
}
break;
diff --git a/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java b/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java
index 120689c28e..f9ba0c40fd 100644
--- a/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java
+++ b/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java
@@ -116,7 +116,7 @@ public class NamespaceImportProcessor extends BaseStAXArtifactProcessor implemen
namespaceImport.setNamespace(ns);
}
- String location = reader.getAttributeValue(null, LOCATION);
+ String location = getURIString(reader, LOCATION);
if (location != null) {
namespaceImport.setLocation(location);
}
diff --git a/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringImplementationProcessor.java b/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringImplementationProcessor.java
index 0cd85d1e33..d553011098 100644
--- a/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringImplementationProcessor.java
+++ b/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringImplementationProcessor.java
@@ -30,6 +30,7 @@ import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.ComponentType;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.assembly.xml.PolicySubjectProcessor;
+import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
import org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
@@ -50,7 +51,7 @@ import org.apache.tuscany.sca.monitor.Problem.Severity;
*
* @version $Rev$ $Date$
*/
-public class SpringImplementationProcessor implements StAXArtifactProcessor<SpringImplementation> {
+public class SpringImplementationProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<SpringImplementation> {
private static final String LOCATION = "location";
private static final String IMPLEMENTATION_SPRING = "implementation.spring";
@@ -124,7 +125,7 @@ public class SpringImplementationProcessor implements StAXArtifactProcessor<Spri
SpringImplementation springImplementation = null;
// Read the location attribute for the spring implementation
- String springLocation = reader.getAttributeValue(null, LOCATION);
+ String springLocation = getURIString(reader, LOCATION);
if (springLocation != null) {
springImplementation = new SpringImplementation();
springImplementation.setLocation(springLocation);
diff --git a/sca-java-2.x/trunk/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java b/sca-java-2.x/trunk/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java
index d4896b8d0a..bf84a15aa6 100644
--- a/sca-java-2.x/trunk/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java
+++ b/sca-java-2.x/trunk/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java
@@ -80,7 +80,7 @@ public class WidgetImplementationProcessor extends BaseStAXArtifactProcessor imp
WidgetImplementation implementation = null;
// Read the location attribute specifying the location of the resources
- String location = reader.getAttributeValue(null, "location");
+ String location = getURIString(reader, "location");
if (location != null) {
implementation = implementationFactory.createWidgetImplementation();
implementation.setLocation(location);
diff --git a/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java b/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
index a04b3136d7..cbaa5cbd5e 100644
--- a/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
+++ b/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
@@ -28,6 +28,7 @@ import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.PolicySubjectProcessor;
+import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
import org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
@@ -53,7 +54,7 @@ import org.apache.tuscany.sca.policy.PolicyFactory;
* Handles a <interface.wsdl ... /> element in a SCDL file
* @version $Rev$ $Date$
*/
-public class WSDLInterfaceProcessor implements StAXArtifactProcessor<WSDLInterfaceContract>, WSDLConstants {
+public class WSDLInterfaceProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<WSDLInterfaceContract>, WSDLConstants {
private WSDLFactory wsdlFactory;
private InterfaceContractMapper interfaceContractMapper;
@@ -177,14 +178,14 @@ public class WSDLInterfaceProcessor implements StAXArtifactProcessor<WSDLInterfa
String location = reader.getAttributeValue(WSDLI_NS, WSDL_LOCATION);
wsdlInterfaceContract.setLocation(location);
- String uri = reader.getAttributeValue(null, INTERFACE);
+ String uri = getURIString(reader, INTERFACE);
if (uri != null) {
WSDLInterface wsdlInterface = createWSDLInterface(uri, monitor);
if (wsdlInterface != null)
wsdlInterfaceContract.setInterface(wsdlInterface);
}
- uri = reader.getAttributeValue(null, CALLBACK_INTERFACE);
+ uri = getURIString(reader, CALLBACK_INTERFACE);
if (uri != null) {
WSDLInterface wsdlCallbackInterface = createWSDLInterface(uri, monitor);
if (wsdlCallbackInterface != null)