Here is the code for the java side
|
| @Stateless
| @WebService(serviceName="TestService")
| @SOAPBinding(
| style=javax.jws.soap.SOAPBinding.Style.RPC,
| use=javax.jws.soap.SOAPBinding.Use.LITERAL)
| public class TestWebService extends Remote implements TestWebServiceInterface {
|
| @EJB private DomainManager domainManager;
|
| public TestWebService() {
| }
|
| @WebMethod
| public String sayHello() {
|
| String hellostring = domainManager.sayHello();
| return hellostring;
| }
| }
|
| @Local
| public interface DomainManager {
|
| public String sayHello();
| }
|
| @Stateless
| public class DomainManagerBean implements DomainManager{
|
|
| public DomainManagerBean() {
| }
|
| public String sayHello() {
| return "Hello";
| }
| }
|
|
I am invoking the web service from a flex application, not sure if pasting that code will
help ...
Upon invokation this is the line where the null pointer is thrown
| String hellostring = domainManager.sayHello();
|
Alternatively, this is the code i was using inside the WebMethod to look up the bean
|
| InitialContext ctx = new InitialContext();
| domainManager = (DomainManager)
ctx.lookup("RPortal/DomainManagerBean/local");
|
|
and it works ...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175603#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...