Java Servlet and Web Service communication
I have developed a java web application and the purpose of the application is to fetch the data which are updated or new from another site using their remote services. This operation is being performed in a fixed interval using a timer in my application. After getting the result from remote site, presently, I am keeping it in memory (Need at least 512 MB RAM). I have created a servlet and created some methods. These methods are accessible by passing the methodname as query parameter while calling the servlet. I have also created a web service for the methods which are available in servlet (in a separate class).
I have deployed the web service on Tomcat 5.0/Axis and web application on Tomcat ( same instance of Tomcat). Since one is web service and other is web application, I am duplicating the business logic/components and both are running separately also. I would like to use my business logic/components on either in web service or web application and divert the call from one to other.
I mean,
(1) if I use the business logic/components on web service, then from my servlet, I would like to call the web service and return the result
(2) if I use the business logic/components on web application, then from my web service, I would like to call the servlet and return the result
Pl. advice me which one from the above method is good and how to implement that.
--Sabeer
XML formated data uploading to webservice using webservice client.
hi Aseem,
Thanks for giving a valuable information to me. we have gone through the Developing JAX-WS Web Service Clients. It is so useful to us. Now our intension is to send the data or information in xml format to the webservice and after completion of that process i retrieve that data in xml and have to do parsing.
please provide us some link like Developing JAX-WS Web Service Clients for uploading information to webservice in XML format.
our intension is after developing webservice clients wants to send the data in xml format to the webservice.
(webservice client sends or upload inforamation to webservice in xml format).
Thanks in Advance,
Praveen.
sending XML file to webservice
Hi Tolls,
Thanks for giving reply. We have an xml file that contains employee information. wants to send that xml file to the webservice (instead of jsp what can we use in our spellchecker example or how can we change (parse) that xml data to jsp or any).
few doubts regarding AXIS and JWS:
1. what is the difference between AXIS and JWSDP?
2. Is AXIS contains JAXM and SAAJ? (I Think it contains SAAJ).
So far i understood about SAAJ is
Creating a SOAP connection
Creating a SOAP message
Populating the message
Sending the message
Retrieving the reply
3. What is the difference between JAXM and SAAJ?
I think SAAJ replaces the JAXM for sending messages.
4. what is the relationship between AXIS and JAXM?
5. What is the relationship between AXIS and SAAJ?
6. suppose if i want to send xml data to webservice. Is only saaj is required or JAXM also?
Finally We have XML file of employee information and wsdl file provided by webservice.
Then how can we going to start. we dont have jsp file (can we use xml tags or fields in jsp, is it ok).
I am thinking it is better to change (parse) XML to jsp and going for further process using Developing JAX-WS Web Service Clients - NetBeans IDE 6.7 Tutorial link.
"If you have link or example for sending XML file or xml data to webservice, please provide us."
"CONCLUSION:we have WSDL and XML files and wants send xml file to webservice"
Thanks in Advance,
Praveen.