aspose file tools*
The moose likes Web Services and the fly likes How to call web services from java class 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 "How to call web services from java class" Watch "How to call web services from java class" New topic
Author

How to call web services from java class

Nilu Deshmukh
Greenhorn

Joined: Aug 03, 2009
Posts: 22
I have created one webservice Hello.wsdl using eclipse.
It simply accepts String name and Prints Hello <name>
I had tested that using SOAP 3.0 UI. Application.
Now I created Client for Hello.wsdl.

It created in java.src in com.tutorial package.
Now I created one HelloTest class to test that web service.

the webservice code of HelloTest is as follows
/*

But I am getting following Exception...

Exception Occured ...(404)Not Found

I have following queries...

1)What's wrong with this code...
or how can i call web service from java or jsp code..

and 2)when i created the webservice the "wsdlsoap:address location" is of my local machine
if i want to run it on different machine then can I replace the loaclhost address with
new one i.e Client machine IP.

Please Reply.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Have you seen these excellent tutorials?
http://www.netbeans.org/kb/docs/websvc/jax-ws.html
http://www.netbeans.org/kb/docs/websvc/client.html
Best wishes!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to call web services from java class