beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Oathout <>
Subject Beehive Control inside WebService gives NPE
Date Tue, 27 Sep 2005 04:48:48 GMT
First off, thx for all the work the beehive team (and community) has put
into beehive. Nice to have to features of workshop in an open fashion. Now
onto the issue. I'm having a problem when trying to use a control inside my
beehive webservice. I've created a very simple control that works perfectly
inside a page flow, but when I try to reuse that control inside a simple
webservice my control is never getting configured/created. Here is the
webservice code:

package web;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import org.apache.axis.utils.StringUtils;
import org.apache.beehive.controls.api.bean.Control;
import controls.SimpleControl;
@WebService public class Blank {
@Control private SimpleControl control;
@WebMethod public String sayHelloWorld(String s) {
return control.sayHello(s);
@WebMethod public String sayHelloWorldInParam(@WebParam String greetee) {
if (StringUtils.isEmpty(greetee))
greetee = "World";
return control.sayHello(greetee);
public String sayNothingOverTheWeb()
return "Not for Web consumption!";

Here is the control interface code:
package controls;
import org.apache.beehive.controls.api.bean.ControlInterface;
public interface SimpleControl {
public String sayHello(String name);

Here is the control impl code:
package controls;
import org.apache.beehive.controls.api.bean.ControlImplementation;
public class SimpleControlImpl implements SimpleControl {
/* (non-Javadoc)
* @see controls.SimpleControl#sayHello(java.lang.String)
public String sayHello(String name) {
return "Hello, " + name + "!";

When I invoke the web service I get a NPE because my control is never
initialized (looks like the beaninfo and control initializer are being
created fine). Could somebody give me an idea of what may be going wrong, or
where in the beehive source I could look to help me resolve this issue?

I will be attending BEA World this week so if any of the dev. team (or
community memebers) are there and would be willing to meet to discuss these
issues (possibly at the BOF session tomorrow night) I would love to meet up.


Aaron Oathout

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message