Link to home
Start Free TrialLog in
Avatar of nj07869
nj07869

asked on

How to use Axis2 Code Generator when you have more than one port types/bindings?

Hello,

How do I generate server side source code files using Axis2 when I have more than one port types/bindings? Basically, I would like to group different operations in different ports, do I have to create separate services? How do I do this in One wsdl and use Axis2 Code generator to make server side for all?
Avatar of Siva Prasanna Kumar
Siva Prasanna Kumar
Flag of India image

Simplest thing to do is use Eclipse Axis 2 plugin

http://ws.apache.org/axis2/tools/1_4/eclipse/wsdl2java-plugin.html#operation1

Download the Plugin and follow the steps.
Avatar of nj07869
nj07869

ASKER

I tried that.. but it just generates classes for the first port type.
interesting as per the documentation also nothing much has been mentioned. very rarely people use multiple port types, but I know they are very useful, even via axis command line tool we can only generate one port

see this , so its clear that it cannot generate code for multiple port types. (check -pn option)
Usage WSDL2Code -uri <Location of WSDL> : WSDL file location
-o <output Location> : output file location
-a : Generate async style code only. Default is off
-s : Generate sync style code only. Default is off. takes precedence over -a
-p <package name> : set custom package name
-l <language> : valid languages are java and csharp. Default is java
-t : Generate TestCase to test the generated code
-ss : Generate server side code (i.e. skeletons). Default is off
-sd : Generate service descriptor (i.e. services.xml). Default is off. Valid with -ss
-d <databinding> : valid databinding(s) are adb, xmlbeans and jaxme. Default is adb
-g Generates all the classes. valid only with the -ss
-pn <port_name> : name of port in the presence of multiple ports
-sn <service_name> : name of service in the presence of multiple services
-u : unpacks the databinding classes
-r <repository_path> : path of the repository against which code is generated

Open in new window

Avatar of nj07869

ASKER

Do you know any other Eclipse plug in which does that? I am little new to this... what generally people do? Create different wsdl/services for different groups of operations? or just group them all together?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Siva Prasanna Kumar
Siva Prasanna Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial