You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2010/08/18 17:21:26 UTC
svn commit: r986735 - in
/tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java:
JavaInterface.java impl/JavaInterfaceImpl.java
Author: slaws
Date: Wed Aug 18 15:21:24 2010
New Revision: 986735
URL: http://svn.apache.org/viewvc?rev=986735&view=rev
Log:
TUSCANY-3653 - Add slots to store information read from JAXWS annotations. This information will be read by a util (that will eventually be reused by the implementation.java code) and processed by the processor.
Modified:
tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/JavaInterface.java
tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceImpl.java
Modified: tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/JavaInterface.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/JavaInterface.java?rev=986735&r1=986734&r2=986735&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/JavaInterface.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/JavaInterface.java Wed Aug 18 15:21:24 2010
@@ -21,6 +21,7 @@ package org.apache.tuscany.sca.interface
import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.Base;
+import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.interfacedef.Interface;
/**
@@ -86,4 +87,48 @@ public interface JavaInterface extends I
* @param callbackClass the callback class specified in an @Callback annotation
*/
void setCallbackClass(Class<?> callbackClass);
+
+ /**
+ * A Java interface may have JAXWS annotations that refer to a
+ * a WSDL document. The resulting WSDL location is stored here
+ * so that is can be resolved after the Java interface itself
+ * has been resolved
+ *
+ * @return WSDL interface
+ */
+ String getJAXWSWSDLLocation();
+
+ /**
+ * A Java interface may have JAXWS annotations that refer to a
+ * a WSDL document. The resulting WSDL location is stored here
+ * so that is can be resolved after the Java interface itself
+ * has been resolved
+ *
+ * @param wsdlInterface
+ */
+ void setJAXWSWSDLLocation(String wsdlLocation);
+
+ /**
+ * A Java interface may have JAXWS annotations that refer to a
+ * a Java interface by name. The resulting class name is stored here
+ * so that is can be resolved after this Java interface
+ * has been resolved
+ *
+ * @return
+ */
+ String getJAXWSJavaInterfaceName();
+
+ /**
+ * A Java interface may have JAXWS annotations that refer to a
+ * a Java interface by name. The resulting class name is stored here
+ * so that is can be resolved after this Java interface
+ * has been resolved
+ *
+ * @return
+ */
+ void setJAXWSJavaInterfaceName(String javaInterfaceName);
+
+ public Contribution getContributionContainingClass();
+
+ public void setContributionContainingClass(Contribution contributionContainingClass);
}
Modified: tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceImpl.java?rev=986735&r1=986734&r2=986735&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceImpl.java Wed Aug 18 15:21:24 2010
@@ -28,6 +28,7 @@ import java.lang.reflect.ParameterizedTy
import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.xml.Constants;
+import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.interfacedef.DataType;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl;
@@ -50,6 +51,9 @@ public class JavaInterfaceImpl extends I
private WeakReference<Class<?>> javaClass;
private Class<?> callbackClass;
private QName qname;
+ private String jaxwsWSDLLocation;
+ private String jaxwsJavaInterfaceName;
+ private Contribution contributionContainingClass;
protected JavaInterfaceImpl() {
super();
@@ -321,5 +325,36 @@ public class JavaInterfaceImpl extends I
} // end for
return false;
} // end method isAsyncServer
-
+
+ public String getJAXWSWSDLLocation() {
+ return jaxwsWSDLLocation;
+ }
+
+ public void setJAXWSWSDLLocation(String wsdlLocation) {
+ this.jaxwsWSDLLocation = wsdlLocation;
+ }
+
+ public String getJAXWSJavaInterfaceName() {
+ return jaxwsJavaInterfaceName;
+ }
+
+ public void setJAXWSJavaInterfaceName(String javaInterfaceName) {
+ this.jaxwsJavaInterfaceName = javaInterfaceName;
+ }
+
+ /**
+ * A Java class may reference a WSDL file via a JAXWS annotation. We need to resolve
+ * the WSDL file location in the context of the same contribution that holds the
+ * Java file. In order to do this we need to remember the actual contribution that
+ * was used to resolve a Java class.
+ *
+ * @return
+ */
+ public Contribution getContributionContainingClass() {
+ return contributionContainingClass;
+ }
+
+ public void setContributionContainingClass(Contribution contributionContainingClass) {
+ this.contributionContainingClass = contributionContainingClass;
+ }
}