summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/interface-wsdl/src
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-08-03 12:07:49 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-08-03 12:07:49 +0000
commit77d62d152b3a849d188e337fdb357f8dda2be773 (patch)
tree48ec8c32843a04365f890477db4e46c7b80b74f0 /java/sca/modules/interface-wsdl/src
parentb0ad224f91ccc68d816cfbd3555004734aefc97f (diff)
Raise an error when remotable is set to anything but true. Required to get ASM-8019 going. There needs to be a further change here to get the context of the error printed out. ML discussion ongoing.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@800327 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/interface-wsdl/src')
-rw-r--r--java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLConstants.java1
-rw-r--r--java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java11
-rw-r--r--java/sca/modules/interface-wsdl/src/main/resources/interface-wsdlxml-validation-messages.properties3
3 files changed, 14 insertions, 1 deletions
diff --git a/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLConstants.java b/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLConstants.java
index b1c431c19d..3612fa7756 100644
--- a/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLConstants.java
+++ b/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLConstants.java
@@ -31,6 +31,7 @@ public interface WSDLConstants {
QName INTERFACE_WSDL_QNAME = new QName(SCA11_NS, "interface.wsdl");
String INTERFACE = "interface";
String CALLBACK_INTERFACE = "callbackInterface";
+ String REMOTABLE = "remotable";
String WSDL_LOCATION = "wsdlLocation";
String WSDLI_NS = "http://www.w3.org/2004/08/wsdl-instance";
QName WSDL_LOCATION_QNAME = new QName(WSDLI_NS, WSDL_LOCATION);
diff --git a/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java b/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
index d33f52b1dc..960ef71302 100644
--- a/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
+++ b/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
@@ -176,6 +176,17 @@ public class WSDLInterfaceProcessor implements StAXArtifactProcessor<WSDLInterfa
if (wsdlCallbackInterface != null)
wsdlInterfaceContract.setCallbackInterface(wsdlCallbackInterface);
}
+
+ String remotable = reader.getAttributeValue(null, REMOTABLE);
+ if (remotable != null &&
+ !remotable.equals("true")){
+ Monitor.error(monitor,
+ this,
+ "interface-wsdlxml-validation-messages",
+ "InvalidRemotableValue",
+ ((WSDLInterface)wsdlInterfaceContract.getInterface()).getName().toString(),
+ remotable);
+ }
// Skip to end element
while (reader.hasNext()) {
diff --git a/java/sca/modules/interface-wsdl/src/main/resources/interface-wsdlxml-validation-messages.properties b/java/sca/modules/interface-wsdl/src/main/resources/interface-wsdlxml-validation-messages.properties
index 2f8c3e0500..328f3c2d35 100644
--- a/java/sca/modules/interface-wsdl/src/main/resources/interface-wsdlxml-validation-messages.properties
+++ b/java/sca/modules/interface-wsdl/src/main/resources/interface-wsdlxml-validation-messages.properties
@@ -21,4 +21,5 @@
ContributionReadException = ContributionReadException occured due to :
ContributionResolveException = ContributionResolveException occured due to :
InvalidWSDLInterfaceAttr = Invalid WSDL interface attribute: {0}
-WsdlInterfaceDoesNotMatch = The #wsdl.interface({0}) specified does not match with WSDL Definitions \ No newline at end of file
+WsdlInterfaceDoesNotMatch = The #wsdl.interface({0}) specified does not match with WSDL Definitions
+InvalidRemotableValue = The interface.wsdl interface {0} element can only have a remotable attribute with the value "true" as WSDL interface are assumed to be remotable by default. The value that was found is: {1}. \ No newline at end of file