Solved

new to spring web services

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

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
Java exception bubble up 2 24
Selenium docs api java index 3 67
glassfish admin console 1 21
Coding for the first time 9 68
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

749 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