aspose file tools*
The moose likes Web Services and the fly likes Help required! I am new to this area (Java to Web Services) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Help required! I am new to this area (Java to Web Services) " Watch "Help required! I am new to this area (Java to Web Services) " New topic
Author

Help required! I am new to this area (Java to Web Services)

prasanna kanth
Greenhorn

Joined: May 14, 2006
Posts: 28
Let me explain the scenario first, (May be I don�t use the exact terminology, but I hope I can make out what I need)

I have some applications which is running as standalone Swing component
Now for some validation purpose, I have to interact with Web services.
I am nothing to do with web service end, as the service(or wsdl) is already exists in the server, I just need to invoke with some values and should get the response from it.

I hope I explained what I need.

1. How is it possible to talk from standalone java swings component to Web services
2. Is there is any special API will help to do, if yes what is that.
3. Can someone help me to provide some piece of code how to interact?
4. What are the things I should know before I start.

Really appreciate your kind advice, I am desperately waiting for the feedback as its very urgent from my end.

Thanks in advance.
Prasanna T :roll:
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
You should start by getting a SOAP toolkit like Axis. Those generally come with a tool that creates java classes that can access a WS defined by a WSDL; Axis' tool for doing this is called wsdl2java. There are several ways to use it to generate client code, one is by using XMLBeans. That web page also explains the other ways, although for your purposes it probably doesn't matter which one you use. (You'll need to save the WSDL as a file so that wsdl2java can use it.) The client code that gets generated will have the URL of the WS hardcoded; obviously, you'll have to adapt that to your circumstances.


Ping & DNS - my free Android networking tools app
prasanna kanth
Greenhorn

Joined: May 14, 2006
Posts: 28
Thank you, Ulf Dittmer

Now I manage to generate the Stubs, service, ServiceLocator and portType files from the wsdl. But not sure how to implement these with my exiting code.
My code has the required data to be passed, but i didn't get much idea on how to do this

Need advise, on how to use these files...!

Thanks in advance.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
The Quick Start Guide I linked to has an example client that shows how to make use of the generated classes. It will be a bot different in your case, because you will have different method names and parameters, but by and large, you should be able to adapt that client without too many problems.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help required! I am new to this area (Java to Web Services)