-
1. Re: Accessing web service from MBean
thomas.diesler Jan 4, 2006 12:42 PM (in response to hlehtimaki)AFAIK an MBean does not have an environment context.
Your MBean will have to use DII to construct a the proxy using wsdl + jaxrpc-mapping
http://wiki.jboss.org/wiki/Wiki.jsp?page=WSClientDII -
2. Re: Accessing web service from MBean
starksm64 Jan 4, 2006 3:11 PM (in response to hlehtimaki)Correct, an mbean has not JNDI namespace as there is no notion of jndi in the jmx spec. Adding this would be a proprietary extension. With the ejb3 model, and jboss5 pojo model that essentially allows for arbitrary container creation I don't see that we will add support for a java:comp style namespace to mbeans.
-
3. Re: Accessing web service from MBean
omatzura Jan 4, 2006 5:15 PM (in response to hlehtimaki)Hi!
We faced the same problem and solved it by creating a local EJB with service-refs to the external webservices we needed to invoke. The EJBs local interface had methods returning the referenced service-endpoint-interfaces which could then be invoked from any component that could look up the ejb (including mbeans, etc)
Is there anything wrong with this approach? (maybe not very "nice" but works just fine.. )
/Ole -
4. Re: Accessing web service from MBean
hlehtimaki Jan 4, 2006 6:18 PM (in response to hlehtimaki)Thanks, Thomas. I'm using DII now and it works fine.
-
5. Re: Accessing web service from MBean
starksm64 Jan 4, 2006 7:36 PM (in response to hlehtimaki)local ejbs are probably easier than dii, but its just a coding preference at that point.