?
Solved

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

Posted on 2008-06-24
5
Medium Priority
?
1,128 Views
Last Modified: 2013-12-15
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?
0
Comment
Question by:nj07869
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 23

Expert Comment

by:Siva Prasanna Kumar
ID: 21858824
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.
0
 

Author Comment

by:nj07869
ID: 21860641
I tried that.. but it just generates classes for the first port type.
0
 
LVL 23

Expert Comment

by:Siva Prasanna Kumar
ID: 21861572
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

0
 

Author Comment

by:nj07869
ID: 21864560
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.
0
 
LVL 23

Accepted Solution

by:
Siva Prasanna Kumar earned 2000 total points
ID: 21864608
>>Do you know any other Eclipse plug in which does that

even plguins use wsdl 2 java what axis provides so if it can't do no plugin can do.

you can create multiple web service but that would be like duplication of service, actually these kind of requirements are handled by SOA governance products which take care of various policies and rules.

But they are quite expensive compared to having duplicated services. Probably you can use the same services and manage the flow at operations level via authentication or so.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question