tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amber <ambe...@hotmail.fr>
Subject @WebService annotation & jpa remove
Date Tue, 21 Feb 2012 07:30:36 GMT
A new question ...

All tests are working well (Eclipse and Maven), now I want to add the
@WebService annotation on my EJB. 

but at that point the EJBs are no more injected in my testing class (got a
null pointer) :(

/The interface :/

@WebService(name = "IFooServiceBeanWS")
public interface IFooServiceBeanWS {

	@WebMethod(operationName = "listCategories")
	List<Foo> loadAllCategories();

}


/the EJB/

@WebService(endpointInterface = "org.foo.services.foo.IFooServiceBeanWS",
serviceName = "FooWebService")
@TransactionAttribute(TransactionAttributeType.REQUIRED)
@Stateless
public class FooServiceBean {

	...
	
}


/The test class :/

@ManagedBean
class FooServiceBeanTest extends AbstractServiceTest {

	@EJB
	protected FooServiceBean catBean;
	
	@WebServiceRef(
            wsdlLocation = "http://127.0.0.1:4204/FooServiceBean?wsdl"
    )
    private IFooServiceBeanWS fooWs;
    
    ...
}


/the catBen properties is not injected. At running i got thoses warnings :/

..
2012-02-20 17:12:43,587 WARN  [startup] Unresolved ejb reference
"java:comp/env/org.foo.services.foo.FooServiceBeanTest/catBean" in bean
"foo-services_test.Comp".  Will attempt resolution again at runtime.
2012-02-20 17:12:43,587 WARN  [startup] Unresolved ejb reference
"java:comp/env/org.foo.services.foo.FooServiceBeanTest/catBean" in bean
"FooServiceBeanTest".  Will attempt resolution again at runtime.
...
2012-02-20 17:12:46,408 WARN  [OpenEJB] Injection data not found in JNDI
context:
jndiName='comp/env/org.foo.services.foo.FooServiceBeanTest/catBean',
target=org.foo.services.foo.FooServiceBeanTest/catBean
...


Of course if I remove the @webService annotation (and @WebServiceRef) , all
is working fine

did I miss something?


--
View this message in context: http://openejb.979440.n4.nabble.com/WebService-annotation-jpa-remove-tp4406170p4406170.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message