Solved

Websphere WSDL2java - how to connect to webservice

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

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
mapShare challenge 13 146
How to replace a token in a string with square brackets? 2 86
Where do I learn ES6? 3 81
Message not shown 5 82
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
This article will show, step by step, how to integrate R code into a R Sweave document
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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…

756 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