Link to home
Start Free TrialLog in
Avatar of cofactor
cofactor

asked on

how to run wsdl2java

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 ?

SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland 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
Avatar of cofactor
cofactor

ASKER

>>>'..' 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.
SOLUTION
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
If you can't find any build.xml anywhere then just make the archive  manually as described
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)

>>>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
would also suggest you change the output directory, putting it in samples is not the best place to put it
>>>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
comments please
ASKER CERTIFIED SOLUTION
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
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
>>>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 ?