Consume web service through JSF application - web-services

I have a web service I want to consume it through JSF. I am a beginner in web service I googled it but not found any satisfactory answer can any one pls help.
I have a wsdl link what I need that only with the help of this wsdl file calls the exposed methods.
Thanks in advance.

Run wsimport tool on your WSDL file (or your WSDL link). It will generate client classes that you can use in your JSF application.
Look for the class that has method getPort() or getPort. It will return the object which is a web service proxy. You can call web service methods on it.
You'll find wsimport in you Java JDK bin directory.

Related

How to determine if web services deployed correctly on websphere application server?

hey guys I'm a newbie at IBM websphere Application server and have a general question !
I'm trying to deploy an ear file which only has some ejb jar files(no wars) which cantains #webservice annotations to expose JAX-WS web services.
the ear structure is base on J2EE standard and it works on weblogic and glassfish as well, but when I deploy my ear on websphere 9.0 application server and try to test it's web services by SOAPUI tool I get 404 error repeatedly.
unfortunately I can't see my web services list in admin console or even their wsdl files.
Although my ear deployed successfuly and has started status at websphere application server console.
I dont know how to test it :( does it need any precondition?
these are my tested urls on address bar to see wsdl files but couldn't
http://localhost:9080/my-app-display-name/my-web-service-name.wsdl
http://localhost:8880/my-app-display-name/my-web-service-name.wsdl
See https://stackoverflow.com/a/23752121/5215049. This seems to be your case.
Enabling trace for JAX-WS should help you debug this issue.
Refer: https://www.ibm.com/developerworks/community/blogs/Dougclectica/entry/capturing_web_service_jax_ws_messages_in_websphere?lang=en for specific instructions on enabling JAX-WS trace logs in Websphere
Refer : https://www.ibm.com/support/knowledgecenter/en/SSAW57_9.0.0/com.ibm.websphere.nd.multiplatform.doc/ae/twbs_tracewbscomp.html for detailed instructions for tracing webservices in general.

How to implement web service with SOAP 1.1 in ColdFusion

I have to implement implement web service with SOAP 1.1 in ColdFusion. I am new in SAOP and searched for some example or sample code for web service in ColdFusion.
Didn't find any good tutorial with details. Just some portion of the code I got.
Don't know how to sent parameters and how to access those parameters inside web service methods.
Can I get some sample code or any link??
Thanks in advance.
For SOAP, you can follow this link,
http://www.adobepress.com/articles/article.asp?p=2031328&seqNum=3
For REST, follow this link,
http://www.adobe.com/devnet/coldfusion/articles/restful-web-services.html

Is there a way to find out if a updated a service in WSO2 application server?

I have a simple question if it make sense in the context of WSO2 Application server.
I want to write a module, which tells me if i updated a service. The service is an axis2 SOAP service. I know how to write modules for axis2 services inside axis2 engine. But if i use the WSO2 interface, and either delete a service, update a service or add a service, Is there a way to find out that i performed these activities?.
In short, can i intercept the messages that i uploaded a new module or i uploaded a new service or i changed the service.
thanks you...
You could write a Axis2 Observer for this, take a look http://asanka.abeysinghe.org/2008/10/how-to-writing-axis2-observer.html

Why should we use WSDL4j for developing webservices?

I need to develop Webservice Application for our Client .
I dont know anything about WSDL4J
From the net I found this
"The Web Services Description Language for Java Toolkit (WSDL4J) allows the creation, representation, and manipulation of WSDL documents.
Is the reference implementation for JSR110 'JWSDL' (jcp.org)."
But anybody please tell me why should we use WSDL for developing webservices?
Is there any specific advantage we will get?
And can anybody please point me a link where to start for working with WSDL4j?
You actually need not to use wsdl4j for developing web services or clients for web services. There are other SOAP stacks developed on top of that. Axis2 is such an open source SOAP stack..
WSDL2Java tool that comes with Axis2 - which been used to generate client side stubs from a given WSDL. uses wsdl4j internally..

How to create a WSDL for my JSP Page

I have a working JSP page (with one parameter). Now somebody wants to use my JSP as a webservice.
How can I create a WSDL for my JSP, and how do I passthrough parameters
I'm able to to create a WSDL and test it, but I'm unable to read my parameter request.getParameter in the JSP.
I would suggest looking into some existing framework, like axis2 or jax-ws, for creating web services. Doing SOAP manually tend to get...messy.