views:

85

answers:

1

Hello everybody,

I need to write invoker for web services in JSF. Any guidlines you can give me? Which lib(API) should I use?

Thanks

+1  A: 

The way you access web services from your code (managed beans perhaps?) does not depend on JSF. CXF and Metro are both implementations of JAX-WS, using which you can implement web-service client code.

Bozho
and alone I cant write client for invoking WS? Why using CFX and Metro?
Milan
of course you can, if you want to do everything by hand and reinvent the wheel. Using them allows you to write/generate a client in a few steps and a few lines of code
Bozho
OK, I decided to try CXF. So I downloaded the binary distribution of apache cfx and the all jars in the lib folder I put in my WEB-INF/lib folder in the project in Eclipse. Am I doing good? Its the right way of using the CXF in Eclipse?
Milan
Yes, it is. (There are _better_ ways, but they require additional expertise, like maven or ivy)
Bozho
when I run this:JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();Client client = dcf.createClient("http://ws.strikeiron.com/IPLookup2?WSDL");I got some error like this:No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure ....i should configure somehow my JSF web.xml?
Milan
JSF has nothing to do with this. I'd suggest reading the how-to guide, and if something doesn't work, ask another question.
Bozho
I found it difficult to write dynamic client with CXF. I recieve some error that I cant solve. Any other way of writting dynamic clients?
Milan