Hi Aaron,

It appears you have run into BEEHIVE-804. I have attached a patch in JIRA
for this issue, but it may not get commited until after 1.0 has been
released (hopefully later this week).

- Chad

On 9/26/05, Aaron Oathout <[EMAIL PROTECTED]> wrote:
>
> 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;
> @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;
> @ControlImplementation(isTransient=true)
> 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.
>
> Thanks,
>
> Aaron Oathout
>
>

Reply via email to