Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Websphere WSDL2java - how to connect to webservice

Posted on 2009-07-14
3
Medium Priority
?
1,090 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 2000 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

Industry Leaders: 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

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

876 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