aspose file tools*
The moose likes Web Services and the fly likes Need a help on Web service startup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Need a help on Web service startup" Watch "Need a help on Web service startup" New topic
Author

Need a help on Web service startup

sameer kum
Greenhorn

Joined: Jun 30, 2011
Posts: 8
javascript:emoticon('');

HI
I am new to web services.I do have a basic understanding of web services.I have a idea about soap and wsdl.I am trying to implement a sample poc which fetches a list of objects.when i give id it should fetch the corresponding information based on the id.The information fetched i am putting it in list object.

I wrote a one method which returns a list and takes argument as String.I want to expose this method as a web service.

I have created a standalone java project and wrote a method like this.

public class StudentDetails
{


public List<ArrayList> getStudentDetails(String stdId){
List<ArrayList> list=new ArrayList();
Student std=new Student();
std.setStdName("studentstudent");
std.setStdType("typed1234");
return list;
}
}

I am using eclipse and apache axis1 as an soap runtime engine.

I tried to expose the above class as a web service by selecting the option create web service then I got the following error.I am not
sure It is a error or warning.Please find it in the attachement "error_creating_webservice.JPG".
I tried by clicking on ok button in the screen shot attached but still i did not see any wsdl file generated.

Please guide me in how to proceed.

Regards,
sameer.







[Thumbnail for error_creating_webservice.JPG]

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Do yourself a favour and avoid JAX-RPC and Axis 1 if you do not really have to. There are much more recent things out there, for instance JAX-WS and Metro (web service stack).
You can find a lot of web service tutorials here: http://netbeans.org/kb/trails/web.html
I suggest you work through a tutorial and then modify it to suit your needs.
Good luck!


My free books and tutorials: http://www.slideshare.net/krizsan
sameer kum
Greenhorn

Joined: Jun 30, 2011
Posts: 8
Hi Krizsan,

Thanks for your guidance.I need to use Eclipse only.No Net Beans.Could you please guide me in learning web services.
I am having a basic idea of webservice but don't know how to start in java web services.could you please share any e books of developing java web services with eclipse.Please guide me


Regards,
sameer.

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
It is possible to use the metro web service stack when developing in Eclipse.
You may want to write one or two Ant-scripts to automate, for instance, generation of stub classes from a WSDL.
Step-by-step instructions on how to develop web services and clients with Metro in Eclipse are available in my book:
http://www.slideshare.net/krizsan/scdjws-5-study-notes-3085287
It is free, you only need to register (also free) on Slideshare to be able to download it.
Best wishes!
sameer kum
Greenhorn

Joined: Jun 30, 2011
Posts: 8
Hi Krizsan,

thanks for your help.I am not able to download the file from link mentioned in the post.I am getting some error message.Please find error message in the attachement.


Regards,
sameer.


[Thumbnail for download_error_pdf.jpg]

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
People have had problems downloading documents from Slideshare with anti-virus software enabled.
Please try to disable anti-virus software etc when downloading. Also try different browser(s).
For further assistance regarding problems with Slideshare, please contact Slideshare.
Best wishes!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Need a help on Web service startup