Solved

Websphere WSDL2java - how to connect to webservice

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

838 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