?
Solved

new to spring web services

Posted on 2014-02-24
4
Medium Priority
?
250 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 20

Accepted Solution

by:
chaitu chaitu earned 1200 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 400 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 36

Assisted Solution

by:mccarl
mccarl earned 400 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
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 …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

800 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