Solved

Websphere WSDL2java - how to connect to webservice

Posted on 2009-07-14
3
1,064 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

747 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

14 Experts available now in Live!

Get 1:1 Help Now