• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1204
  • Last Modified:

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 ?

0
cofactor
Asked:
cofactor
  • 5
  • 3
  • 3
  • +1
3 Solutions
 
CEHJCommented:
'..' doesn't need to be replaced
0
 
cofactorAuthor Commented:
>>>'..' 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
 
CEHJCommented:
Yes - it could be incorrect. Certainly the purpose of wsdl2java does not normally include build file generation iirc
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
CEHJCommented:
If you can't find any build.xml anywhere then just make the archive  manually as described
0
 
objectsCommented:
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
 
cofactorAuthor Commented:
>>>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
 
objectsCommented:
would also suggest you change the output directory, putting it in samples is not the best place to put it
0
 
cofactorAuthor Commented:
>>>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
 
cofactorAuthor Commented:
comments please
0
 
objectsCommented:
> 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
 
akjainCommented:
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
 
cofactorAuthor Commented:
>>>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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

  • 5
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now