Solved

new to spring web services

Posted on 2014-02-24
4
236 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

705 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now