Document about calling webservice in jsf - web-services

I create a simple jsf page, i want to call webservice in jsf, but i can't find document which wrote about webservice in jsf. Can you give me some link about it? thank for your helping

If you need to call a published soap-WS (i.e: wsdl is online) inside your code you should create a ws-client for example with the wsimport tool (comes with JDK). this will give you a java client that you can use to communicate with the WS (even an EJB will simplify your work). From the jsf perspective you are still using a Pojo, so, the client could be injected in a #ManagedBean.
About how to generate a ws-client: http://ayazroomy-java.blogspot.com/2013/07/using-wsimport-tool-to-generate-client.html

Related

Creating and using SOAP based web service in Laravel framework

In Laravel 4 framework, how to create a SOAP based web service. I would like to build a SOA based web application in laravel. Please clarify with an example how to use web service with some step by step examples or links as i am completely new to laravel
Thanks in advance..
You can use "php-wsdl-creator" (also supports SOAP). They have a great tutorial and many demo php files to get you started. It can also easily be implemented in laravel or any other framework for that matter. :)
You can find more information on Google Code: https://code.google.com/p/php-wsdl-creator/
Also note that SOAP requires an extension to be loaded in PHP.
For more recent needs, you should use a Project such as wsdl2phpgenerator or PackageGenerator from WsdlToPhp. This sort of projects, requirable with composer, use an OOP approach and allows to build a SOAP request easily with PHP objects then handle the response just as the request with PHP objects.

How to print wsdl file data using jsp

In my project we have one webservice which contain the data like date, time, total number of transaction and all this information i have to print in some other website i am using JSP for printing this information but i don't have idea about how to take data and print the information from webservice because i am new in this technology please help me.
this is my data
<asa-details asa-id="1"><dep_txn>6</dep_txn><pre_auth_txn>3936164</pre_auth_txn><pre_bfd_txn>34</pre_bfd_txn><pre_otp_txn>93</pre_otp_txn><prod_auth_txn>505949</prod_auth_txn><prod_bfd_txn>0</prod_bfd_txn><prod_otp_txn>0</prod_otp_txn></asa-details>
Thank you in advance
First of all, check the wsimport program in your jdk installation. This lets you convert a wsdl file to java classes. (Or use the wsdl2java which comes with cxf)
Next I suggest taking a look at the cxf framework for communicating with the web-service itself: http://cxf.apache.org/
They have really good guides and the framework is well supported.
This framwework will hide all complexity of working with soap envelopes for you. You are just working with java classes.

SOAP Web Service basics

am new on WS.
some simple questions in my mind, please try to solve it.
i did a demo WS for Calculator on calculator(), where it has one UI where i enter values for it, internally pass it to WS. Ok i got answer/output. but if i want to create only webservice which take/give xml data or just give xml data. how can i create it.
i found some WS URL's about some fame company. is it used by using by opening Connection. how they define this URL? am using MyEclipse10 when i went to create new WS, needed to use Java Bean class for create it. ok, if i create myWS url then how it ll get call? because it is JavaBean?
and if just want to create WS then i need not required to create New WS client?
i dont know it is simple or may be foolish question, when i walk on WS i stop here. i feel like , without basic knowledge started to build it.
please, clear it.
Thanx.
MyEclipse (as well as Eclipse, IBM D Developer, etc) let you create a Java Web service server in one of two ways:
Bottom up Java Bean: you supply a bean, it turns it into a WSDL (and generates the corresponding stub code)
Top down WSDL: you supply a WSDL, and it generates the corresponding stub code
When a company creates a web page, they set up a web server and publish some HTML pages on it.
When a company publishes a WSDL, they also set up a web server ... and publish an XML WSDL on it.
The URL you go to in order to read a WSDL is just an ordinary HTTP web server, that happens to be serving an XML WSDL at that location.
The WSDL specifies where the service can be found, and what operations and data types the service uses. A WSDL you create, or a WSDL that's published by some other company.
'Hope that helps

WebServices client in java?

I would like have a solution for creating a WebServices client and it needs to consume the Services which already existed.
I have code this from Netbeans ide but my requirement is the wsdl url must be a dynamic one and more specific it needs to fetch from .xml,please suggest me to do that dynamic..cheers
If you are building a Java EE application you can create a web service client in Netbeans. Otherwise you need to code it on your own or use a external tool or library.
You need to parse the XML and read the WSDL URL from it, you can find in the net for how to read the data from the XML
Once done,using the URL you got from the XML you can call the service endpoint (The code you have already)

Blackberry SOAP web service call without KSOAP

I've had nothing but problems using libraries that claim to simplify consuming SOAP Web Services. I've been using KSoap2 on the Blackberry to accomplish this, but I'm not liking the process at all.
On Android I manually created my envelopes with much success, I ended up doing the same on iPhone after much disappointment using SudzC.
I would like to do this for Blackberry as well. What classes should I use and how should I structure the envelope?
Thanks a lot.
See this article on the use of the Java Wireless Toolkit to create your coded stubs from your wsdl. It will save you a lot of time (and pain). I based my SOAP web service code on this article, and it worked well for me.
http://www.johnwargo.com/index.php/blackberry/dbja2.html
I'm consuming REST services that output XML documents, and we're doing all XML processing with the DOM libraries provided by RIM (using classes like net.rim.device.api.xml.parsers.DocumentBuilder and net.rim.device.api.xml.parsers.DocumentBuilderFactory).
The HTTP part can be done Java ME IO support (with javax.microedition.io.HttpConnection). Making your own SOAP WS client sounds like a lot of work, but it can certainly be done.