Author: mmerz
Date: Sun May 15 11:50:03 2005
New Revision: 170249
URL: http://svn.apache.org/viewcvs?rev=170249&view=rev
Log:
Cleaned up the build path for the blank sample to remove the extra path to the
classes.
Updated the unit testing for the sample to fix the wsdl path annotation.
Contributor: Daryoush Mehrtash
Modified:
incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml
incubator/beehive/trunk/samples/controls-webservices-blank/build.xml
incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java
incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs
Modified:
incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml?rev=170249&r1=170248&r2=170249&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml
(original)
+++ incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml
Sun May 15 11:50:03 2005
@@ -73,7 +73,6 @@
</path>
<path id="run.classpath">
- <pathelement path="${build.classes}" /> <!-- this should not
be needed, but without it wsdl is not found -->
<path refid="service.control.dependencies" />
<pathelement path="${build.dir}/${build.jar}" />
<path refid="junit.dependency.path" />
@@ -124,8 +123,7 @@
</classpath>
<arg line="-gen_root ${gen.source.dir}
-wsdl ${schema.dir}
- -pkg ${my.service.control.package}
- -wsdl_path_annotation ${my.service.control.package}" />
+ -pkg ${my.service.control.package}" />
</java>
<!-- have the wsdls, in the same dir as the jcx files -->
Modified: incubator/beehive/trunk/samples/controls-webservices-blank/build.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-webservices-blank/build.xml?rev=170249&r1=170248&r2=170249&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/controls-webservices-blank/build.xml
(original)
+++ incubator/beehive/trunk/samples/controls-webservices-blank/build.xml Sun
May 15 11:50:03 2005
@@ -53,8 +53,6 @@
</path>
<path id="run.classpath">
- <pathelement path="${build.classes}" />
- <!-- this should not be needed, but without it wsdl is not
found -->
<path refid="lib.path" />
<pathelement location="${servlet-api.jar}" />
<pathelement location="${jsp-api.jar}" />
@@ -117,8 +115,7 @@
</classpath>
<arg line="-gen_root ${gen.source.dir}
-wsdl ${schema.dir}
- -pkg ${my.service.control.package}
- -wsdl_path_annotation ${my.service.control.package}" />
+ -pkg ${my.service.control.package}" />
</java>
<!-- have the wsdls, in the same dir as the jcx files -->
Modified:
incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java?rev=170249&r1=170248&r2=170249&view=diff
==============================================================================
---
incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java
(original)
+++
incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java
Sun May 15 11:50:03 2005
@@ -73,6 +73,8 @@
try {
beanContext.beginContext();
initializeControls(this);
+ // set the bean context's base object for loading
resources.
+ beanContext.setBaseObjectToLoadFrom(client);
} catch (Exception e) {
e.printStackTrace();
}
@@ -108,16 +110,21 @@
org.apache.beehive.controls.runtime.bean.ControlContainerContext {
private static final long serialVersionUID = 1L;
+ Object obj; // used to find the resources
public JunitTestBeanContext() {
super();
}
-
+ public void setBaseObjectToLoadFrom(Object obj) {
+ this.obj=obj;
+ }
public InputStream getResourceAsStream(String name, BeanContextChild
bcc)
throws IllegalArgumentException {
- return null; // not sure why this works!
- }
+ InputStream is =
obj.getClass().getResourceAsStream(name);
+ return is;
+
+ }
public void initialize() {
super.initialize();
addService(JUnitServiceProvider.class, new
JUnitServiceProvider());
Modified:
incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs?rev=170249&r1=170248&r2=170249&view=diff
==============================================================================
---
incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs
(original)
+++
incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs
Sun May 15 11:50:03 2005
@@ -526,6 +526,7 @@
// }
if (wsdlStream == null) {
+ logger.info("Failed to load the wsdl
from context, will try classloader!");
wsdlStream =
this.getClass().getClassLoader().getResourceAsStream(pathToWSDL);
if(null == wsdlStream) {
f = new File(pathToWSDL);