Does anyone know how to integrate Axis with wsad. I did an application using apache file upload utility, all it does it takes files ( any kinds) from an html form and submits to a servlet which uses apache's "Commons FileUpload package", parses the request and stores each files in db2. I am trying to extend the functionality by using "Web Services". In my servlet , I want to create soap envelops with these files and send that envelop over to another servlet. After doing some research, I came to know about AXIS and I am very keen to integerate that with Wesbsphere Studio Application Developer(WSAD 5.1.2). If anyone has done this before ( soap with attachments using Axis and WSAD), I would truly appreciate their help.
Hi Jan, Thanks for ur reply on my post. I eventually figured it out, I was very suprised to see no one is involved with wsad and webservices. I also found a bug in WSAD when creating web services for Sending attachments, when you create webservices through the wizard, wsad creates WSDL but it doesn't create a proper data mapping for DATAHANDLER, so I have to manually edit the wsdl mapping, if anone else is having the same problem, read this article ==> Web Services application fails to start - non-standard MIME Types should be mapped to javax.activation.DataHandler
Siva, I dont't think there are any specific examples to using axis with wsad. If you know how to create any basic webservice using wsad then you can just try axis sample code with wsad. For example, Take any webservice java class from axis samples, using WSAD all you need to do is create a webservice using the webservice wizard and wrap this class as a webservice and expose its methods which you want to expose.
For the client, create a webservice wizard using the client to communicate with the webservice which will create stubs which will allow you to communicate with the webservice you created. And now you can take code from axis client from the samples use that to call your webservice , just make sure you have all the necessary "imports" in you class. Make sure all the jar files are added to classpath of wsad test enviroment as well. If you missed this , it will complain at run time, some class not found...
Hi Siva, First of all learn to spell other people's name correctly, in all your post you have misspelled my name, if you cann't spell my name correctly then don't write the name , if you carefully look my name beside the post, you can see clearly which also says DV in bracket, if Dharamvir is so hard to spell then use DV or don't use the name.
Anyway, here is a link to the samples from Apache: Axis Samples.
Steps on using it:
Take any example, let just take StockQuote, doing it from scratch: 1. Now pick the class which you want to use for Webservice, in this case the class would be StockQuoteService.java, import this class from StockQuote folder in your WSAD, if you get any errors, check your import packages if they are in path if not, then you download apache axis jar files on you machines, put those library's in your path, the error would go away.
2. Now use your WSAD Webservice wizard to create a webservice, when going through the wizard pick JAVABEAN service, and pick the java class which you imported from the samples and then select the method from the class which you want to expose.
3. So far so good, Once done it will create several stubs and helper classes.
4. Now that you used the WSAD wizard to create the webservice, now use this wizard again to create the client ( at the start of the wizard, pick webservice client, specify a different name so that you see what files were created. It will be created in a different folder.
5. Once you have stubs and classes for the client, now you can import the client from axis, There are few clients in the folder like GetQuote.java, Just import this file in the folder where you have client stubs created 6. Make sure to assign the name of your service where you have -- call.setTargetEndpointAddress( url ); // url would be the address of your sebservice, you can get this full path from wsdl file which gets created by the wizard, which should be at the bottom and should look like this: <wsdlsoap:address location="http://localhost:9080/DV_WebService/services/WebServiceJavaBean"/>
7. That should be it, Start you websphere test environment and then run your java client.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop