Solved

Websphere WSDL2java - how to connect to webservice

Posted on 2009-07-14
3
1,067 Views
Last Modified: 2013-11-23
Hello all,

Someone has put up a webservice and provided me with a WSDL file. I now need to connect to this service from my java-projects.

I know some of the theory behind webservices but now I need to put some code into practice for the first time... Can anyone point out how to go about it from here?

I am using Rad 6 websphere environment.
 
 
0
Comment
Question by:Subhachandu
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
D_M_D earned 500 total points
ID: 24863058
In Java - Use the WSDL2Java jar to generate the client classes you'll need to call the web service.
Here's an example:
http://ws.apache.org/axis/java/user-guide.html#WSDL2JavaBuildingStubsSkeletonsAndDataTypesFromWSDL


In .NET use the wsdl.exe file to generate your client classes.  Here's an example:
http://msdn.microsoft.com/en-us/library/7h3ystb6(VS.71).aspx

You use the generated classed to invoke the web service.
0
 

Author Comment

by:Subhachandu
ID: 24868616
THe given apache document helped to generate the client specific stubs etc. But i need to connect to a webservice which has BasicAuthentication.

 My client app is calling a webservice which has basic authentication. How should i approach using java. I used wsdl2java to generate the stubs etc. But when i am actually calling the methos in the service, i am getting 401 unauthOrised..
0
 

Author Closing Comment

by:Subhachandu
ID: 31603559
Very helpful information THanks..
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

910 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

25 Experts available now in Live!

Get 1:1 Help Now