Solved

new to spring web services

Posted on 2014-02-24
4
244 Views
Last Modified: 2014-04-01
hi guys

we are working with other teams to access data.

One of the team has given us a wsdl url and asked us to use that wsdl to access data

http://npt2344.internet.tempk.com:8080/axis/services/HPublisherServicesImp?wsdl

Method = getCustomMessages()
Parameter1 = cmk
parameter2 = 2014-02-10



I am new to web services and would like to use spring web serivces to access this.
Is using spring webservices overkill in this situation?
Any advice appreciated.

thanks
0
Comment
Question by:royjayd
4 Comments
 
LVL 20

Accepted Solution

by:
chaitu chaitu earned 300 total points
ID: 39884809
this link has clearly explained on how to consume webservices if the client has provides wsdl file.

http://manthapavankumar.wordpress.com/2013/03/12/consuming-web-service-using-spring-3-x/ 

i am not able to access your wsdl file.may be firewall restriction from my side.
0
 
LVL 6

Assisted Solution

by:Mahesh Bhutkar
Mahesh Bhutkar earned 100 total points
ID: 39884861
That means you have to write Web service client.

Yes, you can write Web service client using Spring.

First check the service is up and running or not, by putting the wsdl url (http://npt2344.internet.tempk.com:8080/axis/services/HPublisherServicesImp?wsdl) inside browser.

You can test this webservice using SOAPUI tool.

Here is one of the simple example you can refer for writing client,
http://javapapers.com/web-service/axis2-web-service-using-eclipse/
0
 
LVL 35

Assisted Solution

by:mccarl
mccarl earned 100 total points
ID: 39887701
Personally, I would say that if you are already using Spring for other parts of your project, then using it like in @chaituu's linked page could be useful for you.

If you AREN'T already using Spring though, then yes it probably is a bit of overkill because it doesn't really provide that much extra functionality to a non-spring project. If this is the case, I would suggest using JAX-WS (which is exactly what Spring is using "under the hood" in @chaituu's example anyway) to consume the web-service. Check out this tutorial http://java.dzone.com/articles/jax-ws-hello-world but don't worry too much about the top section on "Developing WebService End Point". Just scroll down to the "Developing WebService Client" part and go from there. Note the commands to run wsimport would be slightly different if you are running a Maven project, in which case you would first cd to the "src/main/java" directory of your project rather than just "src".

Note the above tutorial would be useful if you go down the Spring route anyway, because in the link from @chaituu's post, they only state that you need to create the "TemperatureConverter" interface. However, the wsimport command from the JAX-WS tutorial above can be equally used to automatically generate the service interface for you based on the WSDL.

Let us know if you have any problems implementing any of the above.
0
 

Author Closing Comment

by:royjayd
ID: 39970601
thanks
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question