-
1. Re: Portlet calling a webservice
halversp Sep 22, 2006 3:52 PM (in response to portalgeek)You invoke webservices from a portlet just like any other WS client -- get your hands on the service proxy (either pre-generated or through a dynamic proxy) and start calling operations (either through a generated service endpoint interface or dynamically). The portlet configuration mechanism may give you a cleaner place to isolate the configuration (e.g. the endpoint URL, etc.), and there are probably some lifecycle considerations (e.g. acquire the proxy in the init() method), but otherwise there's nothing special about it being in portlet. So if you're looking for examples you need to look at the usual web services tutorials.
WSRP has nothing to do with it -- WSRP is about calling portlets via webservices, not calling web services from portlets. -
2. Re: Portlet calling a webservice
mmontoni Oct 19, 2006 2:26 PM (in response to portalgeek)Hi portalgeek,
did you get your portlet to call a web service? I need to do the same thing, I already implemented a web service and need to call whithin the portlet in my portal. If you did, do you think you can give me some tips?
I really appreciate it.
Thanks
Mariella. -
3. Re: Portlet calling a webservice
mholzner Oct 19, 2006 2:46 PM (in response to portalgeek)generate the client stubs, and use them in the portlet. There is no difference in calling the WS from a portlet to any other client. Look at the examples that come with your SOAP engine (AXIS, JBoss-WS, ....)
WSRP is something completely different. It used WS as a transport protocol, but that's about it.