Please help me with sample code. I dont want to use application server eg.tomcat, glassfish etc with eclipse only.
-
are you sure you want to write your own application server? ... how about Spring Boot? – Vadim Jun 21 '17 at 09:52
-
Hi Vadim I am not wriiting any application server. My question... is without using any application server can I consume external (client provided) web services which is hosted on remote client server – Rishi Salunkhe Jun 21 '17 at 10:15
-
I am no aware about it works without app server or not. I am not implementing or installing any app server. Still I want to consume SOAP with simple JAVA application. Can you help me out for same – Rishi Salunkhe Jun 21 '17 at 10:27
-
but spring boot has built in support for tomcat....I dont want to use any app server. I want write one class which include main method. In than I want to call SoAP services. – Rishi Salunkhe Jun 21 '17 at 11:02
-
You want to consume... what is a problem? go ahead. Write your own server. – Vadim Jun 21 '17 at 11:28
-
@VadimThat is actual proble. Requirement is dont use any application server. Without using application server can this possible or not? – Rishi Salunkhe Jun 21 '17 at 11:42
2 Answers
You have to run a service on an application server.

- 211
- 2
- 13
-
-
Hi I have third party external SOAP WS from client which presents on their server. They only provide WSDL file to me. I want to consume these web service in my Java application but requirement is it should be standalone application should not use any application server. I only want resultant xml file from service. How this can be possible? – Rishi Salunkhe Jun 21 '17 at 10:13
-
I am no aware about it works without app server or not. I am not implementing or installing any app server. Still I want to consume SOAP with simple JAVA application. Can you help me out for same – Rishi Salunkhe Jun 21 '17 at 10:27
-
https://stackoverflow.com/questions/18869686/how-to-consume-a-soap-web-service-in-java Is this what you looking for? – Daniel Stiefel Jun 21 '17 at 10:33
-
Hi @ Daniel Stiefel link you provided needs any app server for consuming SOAP service. I dont want to use any app server. – Rishi Salunkhe Jun 21 '17 at 11:04
-
Sorry for that. Maybe you can use this information here http://docs.oracle.com/javaee/5/tutorial/doc/bnayn.html. hope this will help – Daniel Stiefel Jun 21 '17 at 11:21
Man, it seems like you do not understand what Web Service is by nature. regardless of SOAP, REST or any custom interfaces. Tomcat, Glassfish, Weblogic, JBoss, WebSphere are Java Applications already written for you. Others maybe are not Java but Applications anyway. There must be a listener who sits and waits for requests, then consumes it, works on it and return responses. that listener calls "application server" or "web server" if it is about http requests.
So... your "simple JAVA application" must be that listener i.e. "application server". Big or small it is up to you. Do you really want do that while there are more than needed "simple JAVA applications" already written?
PS: if you need just Unit Test your requests with single run, it is another story and another answers...

- 4,027
- 2
- 10
- 26
-
Thanks man for your reply. Suppose I have web services on remote server which I want to consume in my standalone Java application(without tomcat or any server configured simple one class application with main method). I have only WSDL file of that web service. How can this work out? and what output I get? Is it xml file or string? – Rishi Salunkhe Jun 21 '17 at 11:55
-
Please, make it clear for your-self and for us too... What do you actually want? Call remote server (it is a client)? or consume requests from clients (it is a server)? If you need a client you do not need any servers. It can be anything which calls remote server. Java Application, any other application, Web browser or even curl command. As long as you have WSDL it will be SOAP XML. So,simple way is to generate a Client out of WSDL, then call it from your code. Google or search this site how to do that. There are tons of answers and I'm not able to repeat them. sorry... – Vadim Jun 21 '17 at 12:08