Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Axis WSDL2Java generated files?

Tags:

I generated Java files from WSDL with WSDL2Java converter, but I don't know how can I use service with these files, because there are no examples. I'm implementing client side.

like image 334
newbie Avatar asked Nov 03 '09 06:11

newbie


People also ask

Where can I find WSDL2Java?

Currently, wsdl2java is located in the Apache CXF package. If you extract it you will find handy scripts in the bin directory that simplify the execution process.

What is WSDD file in Web services?

wsdd file. The wsdd stands for Web service description file. It is an XML file used by the Axis engine. It contains definitions of the Web services that Axis deploys from your Web application.


2 Answers

Regarding Axis2: read these these links they contain some examples:

http://ws.apache.org/axis2/1_5_1/quickstartguide.html#clients
http://ws.apache.org/axis2/1_0/userguide3.html

EDIT: Regarding Axis1: it is based on JAX-RPC and you need to instantiate stub object or use service locator to get stub instance and all WS operations will be in that. An example is given here:

public class Tester {   public static void main(String [] args) throws Exception {     // Make a service     AddressBookService service = new AddressBookServiceLocator();      // Now use the service to get a stub which implements the SDI.     AddressBook port = service.getAddressBook();      // Make the actual call     Address address = new Address(...);     port.addEntry("Russell Butek", address);   } } 
like image 171
Andrey Adamovich Avatar answered Sep 21 '22 13:09

Andrey Adamovich


Normally a client doesn't instantiate a stub in Web Services, you would use the service locator and call the get method. I can't tell from your question, but if you are asking a more general "Where do I get JavaDocs (or such) to better understand the API", you would have to tell use which WS you are using.

Axis User Guide

like image 44
Scanningcrew Avatar answered Sep 21 '22 13:09

Scanningcrew