?
Solved

how to run wsdl2java

Posted on 2011-05-01
12
Medium Priority
?
1,046 Views
Last Modified: 2012-05-11
Source: http://axis.apache.org/axis2/java/core/docs/adv-userguide.html

Code:
wsdl2java.sh -uri ../samples/wsdl/Axis2SampleDocLit.wsdl -ss -sd -d xmlbeans
-o ../samples -p org.apache.axis2.userguide

Q  I want to do it in windows. For windows, wsdl2java.sh can be replaced with wsdl2java.bat  but how do I replace  ".."  with what ?

0
Comment
Question by:cofactor
  • 5
  • 3
  • 3
  • +1
12 Comments
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 200 total points
ID: 35500697
'..' doesn't need to be replaced
0
 

Author Comment

by:cofactor
ID: 35500816
>>>'..' doesn't need to be replaced

Yes . You are right. Looks like something went wrong when I first run that command . But after a re-run I see things are working . No issue.

However , tutorial also says that ..

Step 3: Create Archive File

An Axis2 service must be bundled as a service archive. The next step is to package the classes in an .aar (axis2 archive) and deploy it in Axis2. There is an ant file generated with the code; it will generate the Axis2 service archive for you.


I really dont see any ant file ( build.xml ?)  generated  along with the code.  Is that statement incorrect ?  or  I need to use a separate parameter in the wsdl2java tool to generate the above ant file ?

N.B: points increased.
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 200 total points
ID: 35500872
Yes - it could be incorrect. Certainly the purpose of wsdl2java does not normally include build file generation iirc
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 86

Expert Comment

by:CEHJ
ID: 35500887
If you can't find any build.xml anywhere then just make the archive  manually as described
0
 
LVL 92

Expert Comment

by:objects
ID: 35502077
No it is *not* incorrect. it would be incorrect if it didn't create a build.xml. You don't want to have to write that yourself everytime

It should be created in your ouptut directory (same directory as src folder)

0
 

Author Comment

by:cofactor
ID: 35502467
>>>It should be created in your ouptut directory (same directory as src folder)

Here is the  output directory  created ( file attached) . I dont see build.xml here.

 src.zip
0
 
LVL 92

Expert Comment

by:objects
ID: 35502474
would also suggest you change the output directory, putting it in samples is not the best place to put it
0
 

Author Comment

by:cofactor
ID: 35502523
>>>would also suggest you change the output directory, putting it in samples is not the best place to put it

That works !  
I just made another directory "nosample"  and followed the same steps and  got the build.xml  this time.

C:\Users\admin\Downloads\axis2-1.5.4-bin\axis2-1.5.4\bin>wsdl2java.bat -uri ../s
amples/wsdl/Axis2SampleDocLit.wsdl -ss -sd -d xmlbeans  -o ../nosamples -p org.a
pache.axis2.userguide

This time I got a build.xml here   C:\Users\admin\Downloads\axis2-1.5.4-bin\axis2-1.5.4\nosamples


When I run this build.xml I get a service  Axis2SampleDocLitService.aar  at  location C:\Users\admin\Downloads\axis2-1.5.4-bin\axis2-1.5.4\nosamples\build\lib

SO, my service is now ready to deploy ...right ?   :)


You know I have a simple web application  mywebapps.war deployed in jboss. I wish to deploy the service along with this webapps.

Is it just I need to create a "service" directory under WEB-INF of mywebapps.war and drop the .aar archieve under "service" directory to deploy ? or I may need some extra configuration ?


N.B: points increased
0
 

Author Comment

by:cofactor
ID: 35503166
comments please
0
 
LVL 92

Accepted Solution

by:
objects earned 200 total points
ID: 35503659
> SO, my service is now ready to deploy ...right ?   :)

yes, but it does nothing. You need to fill in the skeletons with the implementation details

> Is it just I need to create a "service" directory under WEB-INF of mywebapps.war and drop the .aar archieve under "service" directory to deploy ? or I may need some extra configuration ?

yes, and i think theres also a wsdl jar you need to deploy to lib
0
 
LVL 4

Expert Comment

by:akjain
ID: 35503739
Hi Cofactor.

1. You don't need build.xml, you can manually create aar
on windows:   jar -cvf HelloWorldServices.aar *
(the aar should also have services.xml in its META-INF dir)

2. Once created, drop the ear to /axis2/WEB-IINF/services

Just go through the following step by step tutorial:

web-services-example-using-axis-2

it has answers to all your questions.

-Arun Jain
0
 

Author Comment

by:cofactor
ID: 35505827
>>>yes, and i think theres also a wsdl jar you need to deploy to lib

wsdl jar ? whats that ? There is no such JAR generated.

These are two files are generated  after I run build.xml
C:\Users\admin\Downloads\axis2-1.5.4-bin\axis2-1.5.4\nosamples\build\lib

Axis2SampleDocLitService.aar
XBeans-packaged.jar


Are you trying to say XBeans-packaged.jar ?  If yes , where to put this then ?  Is it to be put under "services" directory alongside by Axis2SampleDocLitService.aar ?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month14 days, 11 hours left to enroll

839 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